๐Ÿš€ We're launching on Product Hunt, April 21! Follow us โ†’

cc-safe-setup

Make Claude Code safe for autonomous operation
707
hooks
56
commands
9,200+
tests
28
web tools
One command. 30 seconds. Zero dependencies.
๐Ÿšจ Opus 4.7 Alert: Auto mode safety classifier hardcoded to 4.6, not working on 4.7. 23+ data loss incidents in 3 days (50GB lost). Hooks are model-independent, run npx cc-safe-setup --shield now.
Get Started
1
Run npx cc-safe-setup --shield, installs hooks, detects your stack, generates CLAUDE.md
2
Run npx cc-safe-setup --verify, confirms all hooks block correctly
3
For teams: npx cc-safe-setup --team, commit .claude/ to share with everyone
Latest: Critical Safety Fixes
โšก
3 Hooks That Make Claude Code Faster
Auto-approve safe git, project reads, and test runs. ~60% fewer permission prompts.
speed
๐Ÿ›ก๏ธ
5 Hooks Every User Should Install
rm -rf blocker, force-push guard, secret leak prevention, compaction breaker, token saver. Copy-paste ready.
guide
๐Ÿ—‘๏ธ
Stop Claude Code from Deleting Your Files
50 GB destroyed, SSH keys wiped, production databases killed. One hook prevents all of it.
critical
๐Ÿ’€
Auto-Compact Death Spiral Fix
15+ compactions overnight consumed entire budget. Circuit breaker hook stops it in 30 seconds.
critical
๐Ÿง 
Extended Thinking: 16M Tokens in 25 Min
Thinking phase consumed entire quota with no output. Stall detector hook catches it early.
critical
Tools & Documentation
๐ŸŽฏ
Attack Simulator
Paste your settings.json. Watch 10 real attack scenarios play out. See what your hooks catch, and what slips through.
new
โšก
Risk Assessment
5 questions, 30 seconds. How exposed is your Claude Code setup? Based on 90 real incidents.
๐Ÿ“‹
Incident Tracker
90 real safety incidents from GitHub Issues. Filter by category, severity, and date.
๐Ÿš€
Getting Started
Safe in 5 minutes. Step-by-step for beginners. No coding required.
start here
๐Ÿ“Š
Token Checkup
Max Plan running out too fast? 5 questions to diagnose why. Free.
popular
๐Ÿ”ฌ
Token Audit
Paste /cost output + settings.json for deep analysis. Cache efficiency, safety score, hook recommendations.
NEW
๐Ÿ”
Opus 4.7 Safety Scanner
Paste settings.json โ†’ instant check for 7 known Opus 4.7 vulnerabilities.
NEW
๐Ÿšจ
Opus 4.7 Survival Guide
4x token burn, 50GB data loss, classifier bugs. Hooks and fixes for every known issue.
NEW, April 2026
๐Ÿ’€
Data Loss Crisis Report
65+ bugs tracked. 50GB+ lost. Classifier failure, cache destruction, 4x token burn. Full analysis.
NEW
โฌ‡๏ธ
Opus 4.7 Downgrade Guide
Pin Claude Code to Opus 4.6. 4 methods: CLI, settings.json, project config, alert hook.
NEW
๐Ÿ’ฐ
Opus 4.7 Cost Estimator
How much is the 4.7 upgrade costing you? Input your usage โ†’ estimated cost increase.
NEW
๐Ÿ“‰
Token Optimization Guide (English)
Cut your token bill in half. 800 hours of data. CLAUDE.md patterns, hooks, model selection. Opus 4.7 updated.
NEW
๐Ÿ’ด
Token Saving Guide (ๆ—ฅๆœฌ่ชž)
800ๆ™‚้–“ใฎ้‹็”จใƒ‡ใƒผใ‚ฟใซๅŸบใฅใใƒˆใƒผใ‚ฏใƒณ็ฏ€็ด„ใ‚ฌใ‚คใƒ‰ใ€‚Opus 4.7ๅฏพๅฟœใ€‚
new
๐Ÿ“
CLAUDE.md Guide
3 rules to cut token costs by 40%. Before/after examples and templates.
new
๐Ÿ”ฌ
Cache Health
Paste /cost output โ†’ instant cache diagnosis. Detects #46917 inflation bug.
๐Ÿท๏ธ
Version Check
Is your Claude Code version affected by cache inflation (#46917) or TTL regression (#46829)?
new
๐Ÿ›ก๏ธ
Security Checkup
6 questions to find vulnerabilities. Based on $1,800+ in real losses (April 2026).
new
๐Ÿ”
Safety Audit
Score your Claude Code setup out of 100. Find gaps and get fix suggestions.
interactive
โœˆ๏ธ
Pre-Flight Checklist
14-point checklist before autonomous operation. Interactive, printable, shareable.
new
๐Ÿณ
Recipes
Real problems โ†’ copy-paste solutions. Permission fatigue, silent edits, syntax errors, each with a working hook.
new
๐Ÿ”
Validator
Paste your settings.json โ†’ get instant score, error detection, and improvement suggestions.
new
๐Ÿ”
Permission Checker
Paste settings.json โ†’ find broken paths, missing scripts, Windows backslash issues. Fix "Permission denied".
new
๐ŸŽฎ
Playground
Write hooks, test with sample inputs, see results instantly. Browser-based hook IDE.
new
๐Ÿ“‹
Cheat Sheet
30+ copy-paste hook patterns. Block, approve, monitor, with one-click copy.
reference
๐ŸŽฏ
Hook Selector
Answer 5 questions. Get your personalized safety hook setup in 30 seconds.
wizard
๐Ÿ”Ž
Symptom Search
Type the error message or version you are hitting. Searches 109 incident write-ups, fix recipes, and prevention hooks.
search
๐Ÿ”
Hook Gap Analyzer
Paste your settings.json. Find which safety hooks you're missing. Get install commands.
new
โœ…
settings.json Validator
Detect common hook configuration mistakes: wrong exit codes, missing jq, invalid event types.
new
๐Ÿ“–
Token Book (ยฅ2,500)
Cut token consumption in half, save $20-80/month on Max plan. 10 chapters, 800+ hours of data, copy-paste templates. Ch.1 free.
April 2026
๐Ÿ“•
Incident Postmortems, FREE Preview
Incident 1 of 10: The 1h to 5m Cache TTL Silent Downgrade. Full book live on Gumroad since 2026-05-05 (see product page for current price), 10 production Claude Code failures reverse-engineered from Issues #46829/#52648/etc with detection hooks.
free preview
๐Ÿ“ฐ
CC Safety Lab, Monthly Membership
Monthly Claude Code incident digest. 4-8 new incidents per issue, fix-it hooks, safety checklist, product updates. ยฅ500/month, Founder pricing locked. May 2026 issue ships 2026-05-05.
ยฅ500/mo
๐Ÿ“š
Operations Suite: Three books for three layers
Curation page for Migration Playbook (decide), Token Book (cost control), and Incident Postmortems (forensics). Reading paths for the burn debugger, switch decider, and incident survivor. Each book is sold separately on Gumroad. Live since 2026-05-05.
new
โ“
Which book should you read first?
Five-question interactive quiz. Two minutes. No email. Tells you whether to start with Migration Playbook, Token Book, or Incident Postmortems based on your situation right now.
free quiz
๐Ÿ—บ๏ธ
Operations Pain Map
Twelve specific operational pains observed in May 2026 (5-hour quota burn, sub-agent identity leak, DROP DATABASE incident, hybrid delegation, and more) with each one mapped to a free article and the book that solves it.
free guide
๐Ÿ”€
Claude Code alternatives in May 2026
Cursor, Cline, Codex CLI, Aider, DeepSeek wrapper compared on release cadence, pricing, ideal user. Plus the five questions that decide stay vs hybrid vs switch.
free comparison
๐Ÿ’ธ
Opus 4.7 Cost Impact
Calculate how much Opus 4.7 bugs are costing you. Shows hidden token overhead from 5 known issues.
new
โšก
Effort Level Calculator
How much are you overpaying? Opus 4.7 defaults to xhigh, switch to save 30-50%.
new
๐Ÿ”Œ
Outage Recovery
3 hooks that saved work during April 6-8 outages. Auto-checkpoint, session backup, periodic commit.
guide
๐Ÿ’ฐ
Cost Calculator
Opus 4.6 vs 4.7 cost comparison (+35%). See where tokens go. 800h data.
new
๐Ÿ“
CLAUDE.md Analyzer
Paste your CLAUDE.md. See token cost per turn, find waste patterns, get optimization tips.
diagnostic
๐ŸŽฏ
Quality Hooks
Detect lazy rewrites, skipped reads, and untested commits. Based on 6,852-session analysis.
guide
๐Ÿ”ง
Hook Builder
Describe what you want in English. Get a working hook + settings.json entry.
generator
โšก
By Example
10 real GitHub Issues. See the before (disaster) and after (hook saves it).
learn
๐Ÿ“Š
Hook Matrix
All hooks in a sortable, filterable table. Find exactly what you need.
interactive
๐Ÿ“‰
Token Consumption Fix
Max Plan running out too fast? Diagnose and fix hidden token sinks with two hooks.
popular
โ“
FAQ
15 questions answered. How hooks work, performance, debugging, and more.
reference
โœ…
Auto-Approve Guide
Skip permission prompts for safe commands. Read-only, build tools, git, with PermissionRequest hooks.
popular
๐Ÿ”‘
Credential Protection
Three-layer defense: block reading .netrc/.npmrc, stop credential hunting, catch hardcoded secrets.
security
โš™๏ธ
Settings Reference
Every settings.json field explained. Hooks, permissions, env, models.
reference
โšก
Events
PreToolUse, PostToolUse, Stop, UserPromptSubmit, when each fires and what it can do.
reference
๐Ÿšฆ
Exit Codes
Exit 0 = allow. Exit 2 = block. Plus the bash syntax error trap that can lock your session.
critical
๐Ÿ”ง
Troubleshooting
10 common problems with step-by-step fixes. Hook not firing? Start here.
debug
๐Ÿค”
Which Hook?
Answer 2-3 questions โ†’ get the exact hook you need. No knowledge required.
interactive
๐Ÿงฑ
10 Patterns
Block, Approve, Warn, Log, Validate, Protect, Limit, Checkpoint, Enforce, Recover.
reference
โš ๏ธ
Common Mistakes
7 mistakes that cause real incidents. Syntax error lockout, broad matchers, missing jq.
debug
โš–๏ธ
Compare
Manual setup vs cc-safe-setup vs do nothing. 15 criteria compared.
decision
๐Ÿ”€
Migration Guide
Moving from Cursor, Windsurf, Aider, or Copilot? Map your safety setup.
guide
๐ŸŽฎ
Playground
Type any command, see which hooks fire. Test before you install.
interactive
๐Ÿ”ง
Fix git show --no-stat
Auto-fix the invalid --no-stat flag bug. 44 reactions on GitHub.
fix
๐Ÿ“‹
CLAUDE.md Rule Protection
Stop rules from being ignored after compaction. Re-inject CLAUDE.md automatically.
compliance
๐ŸงŠ
Disable Auto-Compaction
Block or conditionally control auto-compaction. 42 reactions.
control
๐ŸŒ
WebFetch Domain Fix
Fix broken domain:* wildcard matching in sandbox mode. 46 reactions.
fix
๐Ÿš
.bashrc Agent Hang Fix
Detect .bashrc patterns that freeze agent-spawned shells (Angular, nvm, conda).
fix
๐Ÿ”’
Bash Domain Allowlist
Block curl/wget to unauthorized domains. Defense-in-depth for sandbox gaps.
fix
Also Available
GitHub Repository
Source code, issues, releases. Star if useful.
npm Package
10,000+ daily downloads. Zero dependencies.
Hook Registry
70 hooks from 7 projects. Search, browse, install.
Need expert help? Get a professional safety audit
Full review of your settings.json, CLAUDE.md, and hooks. Custom recommendations from 800+ hours of real operation.
Safety Audit (from $50) โ†’
Go deeper, written by a non-engineer who spent 800+ hours with Claude Code
Real incidents, real data, real fixes. Not theory, everything comes from actual autonomous operation.
Token Book ยฅ2,500, Cut consumption in half โ†’ Safety Guide ยฅ800, 4 copies sold โ†’