675 installable hooks. Each solves a real problem from GitHub Issues or autonomous operation. 9,200+ tests.
npx cc-safe-setup --install-example <name> # install one
npx cc-safe-setup --examples # list all
npx cc-safe-setup --examples safety # filter by category
npx cc-safe-setup --shield # install recommended set| Category | Count | Examples |
|---|---|---|
| Destructive Command Prevention | 14 | destructive-guard, branch-guard, no-sudo-guard, symlink-guard, shell-wrapper-guard, compound-inject-guard |
| Data Protection | 5 | block-database-wipe, secret-guard, hardcoded-secret-detector |
| Git Safety | 11 | git-config-guard, no-verify-blocker, push-requires-test-pass |
| Auto-Approve (PreToolUse) | 11 | auto-approve-readonly, auto-approve-build, auto-approve-docker |
| Auto-Approve (PermissionRequest) | 7 | allow-git-hooks-dir, allow-protected-dirs, edit-always-allow |
| Code Quality | 10 | syntax-check, diff-size-guard, test-deletion-guard |
| Security | 10 | credential-file-cat-guard, credential-exfil-guard, prompt-injection-guard |
| Deploy | 4 | deploy-guard, no-deploy-friday, work-hours-guard |
| Monitoring & Cost | 14 | context-monitor, cost-tracker, loop-detector, edit-error-counter, dotenv-watch |
| Utility | 20 | comment-strip, session-handoff, auto-checkpoint, edit-retry-loop-guard, direnv-auto-reload, pre-compact-checkpoint |
auto-approve-readonly— Skip prompts forcat,ls,grep,git statusdestructive-guard— Blockrm -rf,git reset --hardcredential-file-cat-guard— Block reading.netrc,.npmrc,.cargo/credentialspush-requires-test-pass— Blockgit push mainwithout passing testscontext-monitor— Warn at 40/25/20/15% context remaining
Using too many tokens? These hooks help monitor and reduce consumption:
token-budget-guard— Alert when session exceeds token budgetlarge-read-guard— Block reading files over 1000 linescontext-monitor— Track context window usage
For a complete guide: Token Book — cut token consumption in half with templates and measured data (¥2,500, chapter 1 free). Or try the free diagnostic.
See CONTRIBUTING.md.