SKILL507.8K installs304.2K

Git Guardrails Claude Code

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

Type
Skill
Author
mattpocock
Category
Git Workflow
GitHub stars
304.2K
Installs
507.8K
Last updated
November 1, 2026

Install

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

Use cases


Frequently Asked Questions

What does this skill set up?

It sets up Claude Code hooks to block dangerous git commands.

What kind of commands does it block?

It blocks commands such as push, reset --hard, clean, and branch -D.

Where are these safety hooks added?

It adds git safety hooks specifically within Claude Code.


About this skill

Sets up Claude Code hooks that block dangerous git commands such as push, reset --hard, clean, and branch -D before they execute. It is useful for preventing destructive git operations in an agent-assisted workflow. It adds git safety hooks specifically within Claude Code.

Summary written with AI assistance from the project's public description.


Categories


More from mattpocock


Similar Skills