Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

git-guardrails-claude-code

Install a Claude Code hook that blocks dangerous git commands like push and reset --hard before they run.

When to use it

You're about to let Claude Code run git commands in a repo and want to stop it from pushing or wiping changes.

For example

You say

Use git-guardrails-claude-code to set up the hook for this project only, and also block git rebase.

You get
  • Hook script in .claude/hooks
  • PreToolUse entry in .claude/settings.json
  • Blocked-command test result

How it works

  • You choose project-only or all-projects scope, and the hook is merged into existing settings rather than overwriting them.
  • The blocked list can be customized to add or remove commands.

Before installing

Requires Claude Code, since the guardrail is a PreToolUse hook configured in its settings files.

This skill includes a script your assistant may run on your computer.