context-budget-audit

Estimate token consumption across Claude Code components and output prioritized savings recommendations.

6|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/kmshihab7878/claude-code-setup --skill context-budget-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-budget-audit
Source: https://github.com/kmshihab7878/claude-code-setup/tree/main/skills/context-budget-audit
Command: npx skills add https://github.com/kmshihab7878/claude-code-setup --skill context-budget-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Context window capacity is limited and many Claude Code components (agents, skills, MCP servers, hooks, CLAUDE.md) cumulatively consume tokens that degrade performance, increase costs, and shorten session usefulness. This Skill estimates token consumption per component, detects bloated files and configurations, and surfaces high-impact opportunities to reclaim context budget.

Core Features & Use Cases

  • Per-component token estimation using prose and code heuristics to convert file size and structure into token estimates.
  • Aggregated budget reporting that ranks agents, skills, MCP schemas, CLAUDE.md, hooks, memory, and docs by token cost and savings potential.
  • Prioritized recommendations with actionable mitigations such as trimming SKILL.md preambles, enabling progressive loading, and consolidating agents.
  • Use Case: Run after adding new agents or MCP tools to quickly find which additions pushed your total into a warning or red threshold and get a prioritized remediation plan.

Quick Start

Run a full context budget audit across agents, skills, MCP servers, hooks, and CLAUDE.md to produce a token usage summary and prioritized savings recommendations.

Frequently Asked Questions about context-budget-audit

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

FAQPage Schema
How do I audit token consumption across Claude Code components?

You can audit token consumption by running this Skill to estimate per-file token usage across Claude Code agents, skills, MCP servers, hooks, and CLAUDE.md using prose and code heuristics, producing a ranked summary of savings opportunities.

Why does my Claude Code context window degrade after adding new agents?

Context window performance degrades because new agents and MCP configurations cumulatively consume tokens, increasing costs. A context budget audit detects bloated files and surfaces high-impact opportunities to reclaim your context budget.

What is the best way to reduce token waste in Claude Code configurations?

The best way to reduce token waste is to apply prioritized recommendations from a context budget audit, such as trimming SKILL.md preambles, enabling progressive loading, and consolidating agents to reclaim context budget.

Can I measure token usage for MCP servers and CLAUDE.md files?

Yes, you can measure token usage for MCP schemas, CLAUDE.md, hooks, memory, and docs. The audit aggregates token estimates by category to show exactly which components consume the most context budget.

When should I run a context budget audit on my Claude setup?

You should run a context budget audit during maintenance, troubleshooting, or immediately after configuration changes like adding new agents or MCP tools to quickly identify bloated files and wasted context.