Token Optimizer — plugin for Claude Code and Codex

token-optimizer

A plugin for Claude Code and Codex: trims wasted tokens, keeps work alive across sessions and compactions and shows cost. The license is noncommercial

Install in Claude Code and Codex

Other ways to install

Access and checks

How we review

Extended access. The tool runs code or makes network calls and only reads external data.

  • Hooks read session summaries
  • The license is not open: commercial use needs special terms

This is third-party code. Review the repository files before installing.

What it does

Token Optimizer cuts the tokens an AI coding assistant wastes, keeps work alive across sessions and context compactions and shows cost on a live dashboard. Per the README it finds ghost tokens, helps survive context compaction and avoid quality decay during long work. A zero telemetry mode is declared, and there are a PRIVACY.md and checksums. It works on macOS, Linux and Windows. For Claude Code it installs as a plugin, and for Codex there is a `.codex-plugin` package.

Who it is for. For people who work a lot in Claude Code or Codex in long sessions and want to see token spending and not lose context after compaction.

Good fit when

  • Sessions with the agent are long and quality drops after context compaction
  • You need to see cost and token spending on a live dashboard
  • You need to keep the work state across sessions

Not a fit when

  • You use the plugin in a commercial company: the PolyForm Noncommercial license requires separate terms
  • You need an open license: this plugin is not open

Example request

Show which sources eat the most tokens in the current session and suggest what can be trimmed

Limitations

The PolyForm Noncommercial 1.0.0 license is not open: noncommercial use is free, small businesses have an additional permission in the `LICENSE-SMALL-BUSINESS.md` file, and otherwise companies need a commercial license. Read both files before installing. The plugin works through hooks and session summaries, so it has extended access to them. Cloud claude.ai/code sessions do not read plugins from your machine. The declared zero telemetry comes from the README and we did not verify it. The latest version is 5.13.35 from 05.10.2026.

How to disable. Remove the plugin with /plugin uninstall token-optimizer in Claude Code and turn off marketplace auto-update if you enabled it.

FAQ

What is the plugin's license?

PolyForm Noncommercial 1.0.0: noncommercial use is free, small businesses have an additional permission, and others need a commercial license. The license is not open.

How do I install it in Claude Code?

/plugin marketplace add alexgreensh/token-optimizer and /plugin install token-optimizer@alexgreensh-token-optimizer.

Is there a version for Codex?

Yes, the repository has a .codex-plugin package.

Does the plugin send data out?

The README declares zero telemetry and there is a PRIVACY.md. We did not verify this.

Is Token Optimizer safe to install?

Extended access. The tool runs code or makes network calls and only reads external data.

Discussion

No questions or reviews yet.

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
Token Optimizer (this card)no3,179
cost-xrayno5,375captures local API traffic and splits tokens and cost by source
Token Monitorno3,939a desktop widget tracking tokens, cost and limits for many tools
Claude Usageno2,331a local dashboard over Claude Code logs: tokens, models, sessions and projects

README in short

The README describes a plugin for trimming wasted tokens, keeping work across sessions and showing cost, installed through the Claude Code marketplace with a Codex package. PolyForm Noncommercial 1.0.0 license and a separate permission for small business.

README badge

Report a problem