git-guardrails-claude-code
Installation
SKILL.md
Setup Git Guardrails
Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.
Invocation Position
This is an infrastructure safety skill, not a feature-delivery step.
Use /git-guardrails-claude-code when the project or user wants stronger protection against destructive git operations in Claude-driven workflows.
Do not treat it as part of the normal feature pipeline. It is a repo or user setup action that makes later work safer.
What Gets Blocked
git push --force/git push -f(regular pushes are allowed)git reset --hardgit clean -f/git clean -fdgit branch -Dgit checkout ./git restore .