ftm-git

Detect hardcoded secrets in staged files and git history before commits.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/kkudumu/feed-the-machine --skill ftm-git
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ftm-git
Source: https://github.com/kkudumu/feed-the-machine/tree/main/ftm-git
Command: npx skills add https://github.com/kkudumu/feed-the-machine --skill ftm-git

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires node, git, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Secrets leakage via Git happens when API keys, tokens, or credentials are accidentally committed. This Skill enforces a hard safety gate that scans staged files, working tree, and git history to detect hardcoded secrets and blocks commit or push operations until remediation is completed, reducing blast radius and credential rotation needs.

Core Features & Use Cases

  • Secret scanning and blocking for staged/committed content to prevent secrets from entering git history
  • Automatic remediation by extracting secrets to a gitignored .env file and refactoring source files to read from environment variables
  • Pre-commit hook installation that provides a safety net beyond Claude’s active intervention
  • Blackboard/experience logging to capture remediation outcomes and inform future actions
  • Integration with ftm-executor and ftm-mind to gate commit/push workflows and ensure safe deployments

Quick Start

Enable the ftm-git gate in your repository and let it automatically scan for secrets, block unsafe commits, and perform remediation.

Frequently Asked Questions about ftm-git

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I block secrets from being committed to Git history?

Blocking secrets from Git requires a pre-commit hook that scans staged files and the working tree for hardcoded credentials, intercepting unsafe commit and push operations before secrets enter version control history.

How do I automatically remediate hardcoded API keys in staged files?

Automatic remediation of hardcoded API keys involves extracting secrets from source files into a gitignored .env file and refactoring the code to read from environment variables. This process creates the .env infrastructure and updates .gitignore safely.

Does the secret scanning pre-commit hook work with existing Git repositories?

The secret scanning pre-commit hook works with existing Git repositories by scanning both the working tree and git history. It requires Node and Git installed, integrating directly into your current commit and push workflow as a safety gate.

What is the best way to scan git history for leaked environment variables?

The best way to scan git history for leaked environment variables is using an automated scanning tool that checks staged files and historical commits for hardcoded secrets. It blocks unsafe commits and logs an audit trail for credential rotation tracking.

Can I refactor source code to read from environment variables automatically?

Yes, source code can be automatically refactored to read from environment variables during secret remediation. The process extracts hardcoded values to a .env file and updates the source files to reference environment variables instead of plain text credentials.

Why do I need a pre-commit hook if I already scan for secrets manually?

A pre-commit hook provides a continuous safety net beyond manual scanning by automatically blocking secrets before they enter git history. It enforces a hard safety gate on every commit and push, reducing the blast radius and need for credential rotation.