Where Do Your Claude Code Tokens Go? Find & Fix the Drains

    2

    **Where did the tokens go?** Every model call is filed under what triggered it, with its share of the cost.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Where Do Your Claude Code Tokens Go? Find & Fix the Drains

    Example session with this skill installed

    I keep hitting my Claude Code usage limit. Where are my tokens going and what should I change?

    • Read your context and instructions
    • Compiled the where do your

    2.05 B tokens in 6,708 calls across 35 sessions (305k tokens per call on average). 79.7% of the cost came from calls with more than 200k tokens of context.

    #What triggered the callShare of costCalls
    1Windows commands called from WSL26.9%1,910
    2Retries right after a failed command14.7%1,061
    3Your prompt turns13.0%505
    4Running scripts, builds and tests11.5%747
    5Waiting and polling9.8%690

    What to change
    1.

    Keep conversations shorter. Rule: When a task is finished and the next request is unrelated, suggest /clear before starting.
    2.

    Stop paying for retries. Rule: After two failures of the same kind, stop and diagnose the cause. Do not retry variations.
    3.

    Stop polling. Rule: Never poll with sleep. Start long jobs in the background and wait for the completion notice.

    Shall I add these rules to your CLAUDE.md?

    Shall I add these rules to your CLAUDE.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Hitting Claude Code usage limits and not sure why? This reads your own session history and tells you, in numbers.

    Ask "where do my tokens go?" The skill runs one local script over your Claude Code session files and answers three questions:

    1. Where did the tokens go? Every model call is filed under what triggered it, with its share of the cost.
    2. What should change? Each big drain gets one rule for CLAUDE.md. Each recurring error gets its fix.
    3. Did it work? Later, sessions started before and after the change are compared by tokens per call.

    Real result, 11 Nov 2026

    One developer's history on Windows 11 with WSL: 2.05 billion tokens in 6,708 calls across 35 sessions.

    • 79.7% of the cost came from calls made with more than 200,000 tokens of conversation already loaded. The average call re-read 304k tokens.
    • 26.9% followed Windows commands called from WSL, 14.7% were retries right after a failed command, and 9.8% were waiting and polling.
    • 15 recurring errors were found, including failing tests re-run 135 times and "file not found" 76 times, each with its usual fix.
    • It wrote 7 rules, each tied to a measured drain.

    The full, unedited output is in the skill's examples/ folder.

    What you get

    • A ranked table of 13 triggers: your prompts, retries after failures, test and build runs, polling, shell inspection, URL probing, git, file reads and writes, MCP and web tools, subagents.
    • Cost-weighted shares, because tokens are not priced equally: cache reads count 0.1, output counts 5. Raw token counts are shown too.
    • The long-conversation figure: how much of your cost comes from calls with more than 200k tokens of context. This is usually the biggest lever.
    • Recurring errors per 1,000 commands, each with a fix.
    • Rules to paste into CLAUDE.md, only for drains above a threshold. Your agent shows them and adds them only if you agree.
    • A before/after comparison with --fix-time, and an optional one-page visual report with --html.

    Honest numbers only

    There are no projected savings. A change is reported only when a category has at least 20 calls on each side; until then the answer is "not enough data yet". The example folder includes exactly that case.

    Private and light

    One standalone Python script, standard library only. No network requests, no API key, no account, no MCP server. It only reads the Claude Code session files on your computer and prints numbers, category names, session ids and folder names; never your prompts, code or commands. It writes nothing unless you ask for the HTML report.

    Works on any machine

    Windows 11 (native or WSL), macOS and Linux. The session folder is found automatically; there are no fixed paths.

    Where it stops

    It files a call under what triggered it; it cannot judge whether the call was worth making. Error counts are signals, because a session that discusses an error also contains its text. It does not convert tokens to money. It only sees history that still exists on your computer.

    Free. If it shows you something useful, a short review helps other developers find it.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Analyses Claude Code session files only, not other agents. Files a call under what triggered it; cannot judge whether the call was worth making. Error counts are signals, not exact. Does not convert tokens to money. A before/after change needs at least 20 calls on each side.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    • Free with an Agensi account

    Software
    Python 3.9+Claude Code session history

    Works on Windows 11 (native or WSL), macOS and Linux. No internet access, API key or account needed. It reads the Claude Code session files already on your computer.

    Permissions

    Terminal / Shell

    File Scopes

    Claude
    Code
    session
    files
    (read
    only)
    CLAUDE.md
    (only
    if
    you
    agree
    to
    add
    rules)

    No network requests. The script writes nothing unless you ask for the HTML report.

    Listed5 days ago
    Updated2 days ago

    What's inside

    Frequently Asked Questions

    No. The script makes no network requests. It reads the Claude Code session files and prints numbers, category names, session ids and folder names.

    Yes. Windows 11 native (python or py) and WSL, plus macOS and Linux. The session folder is found automatically; if you use Claude Code on both Windows and WSL you can include both folders.

    The skill does not promise a figure. It shows where your tokens went, and after you change something it measures tokens per call in new sessions. Until there are 20 calls on each side it says not enough data yet.

    Only if you agree. Your agent shows the exact rules first and appends them; it never replaces existing content.

    New in LLM Ops

    Free