Enforces strict git write permissions to ensure AI agents never commit or push code without explicit human approval.
Git Safety is a specialized guardrail for Claude Code designed to prevent unauthorized or accidental modifications to your source control. It strictly prohibits destructive or history-altering operations—including commit, push, merge, rebase, and PR creation—unless the user provides clear, scoped consent. By establishing a "report and wait" pattern, it ensures that developers maintain absolute control over their git history and reputation. The skill also promotes repository hygiene by discouraging the use of stashes and ensuring all AI actions are transparent and human-verified.
主要功能
01Blocks all unauthorized git write operations including push, merge, and rebase
02Provides multi-repo protection covering main, wiki, and secondary repositories
030 GitHub stars
04Enforces stash hygiene to prevent orphaned changes from cluttering the repo
05Requires explicit, scoped user approval for every individual git action
06Integrates with deployment workflows like /submit and /publish for seamless approvals
使用场景
01Preventing AI agents from pushing experimental code to production branches
02Ensuring every commit message and code change is reviewed before hitting the history
03Maintaining a clean repository state by preventing automated stash accumulation