Claude Code Token Audit
It keeps numbers only (no prompts, code, paths or repo names) and writes nothing unless you ask it to save a baseline.
$1.99
Works with the AI Agents you already use
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).
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+.
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.
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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
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
- Software
- Claude Code
Python 3.9+
Runs locally with the Python standard library. No packages, no network.
Permissions
File Scopes
No network access. Keeps numbers only: no prompts, code, paths or repo names.