sessions
Skill71 starsChanged 3 days agoMITView on GitHub
Measure where tokens actually went in recent Claude Code sessions, from the local transcripts.
26 other projects use a version of this.
Adopted by
Most recently taken up by
- adelrodriguez/skillstheir own version, first seen Nov 15, 2026
- microsoft/vscodetheir own version, first seen Nov 12, 2026
- EthanLLL/loomtheir own version, first seen Nov 8, 2026
- Mereithhh/very-happytheir own version, first seen Nov 6, 2026
- griffinhilly/claude-code-synthesistheir own version, first seen Nov 1, 2026
- phnx-labs/agi-clitheir own version, first seen Oct 26, 2026
Used with
Projects with it also use tool-rename-deprecation, add-policy and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
gitpod-ioSkilltool-rename-deprecation
Ensure renamed built-in tool references preserve backward compatibility. Use when renaming a toolReferenceName, tool set referenceName, or any tool identifier. Run on ANY change to tool registration code. Covers legacyToolReferenceFullNames for tools and legacyFullNames for tool sets.
Also in 5 projects that use this
OpenCortexIDESkilladd-policy
Use when adding, modifying, or reviewing VS Code configuration policies. Covers the full policy lifecycle from registration to export to platform-specific artifacts. Run on ANY change that adds a `policy:` field to a configuration property.
Also in 4 projects that use this
gitpod-ioSkillagent-sessions-layout
Agent Sessions workbench layout — covers the fixed layout structure, grid configuration, part visibility, editor modal, titlebar, sidebar footer, and implementation requirements. Use when implementing features or fixing issues in the Agent Sessions workbench layout.
Also in 3 projects that use this
slopusSkillmetrics-graphana
Query and manage Grafana dashboards and Prometheus metrics for Happy infrastructure. Covers grafanactl CLI usage, direct Prometheus queries through Grafana proxy, and dashboard-as-code workflows. Use when user asks about metrics, dashboards, monitoring, Grafana, Prometheus, or wants to add/modify panels.
Also in 3 projects that use this
slopusSkillcontrol-flow
Analyze and design control flows and data structures. Produces compact ASCII tree diagrams showing triggers, call chains, payload shapes, state mutations, and re-render effects. Use when user asks to diagram, trace, visualize, or design a flow or data structure.
Also in 3 projects that use this
TheKREATORSSkillrefactor-clean
No description
Also in 3 projects that use this
- +2 more from gitpod-io
Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- microsoft/vscode★ 195ksame name
- slopus/happy★ 25ksame name
- gitpod-io/openvscode-server★ 6.2ksame name
- posit-dev/positron★ 4.3ksame name
- NeuralInverse/neuralinverse★ 221same name
- OpenCortexIDE/cortexide★ 175same name
- Altman-conquer/agentrejoin★ 75same name
- griffinhilly/claude-code-synthesis★ 67same name
- elijahmuraoka/skills★ 58same name
- phnx-labs/agi-cli★ 26same name
16 more not listed
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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- site/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- site/CLAUDE.mdCLAUDE.md
- applySkill
- auditSkill
- dashboardSkill
- optimizeSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Run tokendoctor-sessions --json --days <n> and tokendoctor-replay --json --days <n>.
- Distinctive: line 22
Call it an upper bound: the replay cannot see the work a model does again after a summary.
- Very specific: line 45
When asked about a trend or whether a change helped, run tokendoctor-sessions --by day (or --by week, with --days <n>) and compare the …
“Common” is measured: kept by at least 6 in 10 of the 23 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
Measure token spend from this machine's session transcripts over the last $ARGUMENTS days (30 if
none given).
- Run
tokendoctor-sessions --json --days <n>andtokendoctor-replay --json --days <n>. Both are read-only and read only usage figures, timestamps, tool names and file paths from the transcripts, never message text. - Costs are dollars at each model's Claude API list price (lib/prices.mjs). What Claude Code bills but does not write into transcripts (summary compactions' own requests, titles, WebFetch page reads) comes from its own session totals where they hold, else an estimate. On a Pro or Max plan these are what the same work would cost on the API, not what it took from the plan's limits: lead with shares (percent), and say "at API list prices" with any dollar figure.
- Open with the person's own number: what share of the period's cost a smaller compaction window would have saved, from the replay (the 400K row, and 200K or 300K where they save much more). Call it an upper bound: the replay cannot see the work a model does again after a summary. If the window is already at or under 400K, or almost no session passed it, say the window would change little for them, rather than leading with a small number. Then lead with the two or three largest shares: main thread against subagents, the share spent with more than 400K tokens in context, and the subagent types that cost the most. Then present each finding in one or two plain sentences with its doc link.
- Connect findings to settings where they apply:
late-compactiontoautoCompactWindow,subagents-on-top-modeltoCLAUDE_CODE_SUBAGENT_MODELand the Explore override. Offer/tokendoctor:auditto check and fix them. Never edit files from this skill. - Then read
usageand draw your own conclusions from it: which tools fill the context (calls and characters of output, main thread and subagents apart), Bash calls that only printed a file (fileReads) or slept in a loop (waits), the files read most often, and how large subagent runs grow (requests, how many passed 200K context). Recommend what would cut the spend you see, in plain words with the number behind it. A recommendation is either a setting or an instruction:- a setting: give the exact
/tokendoctor <name> <value>line, which applies it as typed (/tokendoctoralone lists them). Among them:bash-output <n>caps what one Bash call puts in context,slide on,window <n>,subagents <model>; - an instruction for Claude (how subagents are briefed and sized, what they report back, when to
read docs, how to wait on a process): draft the few lines and say where they would go (the
project's memory or
CLAUDE.md). Offer/tokendoctor:optimizeto apply several at once: it shows each change and applies only what the person approves. Leave choices the person made on purpose (in memory or settings) to them, with what they cost.
- a setting: give the exact
- When asked about a trend or whether a change helped, run
tokendoctor-sessions --by day(or--by week, with--days <n>) and compare the periods before and after. Days older than the transcripts come from the history the plugin's SessionStart hook records. - Say what this cannot see: per-model prices, sessions on other machines, and transcripts Claude Code has already cleaned up.
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.

