git-guardrails-claude-code
git-guardrails-claude-code is an agent skill published by mattpocock. It lives in the mattpocock/skills repository, which has 303,549 GitHub stars and is licensed under MIT; we last read it on 2026-09-16.
Blocks dangerous Git commands like push, reset --hard, clean, and branch -D in Claude Code to prevent destructive operations.
Install
skills is a generic installer for any repository of Claude agent skills -- it reads mattpocock/skills’s own structure rather than assuming one, the same way this page reads the skill’s own SKILL.md rather than assuming a format.
npx skills add mattpocock/skills
What it connects to
Unverified means a mention in the skill’s own description, not a citation. A wrong claim here costs nothing to correct and nothing to trust yet.
Maintenance
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
Common questions about git-guardrails-claude-code
- What does git-guardrails-claude-code do?
- Blocks dangerous Git commands like push, reset --hard, clean, and branch -D in Claude Code to prevent destructive operations.
- How do I install git-guardrails-claude-code?
- Run npx skills add mattpocock/skills. The skills installer reads the repository’s own structure, so it works for any repository of agent skills.
- Which AI clients can use git-guardrails-claude-code?
- Its own description mentions Claude Code. That is a mention in its description, not a test we ran.
- Who publishes git-guardrails-claude-code?
- mattpocock.
- Is git-guardrails-claude-code maintained, and what licence does it use?
- Its repository has 303,549 GitHub stars and its state in our directory is listed. Its last commit we recorded was on 2026-10-22. The repository declares the MIT licence.