token-optimizer
Installation
SKILL.md
Token Optimizer Skill
The Token Cost Breakdown
Understanding where tokens actually go in a typical Claude Code session:
| Source | Typical tokens | Controllable? |
|---|---|---|
| System tools (built-in) | ~16.8k | No — Fixed |
| System prompt | ~2.7k | No — Fixed |
| MCP tool descriptions | 200-500 per tool | Yes — Disable unused |
| CLAUDE.md / memory files | 1k-20k+ | Yes — Trim aggressively |
| Agent persona files | 200-1k each | Yes — Use functional roles |
| Skill descriptions | ~100 per skill | Yes — Keep library lean |
| Extended thinking (hidden) | Up to 31,999/request | Yes — Cap with env var |
| Prompt caching overhead | 25% write premium | Yes — Maximise cache hits |
| Subagent model choice | 5-15x cost difference | Yes — Route to Haiku |
| Conversation history | Grows until compaction | Yes — Compact strategically |