git-guardrails-claude-code
Prevents Claude from executing destructive Git commands by installing a bash hook script for safety guardrails.
Install
npx skills add https://github.com/mattpocock/skills --skill git-guardrails-claude-codeStats
| Total installs | 1,575 |
| Weekly installs | 1.6K |
| GitHub stars | 10.6K |
| First seen | Feb 10, 2026 |
| Source | @mattpocock/skills |
Summary
- Blocks five command categories: git push (including --force), git reset --hard, git clean, git branch -D, and git checkout/git restore on tracked files
- Installs as a bash hook script to either project scope (.claude/settings.json) or globally (~/.claude/settings.json)
- Customizable blocklist: edit the hook script to add or remove patterns based on your safety requirements
- Claude receives an authority denial message when attempting blocked commands, preventing destructive operations
Tags
Related skills
| Skill | Installs | vs git-guardrails-claude-code |
|---|---|---|
| verification-loop | 1,343 | -232 |
| security-scan | 1,535 | -40 |
| xdrop | 1,460 | -115 |
| okx-dex-trenches | 1,360 | -215 |
| ultracite | 1,821 | +246 |
FAQ
- How many installs does git-guardrails-claude-code have?
- git-guardrails-claude-code has 1,575 total installs and 1.6K installs this week.
- Where is git-guardrails-claude-code hosted?
- git-guardrails-claude-code is published by @mattpocock/skills at https://github.com/mattpocock/skills.
- How many GitHub stars does git-guardrails-claude-code have?
- git-guardrails-claude-code has 10.6K GitHub stars.
- When was git-guardrails-claude-code first indexed?
- OrangeBot.AI first indexed git-guardrails-claude-code on Feb 10, 2026.
- How do I install git-guardrails-claude-code?
- Run: npx skills add https://github.com/mattpocock/skills --skill git-guardrails-claude-code