context-budget
Manages the agent's context usage. It checks available space and analyzes code components only when requested, optimizing usage.
What it does
This tool helps you understand how much space (or 'budget') you have left for using the AI. It checks current usage or performs a detailed configuration analysis, but only when you ask.
When to use it
- ✓When you want to know how much 'space' you have left to use with the AI.
- ✓When you want a summary of what's installed and how much space it takes up.
- ✓When you need a deeper analysis of the AI's configuration.
Example of what to ask your AI
“What is my current context budget?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It uses specific commands from your AI program to check real-time usage. If you ask for a more detailed analysis, it checks configuration files without reading everything.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add affaan-m/ECC --skill context-budgetOr download just the file:
curl -L https://raw.githubusercontent.com/affaan-m/ECC/main/skills/context-budget/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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:
| Harness | Native command | Guidance |
|---|---|---|
| Codex CLI | /status |
Shows current token usage and remaining context capacity. Use /statusline and enable Context stats plus Token counters for a persistent footer meter. |
| Codex app | /status |
Shows current thread context usage and rate limits. |
| Claude Code | /context |
Shows the live context breakdown. Use /context all for expanded items. |
| Other or unknown | None verified | State 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:
- Inspect only the named plugin/install root and the named harness's known configuration files.
- Never recursively enumerate the workspace root, home directory, provider cache, transcripts, debug logs, or unrelated worktrees.
- Never launch a provider CLI, MCP server, or debug session to count tools.
- Cap inventory output at 50 entries per component class. Summarize the rest.
- 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):
…
FAQ
How do I know if I'm using too much of the AI?
You can ask 'what is my token usage?' or 'how much space is left?' to see the current status.
What is an 'installation audit'?
It's a detailed check of installed components and their settings, which uses more resources and is only done when you explicitly request it.
Can I ask the AI to check specific files?
No, this tool focuses on the AI's overall usage and configuration, not individual files.
Details
Original description by the author
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.
repo: affaan-m/ECC
Popularity
- GitHub stars
- 280k
- Ranking position
- #160
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
accessibility
Helps your agent create interfaces that everyone can use. Ensures websites and apps work well for people with disabilities, like those who are blind or have reduced mobility.
affaan-m/ECC
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC
Similar skills
ci-cd-and-automation
Teaches your AI agent to automate repetitive tasks and ship projects and manage infrastructure.
addyosmani/agent-skills
suggestion-box
Helps your agent suggest improvements automatically. It observes problems and proposes solutions without needing permission, continuing the main task.
paperclipai/paperclip
orbit-general
Helps your agent create a dashboard of recent activity from various connected tools. It shows a summary of what happened in the last 24 hours. It's useful for getting an overview of work in one place.
nexu-io/open-design