⚠️ June 15, 2026: Anthropic splits programmatic billing. Decide stay / switch / hybridize →

cc-safe-setup

Make Claude Code safe for autonomous operation
707
hooks
56
commands
9,200+
tests
28
web tools
One command. 30 seconds. No npm dependencies (needs jq).
🚨 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 github:yurukusa/cc-safe-setup --shield now.
Get Started
1
Run npx github:yurukusa/cc-safe-setup --shield, installs hooks, detects your stack, generates CLAUDE.md
2
Run npx github:yurukusa/cc-safe-setup --verify, confirms all hooks block correctly
3
For teams: npx github:yurukusa/cc-safe-setup --team, commit .claude/ to share with everyone
June 15 Preparation Tools
📊
Hitting Max Limits Too Fast — You or the Platform?
The #1 Max complaint cluster (#16157, 720+ reactions). 20-second check: how much of your fast quota burn is self-caused (shared quota, Opus, big context) versus a possible anomaly worth reporting. Shareable card, browser-only.
new
📖
Why Am I Hitting Usage Limits So Fast on Max?
The full explainer behind the burn check: why you can't see your real quota, the version boundaries where consumption changed, the false "Usage credits required for 1M context" gate and how to clear it, what you can measure free, and when it's a platform report worth filing.
guide
How I Made Claude Code Cheaper — the 5 Changes That Worked
Field notes from an 800-hour run: the five small habits that reliably brought the bill down and kept sessions calm — fresh session per task, Sonnet for routine work, compacting on purpose, watching the numbers, and a lean context. Each is a win you can copy today, free.
wins
June 15 Cliff — Are You Exposed?
20-second check: does the June 15 programmatic-billing split hit you? See your plan's new credit cap, a live countdown, and a shareable exposure card. Browser-only.
new
🔬
June 15 Cliff Exposure — from your real logs
The precise version: drop your ~/.claude/projects logs and it splits your usage into interactive (Pool 1) vs programmatic (Pool 2) by the entrypoint your sessions actually recorded — not a guess. Browser-only, nothing uploaded.
new
💰
June 15 Pool 2 Estimator
5-minute self-assessment: paste your past-30-day usage, get estimated monthly cost after June 15 with Pool 1 / Pool 2 split. Browser-only, no signup, no telemetry.
free tool
📋
June 15 Readiness Audit (10-question)
10-question audit returns a readiness score (0-100) with each gap mapped to a specific Migration Playbook chapter. Browser-only, no signup.
free tool
🔥
Three Cost Catastrophes (May 22-24)
Structural analysis of $47K/3-day subagent runaway, 887K-tokens/min parallel-49 burn, and $6K-overnight cache-TTL surprise. Three operator-side preventions mapped to PR #298, #286, #283.
analysis
📘
21-Day Preparation Checklist (EN)
7-step preparation checklist, hook patterns for closure-claim arrest and budget gates, parallel-agent cost reality, and the four official-doc blind spots. CC BY 4.0, ~1,800 words.
checklist
Sub-Agent Observability Handbook · Ships May 27
📗
Sub-Agent Observability Handbook ($19)
Four sub-patterns of sub-agent failure articulated from the May 20-22 cluster of 7 independent reports (#60987, #61102, #61107, #61167, #61315, #61405, #61547). Operator-side defense hooks for each sub-pattern, mapped to cc-safe-setup PR #283, #286, #298, #282. Chapter 1 free as a Gist preview.
ships 2026-05-27
Latest: Critical Safety Fixes
🔓
Claude Code ignores my allow/deny rules and prompts anyway?
A permission rule that silently doesn't match is worse than no rule. Windows path normalization, settings precedence, the UI mode overriding defaultMode — and how to see your real rules with /permissions.
new
🚦
"Server is temporarily limiting requests (not your usage limit)"?
The 529 overload vs. a real usage limit vs. 429 acceleration limits — how to tell them apart, confirm with /usage, and what you actually can (and can't) do.
new
🎭
Opus 4.8 fabricates tool results?
When Opus 4.8 reports output for a tool that never ran — the parallel-cancellation trigger, how to spot a fabricated "done", and the operator-side fixes (#63538, #63884).
new
🔎
Fabrication / false-completion self-audit
When Claude Code says "done" or "tests passed" — would your setup catch it if that weren't true? 8 questions → a 0-100 score for your defenses, with the hook pattern that closes each gap (#33781, #44955, #27430).
new
🚫
Blocked as a "cyber" policy violation?
Legitimate firmware/sysadmin/security work false-positived, then the whole session dies and bills you for the restart. Why it happens, how to keep working, and the refund framing (#64405, #61185).
new
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
日本語の道具 — 貼って、自分の数字を見る
🔬
トークン消費の詳しい診断
/cost の出力と settings.json と CLAUDE.md を貼ると、費用の内訳・キャッシュの効き方・CLAUDE.md が毎回載せている常駐コストが出ます。日本語の文字数で数えるので、実際より軽く出ません。
日本語・無料
📐
SKILL.md トークン自己診断
SKILL.md は、そのスキルが発火しなくても毎セッション文脈に載ります。1つ貼ると、毎回かかる常駐トークンと、外へ出せる重い塊が分かります。
日本語・無料
🪤
そのリポ、罠かも — 設定の危険度スキャナ
拾ってきたリポを「信頼しますか」で はい と押す前に。.claude/settings.json と .mcp.json を貼ると、hook の自動実行・鍵の漏洩・MCP の自動起動を赤黄緑で判定します。
日本語・無料
🕳️
その deny、どこが素通りするか
permissions.deny に .env や鍵を書いても、cat や python 経由では抜けられます。自分の deny ルールを貼ると、守れているものと素通りするものが並びます。
日本語・無料
🧟
背景 worker ゾンビ・チェッカー
claude daemon status の出力を貼ると、止めたはずの背景の作業が生き残っていないか、自動更新で孤児になっていないかを判定します。
日本語・無料
📊
どの版が tool call の解析失敗を起こしやすいか
自分のログ(.jsonl)を読み込ませると、tool call could not be parsed が CLI の版ごとに何回起きたかを集計します。最悪の版は環境ごとに違うので、自分の実績で選べます。
日本語・無料

上の6つは、どれもブラウザの中だけで動きます。貼った内容や読み込んだログはどこにも送信されません(外部への通信の経路を持っていないことを確認済み)。

日本語ガイド — 実際の事故を防ぐ
🔓
権限ルールが効かない・毎回確認が出るとき
allow/deny を書いたのに無視される。設定したつもりで守られていないのは、ルールが無いより危険。Windows のパスの正規化・優先順位・モードの上書きの原因と、/permissions での確認の仕方。
日本語
🛑
「調べて」が勝手な変更に化けるとき
原因の調査だけ頼んだのに、確認なしで docker restart や ALTER SYSTEM、マイグレーションを実行してしまう。「原因を見つけた=直してよい」で読み書きの境界が崩れる原因と、PreToolUse の hook で読み取り専用を強制する防ぎ方。
日本語
利用枠がすぐ尽きるとき
$200 を払って作業の途中で締め出される前に。何が枠を食っているか調べて長持ちさせる、公式に基づく検証済みの方法。
日本語
💸
課金の暴走を防ぐ
利用枠を数分で使い切る前に、トークンと Actions の暴走を止める。
日本語
🗑️
rm -rf でファイルが消える前に
Claude Code の rm -rf 事故を、実行の前に確認で止める。
日本語
💣
本番データベースを消させない
DROP DATABASE / DELETE の暴走を、実行の前に止める。
日本語
↩️
git reset --hard で作業が消える前に
未コミットの変更が消える事故を防ぐ。
日本語
🔑
認証情報を漏らさせない
鍵・トークンの読み取りと流出を止める。
日本語
🐌
急に遅い・固まる・落ちる
一時ファイルとログの蓄積が原因のときの、原因と直し方。
日本語
🔌
MCPが動かない・無視される
設定したのにツールが出ない。最大の原因は承認待ち。/mcpで切り分ける手順。
日本語
🚫
アカウントが突然停止された時に
停止・凍結の原因と対処。公式の出典つき。
日本語
🛡️
「Usage Policy違反」で止まり続ける
回復できるか、報告するしかないかを切り分ける。
日本語
🔍
実際にどのモデルで動いたか
固定したはずのモデルが揺れるとき、ログから検証する。
日本語
安全運用の総まとめ
事故を防ぐ設定の全体像(日本語)。
日本語
Tools & Documentation
⏮️
/rewind Deleted My Code — Recover It
Pressed Esc Esc and the default "Restore code and conversation" wiped your edits (#64615)? Exactly what /rewind can and can't touch, how to recover from git now, and the free hook that makes any rewind recoverable.
new
🏅
Safety Scorecard
Check the protections you have, get an honest X/8 coverage card you can screenshot and share. Runs in your browser.
new
🔗
AGENTS.md Interop Scorecard
Does every AI tool actually read your one AGENTS.md? Get an honest X/6 interop score you can screenshot and share. For the #6235 pain.
new
🎯
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. Delivered around the 15th of each month; each issue has a free preview chapter.
¥500/mo
📖
CC Safety Lab — May 2026 Part 1 Full Preview (HTML)
Free 6,000-character HTML preview of the May 2026 Safety Lab Part 1: nine incident articulations (cache_control, usage display, Cowork, Worktree, Skill, UI, client switching, child worker identity leak, 2.1.126 silent regression). HTML companion to the Gist preview; better suited for non-technical readers comparing the depth of monthly content.
free preview
📅
CC Safety Lab — June 2026 Part 1 Full Preview (HTML)
Free 6,500-character HTML preview of the June 2026 Safety Lab Part 1: the June 15 billing cliff preparation guide with 7 ordered steps (receipt-notice readiness, automation inventory, current-usage baseline, pre-flight check protocol, ceiling-stop instrumentation, official-key switch decision, before/after diff capture) and 3 warning omens (OAuth-key misuse, asking the model about billing, missing the receipt email). Pairs with the May 2026 preview for back-to-back depth comparison.
free preview · 15 days to cliff
📊
CC Safety Lab — July 2026 Part 1 Full Preview (HTML)
Free 6,500-character HTML preview of the July 2026 Safety Lab Part 1: the overengineering complexity trap, articulated from thecatfix's 16-month 62-issue corpus (2,109 plan documents, 19% implementation rate, 968M tokens over 4 months, 60 agents spawned in 5 days then deleted). Three self-checks (plan-to-implementation ratio, agent-to-output ratio, design-doc-to-runtime ratio) and three warning omens (future-extension vocabulary frequency, daily agent-spawn spike, articulation-verb accumulation). Detection requires cumulative metrics — single-incident inspection cannot surface this failure mode.
free preview · 7-min read
📊
CC Safety Lab — August 2026 Part 1 Full Preview (HTML)
Free 6,500-character HTML preview of the August 2026 Safety Lab Part 1: the Pro / Max 5x / Max 20x quota anomaly cluster (10 issues totaling ~2,200 reactions). Three independent root-cause paths (server-side cache_creation inflation per Issue #46917 — 49,726 to 69,922 tokens between v2.1.98 and v2.1.100; parallel sub-agent fan-out; session-start context cascade). Three self-diagnostic steps (ccusage rollups, jsonl jq analysis, per-minute token rate calculation) and three defensive hooks (cache-creation-drift-detector, quota-anomaly-detector, session-rate-monitor) covering the three paths independently.
free preview · 7-min read
📅
June 15 Billing Cliff — 16-Day Daily Checklist
Day-by-day preparation guide for the 2026-06-15 Claude Code Pool 1 / Pool 2 billing split. Four phases (baseline / decision framework / preparation / final readiness), one 5-10 minute task per day from May 30 through June 14, plus a Day 0 action plan. Industry signals: 12x cost multiplier for light loads, 150x+ for heavy Sonnet automation. Pairs with Migration Playbook for the decision framework.
urgent · 16 days
💳
Billing Incident Early Detection — 5 Verifications
Six-issue corroborated cluster: unauthorized Gift Max charges, silent Pro/Max downgrades, double-charges, promo misapplication. Three pattern axes (A: unauthorized Gift Max, B: silent downgrade + double-charge, C: promo misapplication). Five user-side early-detection steps from monthly check through chargeback escalation. Issues #51168/#62461/#41581/#56895/#61339/#54133 cited; corroborated against Capterra/The Register/Trustpilot reviews.
incident response
📚
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
🎯
Which book selector v2 — 4 books + monthly add-on
Updated 5-question selector that covers all four current paid books (Migration Playbook, Claim-Verify Handbook, Sub-Agent Observability Handbook, Incident Postmortems) and surfaces the CC Safety Lab monthly subscription as an add-on when applicable. Browser-only, no signup.
free selector
🗺️
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
MIT licensed. No npm dependencies (needs jq).
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 →