soloboard
SoloBoard - Autonomous development orchestrator for Claude Code.
Claude Code plugin that tracks token usage, identifies wasted context, and saves 30-50% on API costs. Heatmaps, ROI reports, budget alerts, efficiency scores, git-aware suggestions — all local, zero config.
> /plugin marketplace add egorfedorov/claude-context-optimizer> /plugin install claude-context-optimizer@cco
Repo: egorfedorov/claude-context-optimizer
What's inside
The average Claude Code session wastes 30-50% of tokens on files that are read but never actually used. Every Read call consumes context — whether the file was relevant or not.
package.json Claude reads "just in case"? 120 tokens, every time.At $5/M input tokens (Opus 5) — $10/M on Fable 5.1 — a developer spending $100/month is lighting $30-50 on fire on irrelevant context.
context-optimizer silently tracks every file read, edit, and search. It learns which files are actually useful and which are waste. Over time, it builds a profile of your coding patterns and tells you exactly where your tokens go — and how to stop wasting them.
The price table caught up. Sessions now report claude-fable-5-1 and
claude-opus-5; neither had a row. Fable was priced at the Opus tier — it costs
twice that ($10/$50) — and Sonnet 5 is cheaper ($2/$10) than the Sonnet 4.6 row it
was using. Fable 5.1 also bills cache reads at 0.025× instead of 0.1×, so it
carries its own rate; every dollar figure reads the per-model rates.
The cache math caught up. Claude Code keeps the prompt cache alive for an
hour on most sessions today (ephemeral_1h_input_tokens in the transcript).
CCO priced every write at the 5-minute 1.25× rate (real: 2×) and warned that the
cache "went cold" after a 5-minute pause when it had 55 minutes left. Now the
TTL is read per session: writes are billed at their real rate, and the
cache-break guard waits the full hour on 1h sessions.
Task state that survives /compact — the honest slice of Google/Purdue's
SKILL.state. That architecture replaces an agent's growing history with
instructions + a small structured state + the latest observation, so the prompt
stays O(1) in the step count. A plugin can't replace Claude Code's history (and
with caching, replayed history is cheap anyway) — but it can own the moment
history gets replaced. /compact writes a lossy free-form summary; CCO now keeps
an exact, bounded state per task and re-injects it right after compaction:
/cco-task patch '{"goal": "ship 1h-cache pricing", "done": ["parser", "tests"], "next": "README", "scratch": null}'
✓ State of task #7 updated (3 keys, 118/4000 chars)
… /compact …
[cco-task] Active task #7: ship 1h-cache pricing
Execution state (authoritative — trust this over any summary of earlier turns):
{"goal":"ship 1h-cache pricing","done":["parser","tests"],"next":"README"}
Patch semantics are SKILL.state's: set keys, null deletes. The cap (~1K tokens)
is the point — the state never grows with the task, and the patch is rejected
until you prune. Full notes in the CHANGELOG.
Your tools now price themselves. MCP and Agent costs were constants someone
picked once — mcp__* ≈ 200 tokens in, Agent ≈ 500. Real results vary by
orders of magnitude: a "list all issues" query and a one-row lookup are the same
tool name and nowhere near the same cost. On MCP-heavy sessions the budget meter
was guessing at its own biggest line item.
CCO already measured every tool result; now it remembers. After three calls a tool is budgeted from what it actually costs you:
/cco-tools
tool calls avg max total
mcp__linear__list_issues 41 38.2K 112.0K 1.5M ← where your budget really goes
Bash 380 133 342 50.5K
· mcp__github__get_pr 2 4.1K 6.0K 8.2K ← still on the constant
Pair it with /cco-overhead mcp: that finds servers you never call, this prices
the ones you do. (#38)
Patterns travel with the repo. What CCO learns — which files are usually waste, usually useful, edited together — was locked to one machine. A teammate's fresh clone started blind and re-learned the same lessons by wasting the same tokens.
/cco-patterns export # → .cco/patterns.digest.json — commit it
/cco-patterns import # teammate, day one on a fresh clone
The digest carries relative paths and counts only — no file contents, no absolute paths, no home directory. Anything that can't be expressed relative to the project root is dropped, and the file is audited before writing and on import; a digest with absolute paths is rejected, not sanitized.
Imported data is stored as a separate prior and never merged into your own
counts. That's deliberate: confidence means "how many sessions I observed
this in", and folding someone else's sessions into it would make your own
numbers a lie. The import fills in only where you have no evidence of your own.
(#37)
This repo ships its own
.cco/patterns.digest.json— clone it and/cco-patterns importto see the feature work on real data.
.svg averages
100.5 chars/line (nearly 3x under-counted before), .css 25.3 and
.txt 27.8 (over-counted), .ts 44. Notably the measurement
contradicted my own priors: .json is 38.8, not the ~20 I expected.
(#35)/cco-config — 11 hardcoded knobs, now tunable. Re-read warning points,
Read-Cache staleness, prompt-coach length bands, /cco-pack budget cap. Every
value range-validated: a typo is ignored in favour of the default and flagged,
never silently applied.
(#39)marketplace.json quietly sat two
releases behind; CI now fails on any mismatch.CCO quietly assumed POSIX paths. On Windows that broke four things at once, and none of them looked broken — they just reported less:
/cco-overhead said "no session transcripts found" even with transcripts
right there. The cwd → folder encoding dropped \, : and spaces, so it
looked in ~\.claude\projects\C:\Program Files\Git instead of
…\projects\C--Program-Files-Git. Fixed — which also restores the
CLAUDE.md/memory itemization that had been collapsing into "system prompt &
tools (unattributed)". (#46).contextignore was inert on Windows. CRLF files left a \r on every
pattern, so not one of them matched. Every lockfile you thought you'd
excluded was still being counted. (#33)\ — C:\proj\dist\a.js matches dist/**.C:\… paths.Plus a CONTRIBUTING.md with the platform rules, so this doesn't regress. 183 tests, green on Node 18/20/22.
Hooks still need a POSIX shell (Git Bash or WSL) — native Windows hooks are tracked on the roadmap.
The session's REAL model now drives everything, and the three biggest avoidable dollar leaks get caught live:
/cco board, and Read-Cache
staleness thresholds all follow the model the session actually runs on
(Fable 5, Opus, Sonnet, Haiku). Switch /model mid-day; nothing miscalibrates.
config.model is only the fallback. Claude 5 family added to the pricing table.tool_response size
for every tool instead of stat-based guessing — and any single result ≥10K
tokens gets a one-line fix ("pipe through tail/grep", "read with offset/limit").re-warming 150K of context ≈ $0.86 extra)
— the prompt cache TTL is 5 minutes, and a broken cache re-bills your whole
context at 12.5× the cached rate. Batch pauses; /compact before stepping away./cco-shield apply fix — previously you had to run the
CLI to see them./cco-claudemd. Memory loads into every prompt; it's the most
expensive place for bloat.★ CCO saved $654.36 this session — 86% of what it would have cost.SoloBoard - Autonomous development orchestrator for Claude Code.
FAQ
claude-context-optimizer is a Claude Code plugin with 22 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes cco-anatomy, cco-budget, cco-claudemd. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it