Lightlines
By vinvcn

git-guardrails-claude-code

ZH
vinvcn5.1k installs

Block risky Git commands before Claude Code runs them.

What it does

Installs safety hooks that block dangerous Git commands before Claude Code executes them.

When to use it

Use when the user wants to prevent destructive Git operations or add Git safety hooks in Claude Code.

How to use it

Choose protection for the current project or all projects; it installs the hook and asks whether to customize the blocked patterns.

Uses

Latest review

What you need · 1

Requires jq to extract the command from the hook's JSON input.


Access · 2

This skill

.claude/settings.json

Write

Adds project Git safety hooks

~/.claude/settings.json

Write

Adds global Git safety hooks