Click your problem. Follow the steps. Fixed in 2 minutes.
npx github:yurukusa/cc-safe-setup --quickfix
ls -la ~/.claude/hooks/your-hook.shchmod +x ~/.claude/hooks/your-hook.sh#!/bin/bash#!/bin/bash as the very first linecat ~/.claude/settings.json | python3 -m json.tool | grep your-hook
npx github:yurukusa/cc-safe-setup --shield (auto-registers all hooks)"Bash" won't fire for Edit/Write"" (empty) to match all tools, or "Edit|Write" for file opswhich jqbrew install jq (macOS) or sudo apt install jq (Linux)echo '{"tool_input":{"command":"rm -rf /"}}' | bash ~/.claude/hooks/your-hook.sh; echo "Exit: $?"
echo '{"tool_input":{"command":"ls -la"}}' | bash ~/.claude/hooks/your-hook.sh; echo "Exit: $?"
ls, your grep pattern matches too much.grep -qE pattern in your hook. Add \b word boundaries.grep -qE '\brm\s+.*-rf\s+/' instead of grep -q 'rm'# Example: "Don't push to main" as a hook instead of a rule npx github:yurukusa/cc-safe-setup # Installs branch-guard
npx github:yurukusa/cc-safe-setup --create "your rule in plain English"
npx github:yurukusa/cc-safe-setup --install-example auto-approve-build # npm test, cargo build npx github:yurukusa/cc-safe-setup --install-example auto-approve-python # pytest, mypy npx github:yurukusa/cc-safe-setup --install-example auto-approve-git-read # git status, git log npx github:yurukusa/cc-safe-setup --install-example compound-command-approver # cd && git log
"permissions": {"allow": ["Bash(npm test)", "Bash(git status)", "Read(*)"]}
--profile standard includes auto-approve hooks for common commands.python3 -c "import json; json.load(open('$HOME/.claude/settings.json'))"
npx github:yurukusa/cc-safe-setup --quickfix
echo '{}' > ~/.claude/settings.json then re-run setupnpx github:yurukusa/cc-safe-setup --install-example error-memory-guard
npx github:yurukusa/cc-safe-setup --install-example loop-detector
npx github:yurukusa/cc-safe-setup --install-example token-budget-guard
CC_TOKEN_BUDGET and CC_TOKEN_BLOCK)npx github:yurukusa/cc-safe-setup --analyze
npx github:yurukusa/cc-safe-setup --install-example output-length-guard # Warn on large outputs npx github:yurukusa/cc-safe-setup --install-example large-read-guard # Warn before cat on large files npx github:yurukusa/cc-safe-setup --install-example compact-reminder # Suggest /compact after N calls
npx github:yurukusa/cc-safe-setup --team git add .claude/ git commit -m "chore: add team safety hooks"
.claude/hooks/ with relative paths. Works on any machine.npx github:yurukusa/cc-safe-setup --generate-ci
npx github:yurukusa/cc-safe-setup --migrate-from manual # See all existing hooks npx github:yurukusa/cc-safe-setup --health # Check hook health
npx github:yurukusa/cc-safe-setup --doctor โ full diagnosisnpx github:yurukusa/cc-safe-setup --quickfix โ auto-fix common issuesLearn more: Production Guide ยท All Tools