Skip to content
cccskills
FreePublished on GitHubEnglish overview

context-budget

Audit Claude Code agents, skills, rules, and MCP tool configurations to estimate how much space they consume in the model's context. Identifies oversized and overlapping components, then ranks recommendations by potential token savings.

OriginalShow the original description

Routes live context checks to the native Codex or Claude Code meter without scanning files, and performs a bounded static component audit only when explicitly requested. Use for context-budget requests about remaining capacity or installed context overhead.

AI rating100/ 100See how to install

Good for

  • Investigating why context space fills quickly
  • Auditing a setup after adding skills or MCP servers
  • Finding oversized files and duplicated instructions
  • Estimating room before adding more components

Overview

What it does

Examine the amount of information in settings loaded by Claude Code and identify what puts pressure on its context, the information the model can refer to. The skill estimates token counts for agents, skills, rules, MCP tool definitions, and CLAUDE.md. It finds long files and overlapping content, classifies components by necessity, and ranks improvements by how much information they could remove.

When it helps

Use it when context fills up quickly or after adding many skills and MCP servers. It also helps assess the current load and the expected additional load before installing more components. Detailed output shows a breakdown by file and where content overlaps.

Example requests

  • “Review configuration size with /context-budget.”
  • “Show the breakdown of large files with /context-budget --verbose.”
  • “Estimate the extra load from adding an MCP server.”

Notes

Token counts and tool-definition overhead are estimates. The optional JSONL diagnostic uses Python 3 and requires explicitly selecting a stable, regular file. Saved file bytes do not represent current context usage or charges. Use the version-appropriate /context or /usage command to check current values.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Objective evaluation

AI rated this skill on four points using only the contents of its SKILL.md. Stars and popularity are not taken into account.

Clear instructionsIs it clear when to use it and what it does?
AGoodIt separates live usage checks from explicitly requested audits and specifies the native command for each supported environment.
Concrete stepsAre steps, inputs, outputs, and examples spelled out?
AGoodIt specifies audit scope, inventory limits, report fields, and diagnostic code for an explicitly selected JSONL file.
SafetyAre sending data, deleting files, and running commands disclosed?
AGoodAudits require explicit requests and bounded read-only access; JSONL diagnostics also require explicit file selection.
Easy setupDoes it need few tools or API keys, and are they documented?
AGoodThe default path only points to native commands, and the optional diagnostic includes a python3 invocation example.

The total counts each point as A = 25, B = 15, C = 5. Rated by AI (OpenAI Codex) as of Oct 19, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (1)

  • SKILL.md6.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Context Budget

Use the provider's native meter for live session usage. Keep the separate, estimated installation audit behind an explicit opt-in.

Default: Live Context

Treat an invocation with no audit request as a live-context request. This includes requests for the current window, remaining capacity, headroom, token usage, or a context breakdown.

For this default path:

  • Do not call or use tools.
  • Do not scan or read files.
  • Do not run shell commands, provider CLIs, debug logging, or MCP discovery.
  • Reply with only the native command and one short explanation.

Route by the active harness:

HarnessNative commandGuidance
Codex CLI/statusShows current token usage and remaining context capacity. Use /statusline and enable Context stats plus Token counters for a persistent footer meter.
Codex app/statusShows current thread context usage and rate limits.
Claude Code/contextShows the live context breakdown. Use /context all for expanded items.
Other or unknownNone verifiedState that ECC cannot read live provider state and ask which harness is active.

These commands are documented in the Codex command reference and Claude Code command reference.

A skill cannot invoke a TUI slash command on the user's behalf. Never replace the native command with an estimated scan and never infer an audit request from phrases such as “context is heavy” or “how much is left.”

Explicit Static Audit

Run an installation/configuration audit only when the user explicitly says --audit, “audit installed components,” or equivalent unambiguous wording. --verbose changes report detail; it does not opt into an audit by itself.

If the audit scope is ambiguous, ask for the harness and installation root before reading anything. Keep every audit bounded and read-only:

  1. Inspect only the named plugin/install root and the named harness's known configuration files.
  2. Never recursively enumerate the workspace root, home directory, provider cache, transcripts, debug logs, or unrelated worktrees.
  3. Never launch a provider CLI, MCP server, or debug session to count tools.
  4. Cap inventory output at 50 entries per component class. Summarize the rest.
  5. Do not write temporary logs or copy configuration content into the report.

Audit only the component metadata relevant to eager discovery:

  • agent and skill descriptions;
  • command descriptions when the harness discovers them eagerly;
  • always-loaded instruction files in the explicitly named scope;
  • configured MCP tool schemas when an existing bounded manifest exposes them.

Full skill, agent, command, and rule bodies are generally on-demand content. Report their disk size separately from estimated eager overhead instead of adding every body to the session baseline.

Audit Output

Return a compact report containing:

  • harness and exact paths inspected;
  • estimated eager/discovery overhead by component class;
  • installed counts and the heaviest metadata entries;
  • assumptions, unavailable measurements, and up to three optimizations.

