Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)

MITAuto-check passedAI & LLM Engineering

Install Cco Budget

skills CLI
$ npx skills add egorfedorov/claude-context-optimizer --skill cco-budget -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install egorfedorov/claude-context-optimizer cco-budget --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/egorfedorov/claude-context-optimizer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cco-budget .claude/skills/cco-budget && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cco-budget
GitHub stars
114
Token cost
~808 tokens
SKILL.md length
354 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)

  • Tasks that involve LLM cost and token optimization
  • SKILL.md covers status (or no arguments), set, model and auto, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Context engineering

What it does

Cco Budget is an agent skill from egorfedorov/claude-context-optimizer. Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)

Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM cost and token optimization and Context engineering. The repository describes itself as: 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… The licence is MIT.

When your agent uses it

  • Tasks that involve LLM cost and token optimization
  • Tasks that involve Context engineering

Example prompts

  • “/cco-budget”

Requirements

  • Pre-approved tools (allowed-tools): Read

What it can do on your machine

Read from SKILL.md and the folder at commit f6f20ee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cco Budget loads about 808 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 354 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~808

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from egorfedorov/claude-context-optimizer at commit f6f20ee, republished under its MIT licence (© egorfedorov). 354 words, ~808 tokens.

Download SKILL.mdSave it as .claude/skills/cco-budget/SKILL.md (or your agent's skills folder).
name
cco-budget
description
Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)
allowed-tools
Read
license
MIT
argument-hint
[status | set <tokens> | model <haiku-4.5|sonnet-4.6|sonnet-5|sonnet-5.5|opus-4.7|opus-4.8|opus-5|opus-5.5|fable-5|fable-5.1> | auto <on|off>]

Context Budget Manager

Manage the token budget for Claude Code sessions. Model-aware — picks the right effective context window and prices per model. The session's REAL model is read from the transcript by the budget hook; config.model is only the fallback. Everything from Sonnet 4.6 up is 1M; Haiku 4.5 is 200K.

Parse $ARGUMENTS:

status (or no arguments)

Show current budget config + auto-compact settings: Read ~/.claude-context-optimizer/config.json and ~/.claude-context-optimizer/budget-config.json (either may be missing). If no config exists, show defaults (200K working budget on a 1M window, opus-5.5 fallback model, warn at 50/70/85/95%).

set <tokens>

Update the budget limit. Parse the token count (200K, 1M, 500000 all OK). Update ~/.claude-context-optimizer/config.json (the user approves the write):

json
{
  "budgetTokens": <parsed_number>,
  "warnAt": [50, 70, 85, 95],
  "autoCompactAt": 90,
  "model": "opus-5.5"
}

If budgetTokens exceeds the chosen model's context window, warn the user.

model <name>

