cco-anatomy
Generate a compact project map so Claude understands the codebase without opening every file
Show what tools actually cost in tokens — learned per-tool averages from observed results, replacing the hardcoded MCP/Agent guesses
$ npx -y skills add egorfedorov/claude-context-optimizer --skill cco-tools --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cco-toolsContext preview
The summary Claude sees to decide when to auto-load this skill.
Show what tools actually cost in tokens — learned per-tool averages from observed results, replacing the hardcoded MCP/Agent guesses
name: cco-tools description: Show what tools actually cost in tokens — learned per-tool averages from observed results, replacing the hardcoded MCP/Agent guesses license: MIT argument-hint: "[show | reset]" allowed-tools: [Bash]
MCP and Agent token costs used to be constants picked once (`mcp__*` ≈ 200 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 biggest line item.
CCO now measures every tool result and learns the average per tool name.
Run from the plugin root:
node src/tool-costs.js
Prints the learned table: calls, average, worst case, and cumulative total per tool, sorted by total spend.
When reading it back to the user, the useful observations are:
frequently an MCP server rather than file reads.
constant — its estimate isn't trustworthy yet.
narrowing its queries (filters, limits, pagination) rather than dropping it.
Pair with `/cco-overhead mcp` — that shows which servers are *configured but never called*; this shows what the called ones actually cost.
node src/tool-costs.js reset
Clears the learned table and returns every tool to its built-in constant. Useful after changing MCP servers or their configuration, when past measurements no longer describe the current setup. Confirm before running — the history isn't recoverable.
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.
Repo: egorfedorov/claude-context-optimizer
Generate a compact project map so Claude understands the codebase without opening every file
Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5 default fallback, full 1M context…
Analyze the user's last prompt for clarity, scope and specificity — give a quality score and concrete suggestions to make the next prompt produce better results
View and tune CCO's behavior thresholds — re-read warnings, cache staleness, prompt-coach length bands, and the /cco-pack budget cap