Auto Mode removes the confirmation step. Every tool call executes immediately. Without hooks, there is nothing between Claude and rm -rf /.
npx cc-safe-setup
This installs 8 hooks that catch the most dangerous operations:
| Hook | Blocks |
|---|---|
destructive-guard | rm -rf, git reset --hard, chmod 777 |
branch-guard | git push origin main, --force |
secret-guard | git add .env, credential files |
syntax-check | Saves with syntax errors (Python/JS/JSON) |
context-monitor | Warns at 70% context usage |
npm-publish-guard | Accidental npm publish |
response-budget | Runaway sessions (max responses) |
commit-msg-quality | Empty/low-quality commit messages |
npx cc-safe-setup --shield
Adds project-specific protections detected by scanning your codebase (database guards, Docker guards, framework-specific hooks).
CLAUDE.md rules are prompt-level suggestions. In Auto Mode with a full context window, Claude can and does ignore them. Hooks run at the process level — the model cannot bypass a hook that returns exit 2.
npx cc-safe-setup
667 hooks. 9,200+ tests. Works with Auto Mode.
cc-safe-setup · GitHub · rm -rf protection · force-push protection