context-budget

Audits Claude Code context window consumption and produces prioritized token-savings recommendations.

Updated Jul 22, 2026
One-click install
npx skills add https://github.com/Chau165/local_skill --skill context-budget-chau165
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-budget
Source: https://github.com/Chau165/local_skill/tree/main/plugins/ecc/skills/context-budget
Command: npx skills add https://github.com/Chau165/local_skill --skill context-budget-chau165

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code sessions accumulate hidden token overhead from agents, skills, MCP servers, rules, and CLAUDE.md files, degrading performance and shrinking usable context without any visibility into where the budget went. ## Core Features & Use Cases - Component Inventory: Scans agents, skills, rules, MCP servers, and CLAUDE.md files, estimating token consumption per component with heuristics like words × 1.3 and ~500 tokens per MCP tool schema. - Issue Detection: Flags bloated agent descriptions, heavy files, redundant components, MCP over-subscription, and CLAUDE.md bloat, then classifies each component as always, sometimes, or rarely needed. - Prioritized Report: Produces a context budget report with per-component token breakdowns and ranked optimizations, plus a verbose mode with per-file and per-tool detail. - Use Case: Before adding five new MCP servers, run the audit to learn current overhead is 33% and that removing two CLI-replaceable servers first keeps you under a 40% overhead target. ## Quick Start Ask the assistant to run a context budget audit of the current Claude Code setup and report the top token-saving optimizations.

Frequently Asked Questions about context-budget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Claude Code context window usage?

Run the context-budget audit to scan agents, skills, rules, MCP servers, and CLAUDE.md files. It estimates token consumption per component and produces a report ranking the top optimizations by potential token savings.

How much context do MCP servers consume in Claude Code?

Each MCP tool schema costs roughly 500 tokens, so a 30-tool server can exceed the cost of all your skills combined. Servers wrapping simple CLI tools like gh, git, or npm are flagged as replaceable candidates.

Why is my Claude Code session getting slower over time?

Accumulated agents, skills, MCP servers, and rules inflate the context loaded into every session. Bloated agent descriptions load into every Task tool invocation even when the agent is never used, steadily reducing effective context.

Can I check context headroom before adding more MCP servers?

Yes, the audit reports current overhead as a percentage of the context window and projects the cost of planned additions. It recommends removals, such as CLI-replaceable servers, to stay under a target overhead threshold.

What are the limitations of token estimation in a context audit?

Estimates use heuristics like words × 1.3 for prose and chars / 4 for code, so figures are approximations rather than exact tokenizer counts. Duplicate skill copies are skipped to avoid double-counting, but actual runtime overhead may vary.