Files
everything-claude-code/docs/zh-CN/commands/context-budget.md

30 lines
973 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 分析跨代理、技能、MCP服务器和规则的上下文窗口使用情况以寻找优化机会。有助于减少令牌开销并避免性能警告。
---
# 上下文预算优化器
分析您的 Claude Code 设置中的上下文窗口消耗,并提供可操作的建议以减少令牌开销。
## 使用方法
```
/context-budget [--verbose]
```
* 默认:提供摘要及主要建议
* `--verbose`:按组件提供完整细分
$ARGUMENTS
## 操作步骤
运行 **context-budget** 技能(`skills/context-budget/SKILL.md`),并输入以下内容:
1. 如果 `$ARGUMENTS` 中存在 `--verbose` 标志,则传递该标志
2. 除非用户另行指定,否则假设为 200K 上下文窗口Claude Sonnet 默认值)
3. 遵循技能的四个阶段:清单 → 分类 → 检测问题 → 报告
4. 向用户输出格式化的上下文预算报告
该技能负责所有扫描逻辑、令牌估算、问题检测和报告格式化。