Claude Code Token Tuner — Cut Your Token Bill Without Losing Quality

Your Claude Code setup is taxing you on every single message — and you can't see it.Claude bills you for context size × turns. A bloated CLAUDE.md, auto-loaded rule files you forgot were on, and a handful of silent cache-busters quietly re-bill you on every turn of every session. Most people never measure it.The Claude Code Token Tuner fixes that:• MEASURE — a one-command tool (weigh_context.py) counts your always-on token "tax." No API key. No tokens spent. Runs offline. Run it, trim, run it again, watch the number drop.• TRIM — a step-by-step Trim Playbook with two tracks. BEGINNER: paste one prompt, do three free things (permissions.deny read-rules, a concise output style, one-task-per-session). ADVANCED: the deeper wins most people miss.• THE SILENT COST SPIKES (the part no token counter shows you): a mid-session model switch, the opusplan trap, and enabling fast mode mid-session all invalidate your prompt cache, so the next turn re-reads your history without the cached prefix instead of at the ~0.1x cache-read. Plus /compact's summarize-and-rebuild overhead vs the cache-safe /rewind.• THE NEW WINS: fork subagents that share the parent's cache prefix (up to ~90% less input on parallel work), a hook that turns a 10,000-line test log into 100 lines before it ever hits context, and Batch API for async work at 50% off.Built from a REAL audit — we measured a live setup down from ~13,900 to ~7,300 always-on tokens (−47%), and an ETH Zürich study (arXiv 2602.11988) confirms context files add +20% cost with no reliable quality gain. You keep the same model, the same skills, the same quality. You just stop paying for the same bytes twice.WHAT YOU GET• weigh_context.py — the measuring tool (offline, no key)• The Trim Playbook — beginner one-prompt track + advanced manual track• An illustrated setup guide + a full explainer with charts• A free audit-prompt you can share, one-command installer + clean uninstaller• Fully yours to editSETUP TAKES ~2 MINUTES. Unzip, run the installer, read your number, trim, re-measure.REQUIREMENTS (please read before buying)• Claude Code (this is a Claude Code optimization kit)• macOS or Linux — Windows works via WSL• Python 3 (already installed on Mac/Linux)• No API keys or paid services for the core (one optional advanced tactic, Batch API, needs API billing)Token counts are estimates (chars/4) for before/after comparison, not exact billing. Strategies reflect Claude Code behavior as of mid-2026. Not affiliated with, endorsed by, or sponsored by Anthropic. Claude is a trademark of Anthropic PBC.