What problem does it solve?
Accidental execution of destructive git commands in Claude Code can cause irreversible data loss, disrupt team workflows, and waste hours of development work. This skill eliminates that risk by adding pre-execution guardrails that intercept dangerous git operations before Claude runs them.
Core Features & Use Cases
- Pre-Execution Command Blocking: Intercepts and blocks high-risk git commands including all push variants, git reset --hard, git clean, git branch -D, and destructive checkout/restore operations before Claude executes them.
- Flexible Installation Scope: Supports both project-specific setup stored in the project's .claude directory and global setup applied to all Claude Code projects on your system.
- Customizable Block List: Lets you add or remove command patterns to match your team's specific workflow requirements.
- Use Case: Development teams using Claude Code for git operations can use this skill to prevent accidental force pushes to production branches or irreversible resets that could wipe weeks of collaborative work.
Quick Start
Ask the AI to install git guardrails for your current Claude Code project to block dangerous git commands like force push and hard reset before they run.