Skip to main content
Back to registry

git-guardrails-claude-code

mattpocock/skills

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

Installs439
Install command
npx skills add https://github.com/mattpocock/skills --skill git-guardrails-claude-code
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykPASS
About this skill
Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them. When blocked, Claude sees a message telling it that it does not have authority to access these commands. Ask the user: install for this project only ( .claude/settings.json ) or all projects ( ~/.claude/settings.json )? The bundled script is at: scripts/block-dangerous-git.sh Copy it to the target location based on scope: Make it executable with chmod +x . Add to the appropriate settings file: Project ( .claude/settings.json ): Global ( ~/.claude/settings.json ): If the settings file already exists, merge the hook into existing hooks.PreToolUse array — don't overwrite other settings. Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly. Run a quick test: Should exit with code 2 and print a BLOCKED message to stderr.

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does git-guardrails-claude-code do?

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

Is git-guardrails-claude-code good?

git-guardrails-claude-code does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does git-guardrails-claude-code work with?

git-guardrails-claude-code currently lists compatibility with codex, gemini-cli, opencode, kimi-cli, amp, github-copilot.

What are alternatives to git-guardrails-claude-code?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install git-guardrails-claude-code?

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

Related skills

More from mattpocock/skills

Related skills

Alternatives in Software Engineering