git-guardrails-claude-code

Installation
SKILL.md

Setup Git Guardrails

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

Invocation Position

This is an infrastructure safety skill, not a feature-delivery step.

Use /git-guardrails-claude-code when the project or user wants stronger protection against destructive git operations in Claude-driven workflows.

Do not treat it as part of the normal feature pipeline. It is a repo or user setup action that makes later work safer.

What Gets Blocked

  • git push --force / git push -f (regular pushes are allowed)
  • git reset --hard
  • git clean -f / git clean -fd
  • git branch -D
  • git checkout . / git restore .
Installs
5
GitHub Stars
2
First Seen
Apr 7, 2026
git-guardrails-claude-code — chrislacey89/skills