git-guardrails-claude-code
git guardrails claude code
What it does
- git push (all variants including --force)
- git reset --hard
- git clean -f / git clean -fd
- git branch -D
- git checkout . / git restore .
- Project: .claude/hooks/block-dangerous-git.sh
- Global: ~/.claude/hooks/block-dangerous-git.sh
Requirements & configuration
Configuration: CLAUDE_PROJECT_DIR
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
git-guardrails-claude-code FAQ
What does the git-guardrails-claude-code skill do?
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. git push (all variants including --force) git reset --hard
How do I install git-guardrails-claude-code?
Run: npx -y skills add https://github.com/mattpocock/skills --skill git-guardrails-claude-code --agent claude-code — the source lives at github.com/mattpocock/skills.
Maintain git-guardrails-claude-code?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/mattpocock-skills-git-guardrails-claude-code?ref=badge) npx agentictools info skills/mattpocock-skills-git-guardrails-claude-code The second line is the CLI lookup for this page — handy in READMEs and docs.