Engineering

Git Guardrails Claude Code

Install PreToolUse hook to block dangerous git commands.

  • Gem

Use it when

If you want to change security rules into mechanical enforcement; you need to approve the scope before modifying hooks.

Install command

This is the command stored in the directory. Read the source, then run it on work you can undo.

npx skills add mattpocock/skills --skill git-guardrails-claude-code

Source

Inspect it before you install it

Treat the skill like a dependency. The directory entry is a shortlist, and the source is the thing you are about to run.

  • Read the instructions and any scripts before you grant tools, files, or credentials.
  • Test it on reversible work. Keep deploy, send, publish, and payment steps for a person.
  • Keep it when the output is easier to review. Remove it when it only adds steps.

Keep going