git-guardrails-claude-code
Originally frommattpocock/skills
Installation
SKILL.md
Git Guardrails for Claude Code
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.
This skill is imported from mattpocock/skills (MIT) and is model-invoked upstream.
When to use this skill
- 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.
Instructions
Setup Git Guardrails
Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.