
Sessions
Shows where Claude Code token spend went across recent local sessions
Sessions is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 186
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Sessions
This skill reads the local Claude Code session transcripts on the machine and reports how tokens were spent over a chosen number of days, 30 by default. It runs two read-only helper commands, one summarizing cost and usage and one replaying context growth, and works from usage figures, timestamps, tool names and file paths rather than message text.
The report leads with shares of spend rather than raw dollars: how much a smaller compaction window would have saved, how the main thread compares with subagents, how much was spent with more than 400K tokens in context, and which subagent types cost the most. Dollar figures are stated at Claude API list prices, which matters on Pro or Max plans where the work does not draw down the same limits.
The skill then looks at tool output volume, Bash calls that only printed files or waited in loops, frequently read files and subagent growth, and turns these into concrete suggestions. Settings are offered as exact commands for the companion tokendoctor plugin, while behavioural guidance for Claude is drafted for the project's memory or CLAUDE.md. It needs the tokendoctor plugin installed, since it calls tokendoctor-sessions and tokendoctor-replay, and it works only on transcripts still present on this machine.
When your agent uses it
Measure where tokens actually went in recent Claude Code sessions, from the local transcripts.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- Asks for: Bash(tokendoctor-sessions *), Bash(tokendoctor-replay *)(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 1 file (4 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the tokendoctor plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add localixai/plugins
/plugin install tokendoctor@localix-labOr copy only this skill to ~/.claude/skills/sessions:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/localixai/plugins.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sessions &&
cp -R "$tmp/plugins/tokendoctor/skills/sessions" ~/.claude/skills/sessions &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/sessions inside it instead.
Copy the skill folder to ~/.agents/skills/sessions to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/localixai/plugins.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sessions &&
cp -R "$tmp/plugins/tokendoctor/skills/sessions" ~/.agents/skills/sessions &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/sessions inside it instead.
Copy the skill folder to ~/.cursor/skills/sessions to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/localixai/plugins.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sessions &&
cp -R "$tmp/plugins/tokendoctor/skills/sessions" ~/.cursor/skills/sessions &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/sessions inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/localixai/plugins.git --path plugins/tokendoctor/skills/sessionsOr copy the folder to ~/.gemini/skills/sessions yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/sessions:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/localixai/plugins.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sessions &&
cp -R "$tmp/plugins/tokendoctor/skills/sessions" ~/.copilot/skills/sessions &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/sessions inside it instead.
Get the folder:
git clone --depth 1 https://github.com/localixai/plugins.gitThen copy plugins/plugins/tokendoctor/skills/sessions into your agent's skills folder as sessions. Agents that support SKILL.md read one folder per skill.
What it does
- Cost share breakdown
- Reports the share of spend by main thread, subagents and high-context requests, with dollar figures stated at API list prices.
- Compaction window savings
- Estimates how much a smaller compaction window would have saved as an upper bound.
- Tool output analysis
- Shows which tools fill the context through call counts and output size, separately for main thread and subagents.
- Wasteful Bash detection
- Flags Bash calls that only printed a file or slept in a polling loop.
- Setting recommendations
- Maps findings to exact tokendoctor commands and to drafted instructions for Claude.
- Trend comparison
- Compares daily or weekly periods to see whether a change reduced spend.
Good for
- Find out which sessions and subagents cost the most tokens this month
- Check whether a smaller auto-compaction window would reduce my Claude Code spend
- Spot Bash commands that dump large files into context
- Compare token usage before and after changing subagent models
- Draft memory instructions that keep subagent reports short
Sessions FAQ
What does Sessions need to run?
It needs the tokendoctor plugin, since the skill calls the tokendoctor-sessions and tokendoctor-replay commands, and it reads the Claude Code transcripts stored on the local machine.
Does Sessions change my settings or files?
No. The skill is read-only and never edits files. Changes are offered as commands to run with /tokendoctor or via /tokendoctor:optimize, which applies only approved changes.
Does Sessions read my message text?
According to its instructions, the helper commands read only usage figures, timestamps, tool names and file paths from the transcripts, never message text.
Are dollar figures what I was billed?
No. Costs are shown at each model's Claude API list price. On Pro or Max plans they indicate what the same work would cost on the API rather than what it used from plan limits.
Which sessions can it not see?
It cannot see sessions on other machines, per-model prices, or transcripts that Claude Code has already cleaned up.
How do I install Sessions in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/sessions to use it in all your projects, or to .claude/skills/sessions in one project. Or install the tokendoctor plugin, which includes it: /plugin marketplace add localixai/plugins, then /plugin install tokendoctor@localix-lab.
Does Sessions run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Sessions?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Sessions?
The closest alternatives to Sessions are Optimize, Session waste report, Dashboard, Cost tracking and Cachewise.
Where this comes from
- Description: from the skill's own SKILL.md.
More from localixai/plugins

Resumes a paused or stopped localix-loop with an answer or extra iterations
- Open source
- 186 GitHub stars
- Developer tools

Sets up a goal-driven loop where the agent proposes changes scored by a scorekeeper
- Open source
- 186 GitHub stars
- Developer tools

Reports where a localix-loop session stands: score, kept and rolled-back iterations
- Open source
- 186 GitHub stars
- Developer tools

Stops a running localix-loop session and leaves the best result in the working tree
- Open source
- 186 GitHub stars
- Developer tools

Applies one tokendoctor audit fix to settings after a dry-run preview and confirmation
- Open source
- 186 GitHub stars
- Developer tools

Audits a Claude Code setup for settings that waste tokens or silently do nothing
- Open source
- 186 GitHub stars
- Developer tools



