cco-anatomy
Generate a compact project map so Claude understands the codebase without opening every file
View and tune CCO's behavior thresholds — re-read warnings, cache staleness, prompt-coach length bands, and the /cco-pack budget cap
$ npx -y skills add egorfedorov/claude-context-optimizer --skill cco-config --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cco-configContext preview
The summary Claude sees to decide when to auto-load this skill.
View and tune CCO's behavior thresholds — re-read warnings, cache staleness, prompt-coach length bands, and the /cco-pack budget cap
name: cco-config description: View and tune CCO's behavior thresholds — re-read warnings, cache staleness, prompt-coach length bands, and the /cco-pack budget cap license: MIT argument-hint: "[show | get <key> | set <key> <value> | reset [key]]" allowed-tools: [Bash]
CCO's behavior knobs used to be magic numbers spread across four modules. This surfaces them, range-validated, in `~/.claude-context-optimizer/config.json` under `thresholds`.
The plugin root is the directory containing `src/config.js`. Run everything from there.
Parse $ARGUMENTS:
node src/config.js
Print the table as-is. `*` marks values the user set; `!` marks a stored value that failed validation and is being ignored in favour of the default. If any `!` rows appear, point them out — a typo there means a knob silently isn't doing what the user thinks.
node src/config.js get <key>
node src/config.js set <key> <value>
Exits non-zero with the valid range on a bad value or unknown key — relay that message rather than guessing a correction. After a successful set, say which behavior it changes (see the table below), because the effect is not obvious from the key name alone.
node src/config.js reset <key> # one key node src/config.js reset # everything back to defaults
Resetting everything discards all the user's tuning — confirm first unless they were explicit ("reset all", "вернуть всё по умолчанию").
| Key | Default | What it changes | |---|---|---| | `rereadWarnAt` | 3 | reads of an unedited file before the first re-read warning | | `rereadEscalateAt` | 5 | reads before the "put it in CLAUDE.md" escalation | | `bigFileLines` | 500 | full-read line count that triggers the offset/limit warning | | `mediumFileLines` | 200 | full-read line count that triggers the soft hint | | `staleTokenRatio` | 0.10 | share of budget loaded after a file before Read Cache re-allows it | | `staleFiles` | 8 | other files loaded after a file before it counts as evicted (at 200K) | | `staleTimeMs` | 600000 | ms since last read before a cached file counts as stale | | `promptMinWords` | 8 | word count below which the coach calls a prompt too vague | | `promptIdealMaxWords` | 200 | upper bound of the coach's "ideal length" band | | `promptTooLongWords` | 500 | word count above which the ask is considered buried | | `packBudgetPercent` | 25 | max share of the budget `/cco-pack` may consume |
`300000` = 5 min) or `staleTokenRatio` so cached entries go stale sooner.
more repeat reads get blocked.
`promptTooLongWords`; the default band is tuned for shorter asks.
one-off experiment without changing config.
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