Every calculated token number is an estimate of static configuration overhead, not live session context. Do not claim that an estimate is provider-reported, current, exact, or evidence of realized savings. Direct the user back to the native live-context command for current usage.

Optional Selected-Record Diagnostic

Inspect a persisted record only when the user explicitly selects that file for this diagnostic. This is separate from the default live-context request and the installation audit.

For a local file diagnostic, explicitly select a stable, regular JSONL file or a snapshot you intend to inspect. Replace the example path below; this does not find or reconnect a session. The snippet prints aggregate byte counts only. It reads one line at a time, so memory use depends on the largest record; avoid very large records and actively growing files.

python3 - "/path/to/selected-session.jsonl" <<'EOF'
import json
import sys

total = attachment = other = unclassified = 0
try:
    with open(sys.argv[1], "rb") as source:
        for raw in source:
            size = len(raw)
            total += size
            try:
                record = json.loads(raw.decode("utf-8"))
            except (UnicodeDecodeError, json.JSONDecodeError):
                unclassified += size
                continue
            record_type = record.get("type") if isinstance(record, dict) else None
            if not isinstance(record_type, str):
                unclassified += size
            elif record_type == "attachment":
                attachment += size
            else:
                other += size
except OSError:
    print("Cannot read selected JSONL file.", file=sys.stderr)
    raise SystemExit(1)

pct = attachment * 100.0 / total if total else 0.0
print(f"persisted {total}B | attachment records {attachment}B ({pct:.1f}%) | "
      f"other records {other}B | unclassified {unclassified}B")
EOF

The three categories add up to the original file bytes, including line endings and blank lines. attachment is an exact record-type filter, not a guarantee about a harness's current internal schema. Other records have a different string type; malformed JSON, invalid UTF-8, nonobject values, missing or non-string types, and blank lines are unclassified. Neither category means "conversation," and the percentage is only a share of persisted bytes.

These counts do not establish active context, remaining room, token usage, billing, or what a reconnect loads. For current harness-reported context and usage, use the version-appropriate /context and /usage commands (/cost is an alias).

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

accessibility

FreeSummaryAI rating 100

Design and audit interfaces for Web, iOS, and Android using WCAG 2.2 accessibility guidance. Check screen-reader labels, keyboard navigation, contrast, and control sizes to identify barriers and guide implementation for people using assistive technology.

  • Adding descriptive labels to icon-only buttons
  • Reviewing keyboard navigation and modal focus
  • Checking contrast and control sizes
affaan-m/ECC284.1KUpdated Oct 16, 2026

agent-architecture-audit

FreeSummaryAI rating 80

Investigate unreliable AI agents across 12 layers, including instructions, memory, tool execution, and display. Use code and logs to trace failures, rank findings by severity, and produce an ordered repair plan that prioritizes code changes.

  • Investigating failures that appear only inside an agent application
  • Tracing old conversation content leaking into new sessions
  • Checking skipped or falsely claimed tool execution
affaan-m/ECC284.1KUpdated Oct 16, 2026

agent-eval

FreeSummaryAI rating 80

Compare coding agents on tasks from your own codebase. Define success checks, run agents in separate Git working directories, and report pass rates, available API costs, completion time, and consistency across repeated trials.

  • Comparing coding agents on real development tasks
  • Evaluating a new tool or model before adoption
  • Checking performance after agent updates
affaan-m/ECC284.1KUpdated Oct 16, 2026

agent-harness-construction

FreeSummaryAI rating 100

Design and refine an AI agent’s available actions, tool inputs, and result formats. Define recovery steps for errors, manage the information kept in context, and evaluate changes through completion rates, retries, and cost per successful task.

  • Define an AI agent’s tool set and input formats
  • Make tool results and next steps easier to interpret
  • Specify safe retries and stopping conditions
affaan-m/ECC284.1KUpdated Oct 16, 2026

agent-introspection-debugging

FreeSummaryAI rating 100

Diagnose failed AI agent runs by capturing errors, checking likely causes, and choosing small, reversible recovery actions. The workflow produces a structured report of the failure, recovery steps, and evidence, helping explain repeated retries or stalled progress.

  • Diagnosing repeated tool calls with no progress
  • Investigating quality loss as context grows
  • Checking file paths and environment mismatches
affaan-m/ECC284.1KUpdated Oct 16, 2026

agent-introspection-debugging

FreeSummaryAI rating 100

Diagnose AI agent runs that fail repeatedly, loop through tools, or lose track of the task. Capture errors and environment details, test a focused recovery action, and produce a report explaining the evidence and outcome.

  • Diagnosing repeated failures in an agent run
  • Investigating loops through the same tool calls
  • Reviewing output degradation as context grows
affaan-m/ECC284.1KUpdated Oct 5, 2026

See all skills by affaan-m

Report a problem with this skill