بنقرة واحدة
context-budget
审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
Use when Codex is asked to create, redesign, or improve frontend websites, landing pages, app UIs, dashboards, admin screens, components, prototypes, or browser-based presentation decks, especially when the request mentions a brand, color palette, visual mood, industry, or polished UI/UX.
Retrieve and adapt DESIGN.md-style references from getdesign.md into production-quality HTML/CSS/JS. Use this skill whenever the user asks for a UI, landing page, dashboard, component, or single-file HTML inspired by a company name, brand style, concept, color palette, mood, emotion, or getdesign.md catalog entry. This skill should trigger even when the user does not explicitly say "DESIGN.md" if they ask for code that feels like Stripe, Linear, Airbnb, Apple, Nike, Vercel, Notion, Supabase, fintech, luxury automotive, editorial media, developer tools, playful SaaS, cinematic dark, warm minimal, etc.
A skill to capture conversation context and generate formatted documentation for the Chanhee Workspace Markdown Reader. Use this whenever the user wants to summarize work, document a development phase, or record research findings. Supported modes: /workspace-docs summary, /workspace-docs develop, /workspace-docs research.
| name | context-budget |
| description | 审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。 |
| origin | ECC |
分析 Claude Code 会话中每个已加载组件的令牌开销,并提供可操作的优化建议以回收上下文空间。
/context-budget 命令(本技能为其提供支持)扫描所有组件目录并估算令牌消耗:
代理 (agents/*.md)
description 前言长度技能 (skills/*/SKILL.md)
.agents/skills/ 中的重复副本 — 跳过相同副本以避免重复计数规则 (rules/**/*.md)
MCP 服务器 (.mcp.json 或活动的 MCP 配置)
gh, git, npm, supabase, vercel)CLAUDE.md(项目级 + 用户级)
将每个组件归入一个类别:
| 类别 | 标准 | 操作 |
|---|---|---|
| 始终需要 | 在 CLAUDE.md 中被引用,支持活动命令,或匹配当前项目类型 | 保留 |
| 有时需要 | 特定领域(例如语言模式),未在 CLAUDE.md 中引用 | 考虑按需激活 |
| 很少需要 | 无命令引用,内容重叠,或无明显的项目匹配 | 移除或延迟加载 |
识别以下问题模式:
生成上下文预算报告:
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 │
└─────────────────┴────────┴───────────┘
⚠ 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)
在详细模式下,额外输出每个文件的令牌计数、最繁重文件的行级细分、重叠组件之间的具体冗余行,以及 MCP 工具列表和每个工具模式大小的估算。
基本审计
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)
详细模式
User: /context-budget --verbose
Skill: Full report + per-file breakdown showing planner.md (213 lines, 1,840 tokens),
MCP tool list with per-tool sizes, duplicated rule lines side by side
扩容前检查
User: I want to add 5 more MCP servers, do I have room?
Skill: Current overhead 33% → adding 5 servers (~50 tools) would add ~25,000 tokens → pushes to 45% overhead
Recommendation: remove 2 CLI-replaceable servers first to stay under 40%
words × 1.3,对代码密集型文件使用 chars / 4