analyze-sessions
Skill0 starsChanged 37 days agoMITView on GitHub
Analyze past Claude Code sessions on this machine — token/cost rollups, most-used tools, prompt-pattern mining, and rendering an old session to readable text. Use when the user asks "how much have I spent", "what do I use Claude for", "show me that session from yesterday", or wants usage stats.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- nrflo/nrflotheir own version, first seen Oct 29, 2026
- amosblomqvist/pi-configtheir own version, first seen Oct 8, 2026
- dotnet/mauitheir own version, first seen Oct 8, 2026
- JonFermin/vibecodingtheir own version, first seen Apr 17, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- dotnet/maui★ 23ksame name
- amosblomqvist/pi-config★ 1.1ksame name
- nrflo/nrflo★ 2same name
- JonFermin/vibecoding★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- anti-sleepSkill
- ask-and-buildSkill
- claude-checkupSkill
- clone-websiteSkill
- compoundSkill
- content-machineSkill
- context-artifactsSkill
- diagram-makerSkill
- grillingSkill
- grill-meSkill
- hydrateSkill
- level-upSkill
- managerSkill
- no-mistakesSkill
- pdf-craftSkill
- personal-agentsSkill
- scan-before-publishSkill
- setup-helpSkill
- signal-from-expertSkill
- teachSkill
- techdebtSkill
- tutor-setupSkill
- tutorSkill
- verify-changeSkill
- visualizeSkill
- web-debugSkill
- workflow-tuneSkill
- youtube-transcriptSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Run the command that matches the question.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Analyze sessions
Claude Code stores every session as JSONL under ~/.claude/projects/<slug>/<session-id>.jsonl.
This skill reads those files locally. Nothing leaves the machine.
Ported in spirit from amosblomqvist/pi-config's analyze-sessions.
Tool
scripts/analyze.py (stdlib only, needs Python 3).
python "~/.claude/skills/analyze-sessions/scripts/analyze.py" <command> [args]Commands:
| Command | What it does |
cost [--days N] [--project SLUG] | Token totals and estimated USD, grouped by day and by model. |
tools [--days N] | Count of each tool call across sessions, most used first. |
prompts [--days N] [--top N] | Your user prompts, first line only, most recent first — for spotting what you repeatedly ask. |
sessions [--days N] | One row per session: date, project, #turns, tokens, est. cost. |
render <session-id-or-path> | Print a session as plain readable text (user / assistant / tool calls). |
Cost numbers are estimates from a built-in price table (Sonnet/Opus/Haiku); treat them as directional, not billing-accurate.
How to use
- Run the command that matches the question.
- Summarize the output for the user — don't just paste the table if it's long.
- For
render, if the user only gave a vague reference ("yesterday's freight repo session"), first runsessions --days 3to find the id, thenrenderit.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

