What it does. A Claude Code PreToolUse hook script. It reads the hook’s JSON from stdin, takes .tool_input.command with jq, and checks it against a list of regular expressions (git push, git reset –hard, git clean -fd, git clean -f, git branch -D, git checkout ., git restore ., push –force, reset –hard). On a match it prints a “BLOCKED:” message to stderr and exits with code 2, which blocks the command; otherwise it exits 0. It needs jq, which SKILL.md does not mention.
Why it’s here. Step 2 says “The bundled script is at: scripts/block-dangerous-git.sh” and has the agent copy it to .claude/hooks/ or ~/.claude/hooks/, register it under hooks.PreToolUse with the Bash matcher, and test that it exits with code 2.