Claude-Code-Token-Saving-Checklist.md
April 20, 2026 ยท View on GitHub
Your Claude Code bill is too high. Here are 15 things to check, in order of impact.
wc -c ~/.claude/CLAUDE.md
Why: CLAUDE.md is injected into every API call. A 500-line file costs ~$2/day in hidden token overhead.
Why: Since v2.1.100, Claude Code injects ~20K invisible tokens per call (#46917, 196๐).
grep -c "Agent" ~/.claude/projects/*/CLAUDE.md 2>/dev/null
Why: Each subagent gets its own context window. 5 subagents = 5x the cost (#46968).
Why: Idle sessions burn 15-18% of daily quota doing nothing (#50389).
claude --version
npm i -g @anthropic-ai/claude-code@2.1.98
// settings.json
{
"preferences": {
"thinkingBudgetTokens": 5000
}
}
Claude loves to rewrite entire files. Use Edit tool instead of Write.
npx cc-safe-setup
If compaction triggers every 15 minutes, your context is growing too fast. Images, PDFs, and binaries cost 1000s of tokens for zero value.
{
"hooks": {
"PreToolUse": [{
"matcher": "Read",
"hooks": ["bash ~/.claude/hooks/large-file-guard.sh"]
}]
}
}
- Token Checkup โ 30-second diagnostic (paste /cost output)
- CLAUDE.md Analyzer โ see how many tokens your instructions cost
- Cost Estimator โ calculate real Opus 4.7 costs The Token Book (ยฅ2,500) covers 31 diagnostic patterns with real cost data from 800+ hours of production usage. 10 chapters. Every pattern links to the GitHub Issue that caused it.
Part of cc-safe-setup โ 698 safety hooks for Claude Code.