Context Optimizer blocks redundant file reads, returns compact digests instead of full files, and learns your project's waste patterns. Measured across 7 scenarios with reproducible benchmarks.
$ npx skills add https://github.com/egorfedorov/claude-context-optimizer
Run node benchmark/run.js yourself.
All scenarios use real file parsing, real token estimation, and real file digests. Nothing synthetic.
| Scenario | Without CCO | With CCO | Savings | |
|---|---|---|---|---|
| Read Cache Dedup (JS) | 9,082 | 4,579 | 50% | |
| Read Cache (5x reads) | 22,705 | 4,693 | 79% | |
| File Digest vs Full Read (JS) | 4,541 | 38 | 99% | |
| Read Cache Dedup (JSON) | 12,076 | 6,075 | 50% | |
| Contextignore Block (lockfile) | 8,827 | 0 | 100% | |
| File Digest vs Full Read (MD) | 3,117 | 36 | 99% | |
| Typical Session (10 files, 45 min) | 35,166 | 20,044 | 43% |
Based on 35% average waste rate (conservative), 80K tokens/session, 5 sessions/day.
Run /cco-roi for personalized calculations based on your actual usage.
| Model | $/M tokens | Saved/session | Saved/day | Saved/month | Saved/year |
|---|---|---|---|---|---|
| Haiku 4.5 | $0.80 | $0.02 | $0.11 | $3 | $40 |
| Sonnet 4.6 | $3.00 | $0.08 | $0.42 | $13 | $151 |
| Opus 4.6 | $15.00 | $0.42 | $2.10 | $63 | $756 |
* Individual developer. For a team of 10 on Opus: $7,560/year saved.
Every Read call consumes context — whether the file was relevant or not.
At $15/M tokens on Opus, this adds up fast.
Claude reads package.json, tsconfig.json, .eslintrc every session. ~500 tokens each time, rarely used.
A single read of a 250-line README burns tokens. If Claude reads it once and never references it again, that's pure waste.
Context gets compacted, Claude forgets, reads again. 5x the tokens for the same information. Over and over.
The plugin hooks into Claude Code silently. No configuration. No commands to learn. It just works.
Every Read, Edit, Write, Glob, Grep, and Agent call is tracked automatically via PostToolUse hooks. Zero overhead.
Read Cache blocks redundant reads and returns a compact file digest (~100 tokens instead of ~18K). Contextignore blocks lockfiles and generated code entirely.
Cross-session confidence scoring identifies which files are useful and which are waste. Per-project, decays with time. Gets smarter every session.
No commands needed. The plugin intervenes only when it can save you tokens.
Smart Read Cache v2.0 — blocks re-reading unchanged files. Returns a structural digest (~100 tokens) instead of full content (~18K). Saves 50-99% per file.
Live session pulse — "45K used, 18K saved by CCO (28% efficiency)" — unobtrusive real-time feedback on your savings.
Budget multiplier — "CCO makes your budget 1.4x more effective" — shows how much extra context you're getting from saved tokens.
Smart compact suggestions — lists specific read-only files to drop with exact token savings. Repeats every 10K tokens.
Performance comparison — "12% waste. Better than your avg (19%)!" Motivates improvement over time.
Weekly savings streak — shows waste trend. Warns about files that are always wasted in this project.
The plugin works automatically, but 14 commands are available for detailed insights.
Run /cco to see a visual breakdown of every file in your session. Green = useful. Red = waste. With actionable recommendations.
Run /cco-roi for personalized savings: monthly costs by model, effective budget multiplier, team ROI tables. Based on your real data.
Run /cco-digest for a weekly grade (S/A/B/C/D/F) broken down by precision, edit ratio, search accuracy, and focus.
Run /cco-budget set 80000 to set a limit. Automatic alerts at thresholds with cost estimates and budget multiplier.
Blocks redundant reads automatically. Returns a file structure digest (~100 tokens) instead of full re-read (~18K). Staleness-aware.
Run /cco-anatomy to generate a compact codebase map. Claude reads one file instead of twenty.
PreToolUse hook that warns before loading known-waste files. Suggests Grep or offset/limit alternatives.
Run /cco-export html for a Chart.js dashboard with waste trends, token usage, project breakdown, and edit timelines.
Run /cco-replay to see recent session summaries. Pick up where you left off without re-reading everything.
One command. Zero config. Proven savings.
$ npx skills add https://github.com/egorfedorov/claude-context-optimizer
Or clone manually: git clone https://github.com/egorfedorov/claude-context-optimizer.git
context-optimizer is 100% free, open source, and has no telemetry. If it saved you money on Claude tokens, consider supporting development.
bc1q428exz5t2h9rzk7z5ya70madh0j3rs6h4gfgyd
0xB3f0C8e42B7cA9d65920cEfe82e3fef1B5C9d0C9
8ctK8nt3CBkPZGfWQXX8TsnqUYUy4JAbT1EMhr8rsQxm