Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Sets up a Claude Code PreToolUse hook that blocks dangerous git commands like push, reset --hard, clean -f, and branch -D.
45% 86%+41 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 10 of 22 without it.
3 of 3 safety checks passed
Not used yet
Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.
git push (all variants including --force)git reset --hardgit clean -f / git clean -fdgit branch -Dgit checkout . / git restore .When blocked, Claude sees a message telling it that it does not have authority to access these commands.
Ask the user: install for this project only (.claude/settings.json) or all projects (~/.claude/settings.json)?
The bundled script is at: scripts/block-dangerous-git.sh
Copy it to the target location based on scope:
.claude/hooks/block-dangerous-git.sh~/.claude/hooks/block-dangerous-git.shMake it executable with chmod +x.
Add to the appropriate settings file:
Project (.claude/settings.json):
{
"hooks": {
Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.