I profiled 3 months of my Claude Code transcripts. One markdown file was read 118 times, a dead MCP server taxed every request, and caching silently saved me $15k
Claude Code logs every session to `~/.claude/projects/` as JSONL with exact token
usage per request. I built a free open-source profiler that reads them locally and shows where your tokens actually go.
Findings from my own 60 sessions ($4,935 API-equivalent):
- Re-reads: a 5,649-line progress doc read 118x. Fix: head/archive split, 150-line "current state" head, history below a marker. The tool computes the math per file.
- Failed commands: 455 failed tool calls ≈ $201 of retry re-billing. It regex-classifies your actual error messages and generates the CLAUDE.md lines that prevent each class (mine were mostly PowerShell vs Unix syntax).
- MCP bloat: a server configured but never called in any session, schema injected into every request for nothing.
- The big one: cache efficiency: 95% of my context came from cache at 0.1x price. That's a ~$15.6k difference on one project. If your cache hit rate is bad, nothing else matters.
It gives each project a Context Score (0-100) and every recommendation cites your own numbers, no generic "write better prompts" advice.
Fully local, zero dependencies, no telemetry, MIT. `npx u/asmitbohra/tokenscope`
GitHub: https://github.com/AviVAvi/TokenScope
(If you hit weekly limits on Pro/Max, this is basically "where did my limit go")
Posted Jul 23, 2026, 10:05 AM UTC