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 theagentplanev0.1.1MITIn 1 marketplace
Shows where your Claude Code usage goes and what to change, read from local session logs. Needs Python 3.9+; hooks run on every prompt and tool call, and saver mode (off by default) can hold a message after a long break and rewrite shell commands to RTK.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A command runs shell commands (! syntax) when you invoke it
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.
Why am I hitting my limit? One command shows where your Claude Code usage goes and what to change, read from your own session logs on your machine.
/tokenops:doctor
Why am I hitting my limit? (last 30 days, 79 sessions, $5,041 at API list prices)
Where your usage goes
46% Re-reading context every turn
35% Re-buying context after breaks
10% Claude's output
8% Caching new context
What to change
1. Breaks cost you 35%: 672 times you came back to an expired cache ...
2. Re-reading is 46%: use /clear when you switch to an unrelated task.
3. Output is 10% of your usage, so caveman can save at most that ...
4. 3% of the tool output came from shell commands RTK can compact ...
In Claude Code:
/plugin marketplace add theagentplane/tokenops
/plugin install tokenops@tokenops
Then run /tokenops:doctor (or /tokenops:doctor 7 for the last 7 days). Needs Python 3.9+
on your PATH; nothing to pip install.
/tokenops:saver on lets TokenOps act on what the doctor finds. Off by default; every hook
fails open.
Resume guard. After a break longer than the cache lifetime, your next message re-reads the whole conversation at the cache-write price. The guard holds that message once:
TokenOps: this session's cache expired (1.5 h since the last reply). Sending now re-reads
433k tokens at the cache-write price: about $3.47 API-equivalent, against $0.09 while the
cache was warm.
- Send the same message again to continue anyway.
- Or run /compact first: it keeps the gist in far fewer tokens.
- Or /clear and paste a 3-line summary of where you were (cheapest).
It only acts when the context is at least 50k tokens (TOKENOPS_GUARD_MIN_TOKENS).
Smart RTK. With RTK installed, shell commands Claude runs
are rewritten to their compact RTK form (git status -> rtk git status), using RTK's own
rtk rewrite. File reads (cat, head, sed -n), git diff/git show, and the next test run
after a failing one stay verbatim, because Claude needs that output exactly. If RTK's own hook
is installed, smart RTK stays off so nothing is rewritten twice: remove RTK's hook from your
Claude Code settings to let TokenOps decide.
Measured, not guessed. Smart RTK and caveman are each switched on in a random half of your sessions. After 10 sessions on and 10 off, the doctor shows what each one did to your usage per prompt, and the saver mode keeps it only if it saves:
Measured on your sessions (saver mode A/B, usage per prompt)
Smart RTK -6% usage per prompt (95% range -9% to -2%) -> kept on
caveman +1% usage per prompt (95% range -3% to +5%) -> turned off
Usage only: hooks cannot see whether the work went as well.
For caveman, set its own default to off ("defaultMode": "off" in caveman's config file, or
CAVEMAN_DEFAULT_MODE=off) so TokenOps decides per session.
/tokenops:saver status shows what is on; /tokenops:saver off turns it all off.
Claude Code writes every model response to ~/.claude/projects/*/*.jsonl, often on several
lines with the same message id. The doctor keeps the last line per response, includes subagent
transcripts, and prices each response at Anthropic's list rates: input, output, cache reads,
and cache writes (1.25x input for the 5-minute cache, 2x for the 1-hour cache). Prices come from
TokenOps' price book (src/tokenops/framework/pricing.py).
On a Claude plan the dollar figures are API-equivalent: they show your share of usage, not a bill. Nothing leaves your machine.
7-day copy clicks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub theagentplane/tokenops --plugin tokenopsPlugins from other owners that cover similar ground