Reads your Claude Code history and tells you how to fix your sessions so they cost less and your loops run better. ~41-47% fewer tokens, no quality loss (measured on Sonnet 4.6 and Opus 4.8).
Works with Claude Code, Codex, OpenCode, and any agent that reads AGENTS.md.
/session-analyzer — reads your sessions and gives you specific fixes to cut
token waste and tighten the loops where Claude hands work back to you.
| You run | It does |
|---|---|
/session-analyzer |
Finds token waste and loop gaps across your sessions, with the fixes |
/session-analyzer <project> |
Also scans that repo's structure: junk, duplicates, orphans, god-files |
/session-analyzer map |
Generates an orientation map for a repo — the single biggest token saver |
/session-analyzer loop |
Mines your session history and suggests token-efficient loops your agent can run to automate the repetitive work it finds |
It reports how many tokens you would save, then the ranked fixes. You approve the changes.
No dependencies, Python 3.9+. Clone this repo and drop the folder at
~/.claude/skills/session-analyzer/. Then use it as above.
See docs/how-it-works.md — the pipeline, a sample report, and the benchmark proof. Driving the underlying CLI directly: AGENTS.md and docs/usage.md.
MIT. See LICENSE.