Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By localixaiv0.8.0MITIn 1 marketplace
Replays your last 30 days of Claude Code sessions to show what each context window would have cost, then applies only the changes you pick. The author claims a 400K window cut per-request cost in their own sessions, and an optional mode drops old tool output instead of summarizing.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it decides whether tool calls may run; sees, changes or blocks tool calls; runs programs; reads your settings; changes your /config settings; calls a model on your account; reads or rewrites your prompts.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Slide the window instead of compactingslide
Where Claude Code would summarize the conversation, elide old tool outputs instead (they can be read again): no summary request, every prompt and answer kept word for word. /compact still summarizes.
booleandefault false
Slide down to (% of where Claude Code compacts)slideTo
How far a slide frees the context, as a percent of the point where Claude Code compacts (20 to 90). Lower leaves less behind and more turns before the next slide.
numberdefault 25
Keep the prompt cache warm through a pausekeepalive
Shortly before the one-hour prompt cache of a conversation of 200K tokens or more expires, send a one-word fork of it, so the next message reads the conversation from the cache instead of writing it again. Never on a cache that may be cold; a few pings a pause, fewer when you rarely come back.
booleandefault false
The same Claude Code for up to 38% less
Replays your own past sessions to show what each change would have saved, then changes only what you pick.
Install · Docs · Changelog · plugins.localix.ai/tokendoctor
Your past sessions decide, not anyone's benchmark. What a setting saves depends on how you work: how long your sessions run, which models you use, what the work is. A number from someone else's sessions, mine included, says little about yours. So tokendoctor starts by looking back at your own.
① Look back at your last 30 days. /tokendoctor:sessions replays every session you had,
request by request, at compaction windows of 200K, 300K, 400K and 600K, and shows what each would
have cost. It only reads your transcripts, makes no model calls and changes nothing. The figure is
an upper bound: a replay can't see work the model would have redone after a summary.
② Change only what your sessions show pays, and undo it. /tokendoctor:optimize proposes
changes from those numbers and checks your settings against Claude Code's docs; it applies only the
ones you pick, each shown as a diff first. /tokendoctor undo puts any of them back.
③ Optional: slide instead of summarize. When Claude Code would stop to summarize the conversation, tokendoctor drops old tool output instead and keeps every message. There is no model call, so it takes milliseconds, not a minute.
④ Optional: keep the cache warm through a break. Come back after the prompt cache's hour and
the next message writes the whole conversation into it again, at twice the input price. With
/tokendoctor keepalive on, a one-word fork of the conversation reads it from the cache six minutes
before the hour runs out, which starts the hour again. Only conversations of 200K tokens or more,
and never on a cache that may already be cold. /tokendoctor:sessions shows first what it would
have saved you (more below).
claude plugin marketplace add localixai/plugins
claude plugin install tokendoctor@localix-lab
Restart Claude Code and run /tokendoctor:sessions to see what your last 30 days would have cost
at each window. Nothing changes until you pick it.
Every request sends the whole conversation to the model. On models with a 1M window, Claude Code compacts only near 967K tokens, so the end of a long session is the expensive part. For me, two thirds of main-thread cost went to requests with more than 400K in context.
So I set a 400K window and Sonnet for subagents. Comparing the month before with the week after, about 23K and 19K main-thread requests, context per request went from 412K to 219K and cost per request fell 38% at API list prices. That's one person's before and after, not a controlled experiment.
The catch is more summaries, and each is a pause: 79 seconds on average in my sessions. That's what the slide is for. Your sessions may show something else entirely, which is the point of looking at them first.
On the benchmark, Claude Code builds a TypeScript project against tests it can't change, so a run counts only if the tests pass. Cost is per task, on Haiku 5.5:
| Compared | Cost | Time |
|---|---|---|
| Slide against a summary, a day of work | −19% | −33% |
| Slide against a summary, an eval harness | −35% | −28% |
| Slide against a summary, a short task | +6% | −17% |
| The settings advice alone, against Claude Code as it ships | dearer in 3 of 4 runs | |
| The advice and the slide, a week of work | −11% to −21% |
7-day copy clicks
npx claudepluginhub localixai/plugins --plugin tokendoctorBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground