git-guardrails-claude-code
Skill2 starsChanged 2 months agoNo licenceView on GitHub
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.
- Deletes or force-pushes
- Commits and pushes
56 other projects use a version of this, 44 of them edited; 5 of 38 edited versions we compared changed its rules.
How people change it
5 of 38 edited versions changed its rules.
Of the 38 edited versions we compared: 32 keep every rule, 1 is an older text, 5 made changes of their own.
Not in older versions
- Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.missing from 1 of 1
Rules people drop
- Run a quick test:dropped by 4 of 5
- Should exit with code 2 and print a BLOCKED message to stderr.dropped by 4 of 5
- Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.dropped by 3 of 5
- When blocked, Claude sees a message telling it that it does not have authority to access these commands.dropped by 2 of 5
- Add to the appropriate settings file:dropped by 2 of 5
- If the settings file already exists, merge the hook into the existing
hooks.PreToolUsearray. Don't overwrite other settings.dropped by 2 of 5 - Ask the user: install for this project only (
.claude/settings.json) or all projects (~/.claude/settings.json)?dropped by 1 of 5
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- mattpocock/skillsword for word, first seen Oct 8, 2026
- hmjBill/skillsedited, first seen Oct 5, 2026
- KroxiDev/engineering-skillsedited, first seen Oct 5, 2026
- snowfluke/engineering-skillsedited, first seen Sep 30, 2026
- chinkan/RustFoxword for word, first seen Sep 22, 2026
- Danceiny/skillsword for word, first seen Sep 20, 2026
Used with
Projects with it also use batch-grill-me.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
47thtechcornerSkillbatch-grill-me
A relentless interview that asks every frontier question at once, round by round.
Also in 4 projects that use this
Other versions56 projects use a version of this.
Word for word · 11
- mattpocock/skills★ 335k100% same
- tt-a1i/matt-skills-with-to-goal★ 182100% same
- VoDaiLocz/kilo-kit-mcp★ 27100% same
- chinkan/RustFox★ 9100% same
- aaaxn/skills★ 2100% same
- ElyzeSolutions/skills★ 1100% same
- Danceiny/skills★ 0100% same
- HungNth/agent-skills★ 0100% same
- jamesdebatty/skills★ 0100% same
- pgomezurrea-eng/claude-skills★ 0100% same
- Yass5002/agent-skills★ 0100% same
Edited · 44
- vinvcn/mattpocock-skills-zh-CN★ 4.6k33% same
- devcxl/mattpocock-skills-zh★ 42628% same
- amazingloft999-droid/mattpocock-skills★ 42299% same
- loulanyue/skills★ 23199% same
- aurorasoft2/Matt_Pocock_Skills★ 13399% same
- VisualxIntelligence/mattpocok-skills★ 5599% same
- leandrocfe/skills★ 3899% same
- neuron-one/GODMODE★ 3384% same
- officialunofficial/skills★ 723% same
- dekoza/oh-my-slop★ 470% same
34 more not listed
Wrote their own version · 1
- chrislacey89/skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository260 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-optimize/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-native-skills/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-view-transitions/AGENTS.mdAGENTS.md
- .claude/skills/composition-patterns/AGENTS.mdAGENTS.md
- .claude/skills/react-best-practices/AGENTS.mdAGENTS.md
- .claude/skills/react-native-skills/AGENTS.mdAGENTS.md
- .claude/skills/react-view-transitions/AGENTS.mdAGENTS.md
- .claude/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .claude/skills/vercel-optimize/AGENTS.mdAGENTS.md
- .claude/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- .claude/skills/vercel-react-native-skills/AGENTS.mdAGENTS.md
- .claude/skills/vercel-react-view-transitions/AGENTS.mdAGENTS.md
- .agents/skills/caveman-learn/CLAUDE.mdCLAUDE.md
- .claude/CLAUDE.mdCLAUDE.md
- .claude/skills/caveman-learn/CLAUDE.mdCLAUDE.md
- agent-browserSkill
- andrej-karpathy-skillsSkill
- ask-mattSkill
- cavecrewSkill
- caveman-commitSkill
- caveman-compressSkill
- caveman-discoverSkill
- caveman-evidence-reviewSkill
- caveman-exploreSkill
- caveman-helpSkill
- caveman-learnSkill
- caveman-manageSkill
- caveman-optimizeSkill
- caveman-reviewSkill
- caveman-setupSkill
- cavemanSkill
- caveman-statsSkill
- claude-handoffSkill
- codebase-designSkill
- code-reviewSkill
- deploy-to-vercelSkill
- design-an-interfaceSkill
- diagnoseSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- edit-articleSkill
- find-skillsSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- higgsfield-brandkitSkill
- higgsfield-generateSkill
- higgsfield-marketplace-cardsSkill
- higgsfield-product-photoshootSkill
- higgsfield-soul-idSkill
- higgsfield-video-explainerSkill
- higgsfield-websitesSkill
- higgsfield-youtube-thumbnailSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 5 are common, 0 are distinctive, and 2 are very specific to this project.
5
Common
Most of the 39 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
No licence file, so all rights are reserved — read it at the source. We count its rules but don't quote them. Read them on GitHub.
“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

