context-budget

Audits Claude Code context window consumption across agents, skills, MCP servers, and rules.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/pjherron/hypoc --skill context-budget-pjherron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-budget
Source: https://github.com/pjherron/hypoc/tree/main/hypoc/skills/context-budget
Command: npx skills add https://github.com/pjherron/hypoc --skill context-budget-pjherron

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? As you add agents, skills, MCP servers, and rules to a Claude Code setup, each component silently consumes context window tokens, degrading session performance and output quality. This Skill inventories every loaded component, estimates its token cost, and produces prioritized recommendations to reclaim context space. ## Core Features & Use Cases - Component Inventory: Scans agents, skills, rules, MCP server configs, and CLAUDE.md files, estimating token consumption per component with line-count and word-based heuristics. - Issue Detection: Flags bloated agent descriptions, heavy files, redundant components, MCP over-subscription, and CLAUDE.md bloat. - Prioritized Report: Classifies components into keep, on-demand, and remove buckets, then outputs a ranked savings report with top optimizations. - Use Case: Before adding five new MCP servers, run an audit to learn that removing three CLI-replaceable servers frees roughly 27,500 tokens, keeping overhead under 40%. ## Quick Start Ask the assistant to run a context budget audit of the current setup and report which components consume the most tokens.

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 tokens per component using word and line counts, then reports total overhead and ranked savings opportunities.

How much context do MCP servers consume in Claude Code?▼

Each MCP tool schema costs roughly 500 tokens, so a 30-tool server can consume more context than all installed skills combined. The audit flags servers with over 20 tools and servers that merely wrap CLI commands like gh, git, or npm.

Why is my Claude Code session getting slower after adding skills?▼

Every agent description loads into each Task tool invocation, and every skill, rule, and MCP tool schema consumes window space. Accumulated overhead reduces effective context, degrading output quality; an audit identifies which components to remove or lazy-load.

Can I check context headroom before adding more MCP servers?▼

Yes, the audit supports pre-expansion checks. It estimates the token cost of planned additions, for example five servers with about 50 tools adding roughly 25,000 tokens, and recommends removals to stay under a target overhead percentage.

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

Estimates use heuristics such as words multiplied by 1.3 for prose and characters divided by 4 for code, so figures are approximations rather than exact tokenizer counts. Use verbose mode for per-file breakdowns when precise diagnosis is needed.