All skills
git-guardrails-claude-code
Install a Claude Code hook that blocks dangerous git commands like push and reset --hard before they run.
- Part of mattpocock/skills
- 575k installs
- Developer Tools · Build and packaging
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.
More Build and packaging skills
See all- golang-dependency-management42.1kManages Go modules: adding, upgrading, and auditing dependencies, resolving conflicts, and vendoring.
- golang-continuous-integration41.5kSets up GitHub Actions pipelines for Go projects with tests, linting, security scans, and releases.
- gh-stack22.3kCreates, syncs, rebases and merges stacked pull requests, splitting multi-part work into reviewable branches.
- conventional-commit17.5kGuides you through writing standardized Conventional Commits messages with examples and validation.
Also in this pack
- grill-me1.6MInterviews you relentlessly to sharpen a plan or design before you commit to it.
- grill-with-docs1.4MInterviews you hard about a plan while also writing decision records and a glossary as you go.
- improve-codebase-architecture1.3MScans a codebase for structural improvement opportunities, shows them in an HTML report, then digs into your pick.
- tdd1.3MBuilds features and fixes bugs test-first, writing failing tests before code and refactoring after.