---
title: "上下文预算优化器"
description: "分析您的 Claude Code 设置中的上下文窗口消耗，并提供可操作的建议以减少令牌开销。"
type: skill
canonical_url: https://claudary.paisolsolutions.com/skills/context-budget-1
source: "Claudary"
difficulty: intermediate
author: "Claude Code Knowledge Pack"
date: 2026-07-10T11:18:57.998Z
license: CC-BY-4.0
attribution: "上下文预算优化器 — Claudary (https://claudary.paisolsolutions.com/skills/context-budget-1)"
---

# 上下文预算优化器
分析您的 Claude Code 设置中的上下文窗口消耗，并提供可操作的建议以减少令牌开销。

## Overview

---
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. 向用户输出格式化的上下文预算报告

该技能负责所有扫描逻辑、令牌估算、问题检测和报告格式化。

---

Source: [Claudary](https://claudary.paisolsolutions.com/skills/context-budget-1) · https://claudary.paisolsolutions.com
