Claude Code Token Audit

    1

    It keeps numbers only (no prompts, code, paths or repo names) and writes nothing unless you ask it to save a baseline.

    $1.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Claude Code Token Audit

    Example session with this skill installed

    run a token audit

    • Read your context and instructions
    • Compiled the claude code token

    Findings

    • Opus carries 80% of cost; Sonnet+Haiku 19%.
    • 70% of cost was spent on turns whose context exceeded 150k tokens (16% above 500k); 17 of 102 sessions ever compacted.
    • Fixed context per new session: ~58k tokens minimum, 122k median (system prompt, tools, MCP, CLAUDE.md); 0 sessions started above 150k (resumed, forked or continued from a big session).
    • Startup footprint for this folder: CLAUDE.md files here ~0k tokens (1 KB); 13 skills and 3 agents listed; 2 local MCP servers.
    • Largest context feeder: Bash results (20.5M chars) — mostly sed 4.1M, grep 3.7M, cat 3.6M, git 2.8M; 132 single results exceeded 20k chars.
    • 37 repeat reads of an already-read file in the main thread (2 more inside sub-agents); 51% of Reads loaded the whole file.
    • 57 sub-agent calls (max 4 in one turn) cost 21% of the total; 14% set no model and inherited the default. Sub-agent cost by model: sonnet 84%, opus 15%, haiku 0%. token-optimizer Haiku helpers used 0 times.
    • 26% of turns ran at xhigh effort.
    • 7% of cost was cache rebuilt after idle gaps (>5 min) in long-lived sessions.
    • Longest run of consecutive tool errors: 9 (possible retry loop).
    minimum, 122k median (system prompt, tools, MCP, CLAUDE.md

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

    About this skill

    Claude Code bills grow quietly: sessions that run past 150k tokens of context, sub-agents inheriting Opus, cat and grep dumping whole files into context, big CLAUDE.md files loaded every session. This skill reads your local session logs and tells you which of these is costing you, in numbers, with the 1-3 fixes worth making first.

    Real example from the author's last 30 days (101 sessions): 70% of cost was spent above 150k context; median startup context was 122k tokens; Bash output was 12x larger than Read output, mostly sed, grep and cat; 13% of sub-agent calls inherited Opus.

    • Cost by model, main session vs sub-agents
    • Spend at large context, startup footprint and what drives it
    • Biggest context feeders, by Bash command and MCP server
    • Idle cache rebuilds, repeat reads, retry loops
    • Optional saved baseline for before/after comparisons

    Private by design: stdlib Python, no network, no packages. It keeps numbers only (no prompts, code, paths or repo names) and writes nothing unless you ask it to save a baseline.

    Requires Claude Code and Python 3.9+.

    Cost figures are relative units (output x5, cache write x1.25, cache read x0.1) and don't price models differently. Needs local session logs, so it only covers this machine.

    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 any payment.

    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

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    Requires

    Claude Code
    Python 3.9+
    Python

    Permissions

    File Scopes

    Reads
    ~/.claude/projects/**/*.jsonl
    ~/.claude/settings.json
    (selected
    keys)
    ~/.claude.json
    (MCP
    server
    count
    only)
    CLAUDE.md
    file
    sizes
    Writes
    ~/.claude/token-audit/reports/
    only
    with
    --save

    No network access. Keeps numbers only: no prompts, code, paths or repo names.

    Listed3 days ago

    What's inside

    Frequently Asked Questions

    Shows where your Claude Code tokens go — cost by model, context size, sub-agents, idle cache rebuilds, oversized tool output, startup footprint — and the 1-3 changes that save the most. Numbers only; nothing leaves your machine.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use Claude Code Token Audit on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in LLM Ops