Set the FALLBACK model for cost estimation (used only when a session's transcript has no model id yet). Supported keys:

  • haiku-4.5 (alias haiku) — $1/$5 per M, 200K
  • sonnet-4.6 (alias sonnet) — $3/$15 per M, 1M
  • sonnet-5 — $2/$10 per M, 1M
  • sonnet-5.5 — $2/$10 per M, 1M
  • opus-4.7 / opus-4.8 — $5/$25 per M, 1M
  • opus-5 (alias opus) — $5/$25 per M, 1M
  • opus-5.5 (default) — $4/$20 per M, 1M, cache reads at 0.05×
  • fable-5 — $10/$50 per M, 1M
  • fable-5.1 (alias fable) — $10/$50 per M, 1M, cache reads at 0.025× (vs 0.1× elsewhere)

opus-4.8-1m / opus-4.7-1m / opus-extended are back-compat aliases only — there is no 1M surcharge; the 1M window is standard at $5/$25.

Update the model field in config.json. When switching to a 1M-context model and the current budgetTokens is below 500K, ask if the user wants to bump it to 1M.

Show full SKILL.md (95 more words)Show less

auto <on|off>

Toggle auto-compact at thresholds (80% / 90%). Update ~/.claude-context-optimizer/budget-config.json:

  • auto on → autoCompactEnabled: true
  • auto off → autoCompactEnabled: false

Defaults if file missing:

json
{
  "autoCompactEnabled": true,
  "autoCompactThreshold": 80,
  "criticalThreshold": 90
}

Cost calculation

The budget monitor now estimates input + output tokens separately and uses the model's real input/output prices. Example: Edit with a 200-char new_string counts as ~54 output tokens, charged at the model's output rate.

Effective Budget Multiplier

At 50%+ budget usage, the monitor shows how much CCO multiplies your effective budget — e.g. "1.6x more effective" if Read Cache + file digests saved enough redundant reads to make your 200K context behave like ~320K.

© egorfedorov, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cco-budget of egorfedorov/claude-context-optimizer.

Open the folder on GitHubat commit f6f20ee

Compare with similar skills

Cco Budget next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cco Budget compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cco Budget this skillegorfedorov/claude-context-optimizer114—~808Automated safety check: PassMIT
Openrouter Context Optimizationjeremylongshore/tons-of-skills-marketplace2.8k—~2.4kAutomated safety check: PassMIT
Context Engineering Reviewmohitagw15856/pm-claude-skills1.4k—~1.4kAutomated safety check: PassMIT
Context Compressionseb1n/awesome-ai-agent-skills206—~2.2kAutomated safety check: PassMIT
Agents Best PracticesDenisSergeevitch/agents-best-practices2.4k—~7.4kAutomated safety check: PassMIT
OmniRoute RTK Context Filtersdiegosouzapw/OmniRoute75k—~618Automated safety check: PassMIT

Similar skills

  • Openrouter Context Optimization

    jeremylongshore/tons-of-skills-marketplace

    Optimize context window usage for OpenRouter models to reduce cost and improve quality.

    2.8k GitHub stars~2.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Context Engineering Review

    mohitagw15856/pm-claude-skills

    Review what an LLM feature or agent actually puts in its context window — and find what's bloating, missing, or fighting itself.

    1.4k GitHub stars~1.4k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Context Compression

    seb1n/awesome-ai-agent-skills

    Compress selected context to a target token budget while preserving decisions, evidence, constraints, and unresolved questions.

    206 GitHub stars~2.2k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Agents Best Practices

    DenisSergeevitch/agents-best-practices

    A skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.

    2.4k GitHub stars~7.4k tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • OmniRoute RTK Context Filters

    diegosouzapw/OmniRoute

    Controls the RTK filter set and context-handling settings in OmniRoute, with endpoints to try compression on sample text and read back retained output.

    75k GitHub stars~618 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Token Optimization

    cwinvestments/memstack

    A skill your agent uses when the user says 'token optimization', 'save tokens', 'context window', 'reduce tokens', 'token stack', or 'TokenStack', or asks about extending context window capacity.

    423 GitHub stars~1.4k tokensUpdated 14 days ago
    AI & LLM EngineeringAuto-check passed

More from egorfedorov/claude-context-optimizer

All 13 skills in this repo
  • Smart Loader

    egorfedorov/claude-context-optimizer

    Automatically suggests optimal files to preload based on the user's task description and historical context patterns.

    114 GitHub stars~530 tokensUpdated 11 days ago
    Auto-check passed
  • Cco

    egorfedorov/claude-context-optimizer

    Context Control Center — one screen for budget, $ spent, tokens saved, waste, last prompt grade, the active task, and ready-to-run optimization actions

    114 GitHub stars~465 tokensUpdated 11 days ago
    Auto-check passed
  • Cco Config

    egorfedorov/claude-context-optimizer

    View and tune CCO's behavior thresholds — re-read warnings, cache staleness, prompt-coach length bands, and the /cco-pack budget cap

    114 GitHub stars~839 tokensUpdated 11 days ago
    Auto-check passed
  • Cco Patterns

    egorfedorov/claude-context-optimizer

    Share learned file patterns across a team — export an anonymized digest of what's usually waste/useful/co-edited, and import a teammate's so a fresh clone benefits day one

    114 GitHub stars~665 tokensUpdated 11 days ago
    Auto-check passed
  • Cco Shield

    egorfedorov/claude-context-optimizer

    Show ContextShield status and waste protection stats; suggest or apply .contextignore rules from historical waste

    114 GitHub stars~457 tokensUpdated 11 days ago
    Auto-check passed
  • Cco Task

    egorfedorov/claude-context-optimizer

    Organize work by task, track tokens/cost per task, and keep a small patchable execution state that is re-injected after /compact (SKILL.state-style) — start a task, patch its state, list tasks, or…

    114 GitHub stars~866 tokensUpdated 11 days ago
    Auto-check passed

Questions about Cco Budget

What does Cco Budget do?

Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price). Cco Budget is an agent skill from egorfedorov/claude-context-optimizer.

When should I use Cco Budget?

Cco Budget fits situations like: tasks that involve LLM cost and token optimization; tasks that involve Context engineering.

How do I install Cco Budget in Claude Code?

Run `npx skills add egorfedorov/claude-context-optimizer --skill cco-budget -a claude-code`. Or copy the skill folder (skills/cco-budget in egorfedorov/claude-context-optimizer) into .claude/skills/cco-budget in your project. Claude Code loads it when a task matches its description.

How do I install Cco Budget in Codex?

Run `npx skills add egorfedorov/claude-context-optimizer --skill cco-budget -a codex`. Or copy the skill folder (skills/cco-budget in egorfedorov/claude-context-optimizer) into .agents/skills/cco-budget in your project. Codex loads it when a task matches its description.

Can I use Cco Budget in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add egorfedorov/claude-context-optimizer --skill cco-budget -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cco-budget, .gemini/skills/cco-budget, .github/skills/cco-budget and .opencode/skills/cco-budget in your project.

What does Cco Budget need to run?

SKILL.md names no scripts, command-line tools or credentials: Cco Budget is instructions for the agent only. Its frontmatter pre-approves these tools: Read.

Does Cco Budget access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cco Budget safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cco Budget use?

Cco Budget is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cco Budget use?

About 808 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cco Budget?

Skills that share tags, products or a category with Cco Budget: Openrouter Context Optimization (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Context Engineering Review (mohitagw15856/pm-claude-skills, 1.4k stars), Context Compression (seb1n/awesome-ai-agent-skills, 206 stars) and Agents Best Practices (DenisSergeevitch/agents-best-practices, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cco Budget?

egorfedorov (a GitHub user) maintains it in egorfedorov/claude-context-optimizer, which has 114 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 30, 2026.

Source: egorfedorov/claude-context-optimizer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.