Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "context-budget" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/context-budget/SKILL.md 2. 保存为 ~/.claude/skills/context-budget/SKILL.md 3. 装好后重载技能,告诉我可以用了
Analyze token overhead across every loaded component in a Claude Code session and surface actionable optimizations to reclaim context space.
/context-budget command (this skill backs it)Scan all component directories and estimate token consumption:
Agents (agents/*.md)
description frontmatter lengthSkills (skills/*/SKILL.md)
.agents/skills/ — skip identical copies to avoid double-countingRules (rules/**/*.md)
MCP Servers (.mcp.json or active MCP config)
gh, git, npm, supabase, vercel)CLAUDE.md (project + user-level)
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 |
| Sometimes needed | Domain-specific (e.g. language patterns), not referenced in CLAUDE.md | Consider on-demand activation |
| Rarely needed | No command reference, overlapping content, or no obvious project match | Remove or lazy-load |
Identify the following problem patterns:
Produce the context budget report:
Context Budget Report
═══════════════════════════════════════
Total estimated overhead: ~XX,XXX tokens
Context model: Claude Sonnet (200K window)
Effective available context: ~XXX,XXX tokens (XX%)
Component Breakdown:
┌─────────────────┬────────┬───────────┐
│ Component │ Count │ Tokens │
├─────────────────┼────────┼───────────┤
│ Agents │ N │ ~X,XXX │
│ Skills │ N │ ~X,XXX │
│ Rules │ N │ ~X,XXX │
│ MCP tools │ N │ ~XX,XXX │
│ CLAUDE.md │ N │ ~X,XXX │
└─────────────────┴────────┴───────────┘
WARNING: Issues Found (N):
[ranked by token savings]
Top 3 Optimizations:
1. [action] → save ~X,XXX tokens
2. [action] → save ~X,XXX tokens
3. [action] → save ~X,XXX tokens
Potential savings: ~XX,XXX tokens (XX% of current overhead)
In verbose mode, additionally output per-file token counts, line-by-line breakdown of the heaviest files, specific redundant lines between overlapping components, and MCP tool list with per-tool schema size estimates.
Basic audit
User: /context-budget
Skill: Scans setup → 16 agents (12,400 tokens), 28 skills (6,200), 87 MCP tools (43,500), 2 CLAUDE.md (1,200)
Flags: 3 heavy agents, 14 MCP servers (3 CLI-replaceable)
Top saving: remove 3 MCP servers → -27,500 tokens (47% overhead reduction)
Verbose mode
…
帮助处理退货授权、验收判定、退款防欺诈与保修索赔流程。
帮助开发者使用 Bun 进行运行、打包、测试与依赖管理,并评估替代 Node 的时机。
帮助开发者在 Node.js 与 TypeScript 中正确使用以太坊 Keccak-256 哈希。
提供 Nuxt 4 的 SSR 安全、性能优化与数据获取最佳实践模式
通过 fal.ai 一站式生成图片、视频与音频内容,满足多模态创作需求
帮助你设计 Quarkus 3 后端架构模式,覆盖消息、REST、数据访问与异步处理。