cc-token-optimizer
by Zoria-Lind · ★ 7 · updated 2 days ago
0
Claude Code token optimizer — read de-dup, output trimming, cold-start guard, model-tier nudges, plus a live token / cache-hit bar and /token-status. Tokens only, no cost estimate (billing differs per gateway). 中文:会话 token 监视与档位导演,装完即用 —— 只报 token、不折算金额(各厂商计费口径不同)。
Install
/plugin marketplace add Zoria-Lind/cc-token-optimizer/plugin install cc-token-optimizer@zoria-pluginsThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
classic.SessionStartsession.compactclassic.UserPromptSubmitclassic.PreModelSwitchclassic.PostModelSwitchtool.callclassic.PostToolUsesession.startturn.completeui.rendercommand.run- API calls
$.command.register$.fs.list$.fs.read$.fs.stat$.fs.write$.session.id$.session.model$.session.usage$.state.get$.state.set$.store.get$.store.set$.ui.resolve$.ui.toast- Draws
AbovePrompt- Can see
classic hookscompactionRead callsEdit|Write|NotebookEdit calls- Reach
- level 2 of 3 other: $.state.getother: $.state.setwrites filesreads filespersists statedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/Zoria-Lind/cc-token-optimizer
- Path in repo
plugin- Source commit
37eb1dathe exact code the scan read- Author
- @Zoria-Lind
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.