← ClaudeAtlas

token-optimizelisted

Audit Claude Code token consumption and context waste
haingt-dev/agent · ★ 0 · AI & Automation · score 65
Install: claude install-skill haingt-dev/agent
# Token Optimize Audit Claude Code token consumption and produce an evidence-based optimization report. This skill is read-only — it measures and recommends but never modifies files. ## Why This Matters Claude Code's context window fills fast. The built-in system prompt (instructions, tool schemas, environment info) consumes a fixed overhead before you type anything — this is uncontrollable. On top of that, user-controlled context layers stack: CLAUDE.md, memory files, skill descriptions, and MCP tool definitions. Performance degrades noticeably in the last 20% of the window — so the goal isn't just cost savings, it's quality preservation. Context window size varies by model (200K default, 1M for extended-context models). Detect from model ID suffix: `[1m]` = 1M tokens, otherwise assume 200K. All thresholds scale proportionally. Two types of token cost matter: - **Baseline** (static): Always-on files + MCP tool definitions. Fixed per session. This is what this audit measures. - **Runtime** (dynamic): Tool call results (Todoist returning 50 tasks, Gmail listing threads), file reads, conversation history. These accumulate per-turn and can dwarf baseline costs in long sessions. This audit does NOT measure runtime costs — note this in the report so users don't get a false sense of security from a low baseline number. The good news: most baseline waste is controllable. Community data shows 40-80% reduction is achievable with systematic optimization. Runtime costs are best ma