Git Guardrails Claude Code
Sets up hooks that block dangerous Git commands before they run. Review the rules: they can also block wanted commands like push.
How to use it
Install it with the open Skills CLI (needs Node.js), then restart your agent:
npx skills add mattpocock/skills --skill git-guardrails-claude-code- Download the ZIP from this page and unzip it.
- Put the
git-guardrails-claude-codefolder in.claude/skills/inside your project (or~/.claude/skills/for all projects). - Restart Claude Code and call it with
/git-guardrails-claude-code.
بالعربي
يجهز Hooks لمنع أوامر Git الخطرة قبل التنفيذ؛ يجب مراجعة القواعد لأنها قد تمنع أوامر مطلوبة مثل push.
More for git
- Using Git Worktrees: Isolates work in its own Git worktree, with checks on the path and a safe project setup.
- Finishing a Development Branch: Wraps up a development branch once tests pass, with clear choices to merge, open a review or park the work.