context-budget
OfficialAudits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.
What this skill does
When applied, it prepends a system prompt before your request is sent — no extra calls and no change to how you are billed beyond the added tokens.
--- name: context-budget description: Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations. origin: ECC --- # Context Budget Analyze token overhead across every loaded component in a Claude Code session and surface actionable optimizations to reclaim context space. ## When to Use - Session performance feels sluggish or output quality is degrading - You've recently added many skills, agents, or MCP servers - You want to know how much context headroom you actually have - Planning to add more components and need to know if there's room - Running `/context-budget` command (this skill backs it) ## How It Works ### Phase 1: Inventory Scan all component directories and estimate token consumption: **Agents** (`agents/*.md`) - Count lines and tokens per file (words × 1.3) - Extract `description` frontmatter length - Flag: files >200 lines (heavy), description >30 words (bloated frontmatter) **Skills** (`skills/*/SKILL.md`) - Count tokens per SKILL.md - Flag: files >400 lines - Check for duplicate copies in `.agents/skills/` — skip identical copies to avoid double-counting **Rules** (`rules/**/*.md`) - Count tokens per file - Flag: files >100 lines - Detect content overlap between rule files in the same language module **MCP Servers** (`.mcp.json` or active MCP config) - Count configured servers and total tool count - Estimate schema overhead at ~500 tokens per tool - Flag: servers with >20 tools, servers that wrap simple CLI commands (`gh`, `git`, `npm`, `supabase`, `vercel`) **CLAUDE.md** (project + user-level) - Count tokens per file in the CLAUDE.md chain - Flag: combined total >300 lines ### Phase 2: Classify Sort every component into a bucket: | Bucket | Criteria | Action | |--------|----------|--------| | **Always needed** | Referenced in CLAUDE.md, backs an active command, or matches current project type | Keep | | **Som
Use this skill
Add a "skill" field with the skill’s ID to your chat completion request. It is applied server-side before your prompt is sent — no extra calls.
{
"model": "gpt-4o-mini",
"skill": "imp-0987abaa-66b9-4bac-b919-f76dc261f27e",
"messages": [{ "role": "user", "content": "…" }]
}Install the skill, enable it in your dashboard and (optionally) limit it to specific models. It then applies automatically to every matching request — with no "skill" field to send each time.
Set it up in your dashboardMore skills
Delegate coding work to Codex, Claude Code, or OpenCode as background workers; not simple edits or read-only code lookup.
Create, edit, audit, tidy, validate, or restructure AgentSkills and SKILL.md files.
Search and analyze your own session logs (older/parent conversations) using jq.
Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
Diagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.
List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.
Create, search, and manage Bear notes via grizzly CLI.