📦

Setup Git Guardrails

git-guardrails-claude-code

SecurityAutomationMatt Pocock

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.

Installation

npx skills add https://github.com/hwj123hwj/custom-skills --skill git-guardrails-claude-code

Description

Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.