context-budget

Scan Claude Code components and generate a token budget report.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/xxih/ai-harness-zh --skill context-budget-xxih
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-budget
Source: https://github.com/xxih/ai-harness-zh/tree/main/references/translations/everything-claude-code/docs/zh-CN/skills/context-budget
Command: npx skills add https://github.com/xxih/ai-harness-zh --skill context-budget-xxih

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes the token usage of all loaded components in a Claude Code session and highlights bloated agents, redundant skills, oversized MCP servers, and verbose CLAUDE.md files, helping you reclaim context space and improve performance.

Core Features & Use Cases

  • Scans agents, skills, rules, MCP configurations, and CLAUDE.md to estimate token consumption.
  • Categorizes components by necessity and flags heavy, redundant, or low‑value items.
  • Generates a concise budget report with prioritized token‑saving recommendations, useful when sessions feel slow, many components have been added, or before expanding the system.

Quick Start

Ask the context-budget skill to evaluate the current project and suggest the top three token-saving actions.

Frequently Asked Questions about context-budget

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

FAQPage Schema
How do I audit token consumption in Claude Code to improve context window performance?

Auditing token consumption in Claude Code involves scanning agents, skills, MCP servers, rules, and CLAUDE.md files to estimate and categorize token usage. This process generates a budget report flagging bloated or redundant components with actionable optimization recommendations to reclaim context space.

Why does my Claude Code session slow down after adding many components?

Claude Code sessions slow down when bloated agents, redundant skills, oversized MCP servers, and verbose CLAUDE.md files consume excessive context window tokens. Running a token budget audit identifies heavy, low-value items and provides prioritized recommendations to trim token waste and restore performance.

Can I check available context capacity before expanding my Claude Code system?

Yes, you can check available context capacity by running a token budget audit before expanding your Claude Code system. The audit performs file scanning and token estimation across all loaded components, generating a report that verifies whether you have enough remaining context capacity for new additions.

How do I identify which MCP servers or agents are wasting context tokens?

To identify wasting context tokens, the audit scans loaded agents, skills, rules, and MCP configurations, estimating token consumption and categorizing components by necessity. It flags heavy, redundant, or oversized items, highlighting specific bloated MCP servers and agents for optimization or removal.

What is the best way to reduce token waste from verbose CLAUDE.md files?

The best way to reduce token waste from verbose CLAUDE.md files is to run a context budget audit that scans and estimates file token consumption. The resulting budget report categorizes these files by necessity and provides prioritized, actionable optimization recommendations to trim verbose content.

Does running a context budget audit require any specific dependencies or components?

Running a context budget audit requires no specific dependencies or components. The Skill independently performs file scanning, token estimation, and categorization across agents, skills, MCP servers, and rules to generate its budget report without needing external tools.