token-burn
Token Burn Report
Show, at a glance, where Claude Code tokens were spent over a recent window so the user can see what's expensive and how to avoid hitting rate limits. The heavy lifting is a deterministic script — your job is to run it, pick the right preview surface, and surface the headline.
Why this exists
Claude Code writes a JSONL transcript per session under ~/.claude/projects/<slug>/<session>.jsonl. Every
assistant turn carries a message.usage block (input_tokens, cache_read_input_tokens,
cache_creation_input_tokens with a 5m/1h split, output_tokens) and message.model. The script sums
those across all sessions touched in the window, prices them per model (with cache discounts), and ranks
the burn. Reading raw transcripts by hand is hopeless at this scale (often thousands of files) — the
script is the only sane way.
Workflow
- Run the script (stdlib Python 3, no deps). From the skill directory: