What Changed — From Tracking to Prevention
Two weeks ago, developer Egor Fedorov released a plugin that tracked where Claude Code tokens were being wasted. The data showed 37% waste, with the biggest culprit being redundant file reads. The new v3.1 update transforms that tracking into active prevention with a Smart Read Cache that intercepts and blocks wasteful reads before they happen.
How It Works — Intelligent Blocking Logic
The plugin adds a PreToolUse hook that intercepts every Read call Claude makes. It checks three conditions before allowing a read:
- First read? Always allow
- File changed on disk? Allow (checks mtime)
- Different section requested? Allow (tracks offset/limit ranges)
Only if the exact same file section is requested again, and the file hasn't changed, does it block with a clear message:
Already loaded tracker.js this session (983 lines, ~9.3K tokens).
File unchanged. Use offset/limit to read a specific section, or Edit to modify it.
Claude adapts to these blocks and works with the context it already has.
Real Impact — 107 Sessions Analyzed
Fedorov analyzed 107 existing sessions to see what the Read Cache would have saved:

Sessions analyzed: 107
Total tokens tracked: 23.5M
Redundant reads found: 1,225
Tokens that would have been saved: 1.9M (8.0%)
Top offenders were predictable: page.tsx (189 reads, 60 blocked, 130.9K tokens saved), GameInfoModal.svelte, variables.css, and other frequently referenced files. Some sessions saw savings as high as 68%.
At $15 per million tokens on Claude Opus, that's roughly $60/month in savings for Fedorov's usage patterns.
New Feature: Project Anatomy
Version 3.1 also adds a /cco-anatomy command that generates a one-file codebase map:
# Project Anatomy: my-app
Generated: 2026-03-24 | 31 files | ~46K tokens if all read
| Path | Lines | ~Tokens | Type |
|------|-------|---------|------|
| src/tracker.js | 984 | 9.1K | source |
| src/export.js | 398 | 3.7K | source |
...
Instead of Claude opening 20 files to understand your project structure, you can provide this single file, saving thousands of tokens on project exploration.
Install It Now
First-time installation:
npx skills add https://github.com/egorfedorov/claude-context-optimizer
If you already have it:
claude plugin update claude-context-optimizer@egorfedorov-plugins
The plugin requires zero configuration, sends no telemetry, and all data stays local. It's MIT licensed and now includes 45 unit tests.
Why This Matters Beyond Token Savings
Beyond the direct cost savings, this plugin changes Claude Code's behavior. When Claude gets blocked from re-reading a file, it learns to work more efficiently with existing context. This mirrors the feedback from early users who said "getting a live counter visible all session changes behavior in the moment before waste happens."
The plugin also handles edge cases intelligently:
- Compaction events clear the cache (Claude actually lost context)
- Edit/Write operations invalidate that file's cache
- Partial reads are tracked by specific offset/limit ranges
This isn't just about saving money—it's about training yourself and Claude to work more efficiently within the constraints of the context window.




