Claude Code plugin

Claude Context Optimizer

Plugin that tracks token usage, spots wasted context and suggests savings.

130 stars 13 forksPlugins & marketplaces Plugin marketplace Source

Install

Inside Claude Code
/plugin marketplace add egorfedorov/claude-context-optimizer
From source
git clone https://github.com/egorfedorov/claude-context-optimizer.git

From the README

Context Optimizer (CCO)

See what Claude costs you, and spend less of it. Every message re-sends
the whole conversation, so long chats and long coding sessions use up limits
fast and recall early details worse. context-optimizer keeps the context small,
moves cheap work to a cheap model, and shows you the numbers while you work.

Runs locally, open source (MIT), no telemetry.

Skills that work everywhere

These need no setup and run in chat, Cowork and Claude Code alike. Claude
picks them up on its own, or you can ask:

In Claude Code

Haiku subagents

A one-paragraph policy at session start (about 90 tokens, once per
conversation) tells Claude when to hand work to them. Only their short answer
enters the expensive model's context. /cco orchestrate  runs a whole
task that way.

/cco: one command for the rest

/cco alone shows the session board: budget, money spent and saved, waste,
the active task and what to do next. /cco help lists everything:

What runs on its own

- Read dedup. A re-read of a file that hasn't changed, in the same context,
  is skipped, with a map of the file's landmarks instead. A changed file, a
  new range, or a read after /compact goes through.
- Budget and cache warnings at 50/70/85/95% of the budget, and a note when
  a pause let the prompt cache go cold, with what that cost.
- Task state across /compact. A small execution state you keep with
  /cco task is put back into context after compaction.
- A recap of the last session in a project when you start the next one.
- .contextignore keeps files you never need out of reads.

Does it really save?

We checked on real transcripts rather than guessing. In long Opus sessions
about 60% of the cost is cache reads: the whole context re-read on every
request. Repeated reads of unchanged files, which…
Read the full README on GitHub

How plugins work

  • A plugin bundles slash commands, subagents, skills, hooks, MCP servers and status lines so they install together.
  • Add the marketplace inside Claude Code with /plugin marketplace add egorfedorov/claude-context-optimizer, then run /plugin to pick what to install.
  • You can turn a plugin off again from /plugin without deleting anything.
Claude Code docs

Details

Language
JavaScript
License
MIT
Last updated
27 October 2026
Topics
ai-toolsanthropicclaude-codeclaude-code-plugincli-plugincontext-managementcost-savingdeveloper-toolsproductivitytoken-optimization

FAQ

What is Claude Context Optimizer?

Plugin that tracks token usage, spots wasted context and suggests savings. It is a plugin for Claude Code, from egorfedorov/claude-context-optimizer on GitHub.

How do I install Claude Context Optimizer?

Run /plugin marketplace add egorfedorov/claude-context-optimizer inside Claude Code, then follow the setup in the README.

Is Claude Context Optimizer popular?

egorfedorov/claude-context-optimizer has 130 GitHub stars and 13 forks. It was last updated on 27 October 2026.

More plugins & marketplaces

Browse the most popular Claude Code mods, all plugins & marketplaces, or the skills and MCP server directories.