Context Mode Output Sandbox
mksglu/context-mode
Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.
审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。
$ npx skills add affaan-m/ECC --skill context-budget -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install affaan-m/ECC context-budget --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/zh-CN/skills/context-budget .claude/skills/context-budget && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "context-budget" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/context-budget into .claude/skills/context-budget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "context-budget", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/context-budgetType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add affaan-m/ECC --skill context-budget -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install affaan-m/ECC context-budget --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .agents/skills && cp -r skills-src/docs/zh-CN/skills/context-budget .agents/skills/context-budget && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "context-budget" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/context-budget into .agents/skills/context-budget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "context-budget", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add affaan-m/ECC --skill context-budget -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install affaan-m/ECC context-budget --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/docs/zh-CN/skills/context-budget .cursor/skills/context-budget && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "context-budget" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/context-budget into .cursor/skills/context-budget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "context-budget", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/affaan-m/ECC.git --path docs/zh-CN/skills/context-budget--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add affaan-m/ECC --skill context-budget -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install affaan-m/ECC context-budget --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/docs/zh-CN/skills/context-budget .gemini/skills/context-budget && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "context-budget" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/context-budget into .gemini/skills/context-budget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "context-budget", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install affaan-m/ECC context-budgetInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add affaan-m/ECC --skill context-budget -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .github/skills && cp -r skills-src/docs/zh-CN/skills/context-budget .github/skills/context-budget && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "context-budget" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/context-budget into .github/skills/context-budget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "context-budget", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add affaan-m/ECC --skill context-budget -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install affaan-m/ECC context-budget --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/docs/zh-CN/skills/context-budget .opencode/skills/context-budget && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "context-budget" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/context-budget into .opencode/skills/context-budget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "context-budget", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
context-budget审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。
Context Budget is an agent skill from affaan-m/ECC. 审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。
Its SKILL.md is about 710 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows, covering Context engineering. It works with Model Context Protocol. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.
Read from SKILL.md and the folder at commit 2d515e4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context Budget loads about 709 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 148 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from affaan-m/ECC at commit 2d515e4, republished under its MIT licence (© affaan-m). 148 words, ~709 tokens.
.claude/skills/context-budget/SKILL.md (or your agent's skills folder).分析 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 中引用 | 考虑按需激活 |
| 很少需要 | 无命令引用,内容重叠,或无明显的项目匹配 | 移除或延迟加载 |
识别以下问题模式:
生成上下文预算报告:
上下文预算报告
═══════════════════════════════════════
总预估开销:约 XX,XXX 个词元
上下文模型:Claude Sonnet (200K 窗口)
有效可用上下文:约 XXX,XXX 个词元 (XX%)
组件细分:
┌─────────────────┬────────┬───────────┐
│ 组件 │ 数量 │ 词元数 │
├─────────────────┼────────┼───────────┤
│ Agents │ N │ ~X,XXX │
│ Skills │ N │ ~X,XXX │
│ Rules │ N │ ~X,XXX │
│ MCP tools │ N │ ~XX,XXX │
│ CLAUDE.md │ N │ ~X,XXX │
└─────────────────┴────────┴───────────┘
WARNING: 发现的问题 (N):
[按可节省词元数排序]
前 3 项优化建议:
1. [action] → 节省约 X,XXX 个词元
2. [action] → 节省约 X,XXX 个词元
3. [action] → 节省约 X,XXX 个词元
潜在节省空间:约 XX,XXX 个词元 (占当前开销的 XX%)在详细模式下,额外输出每个文件的令牌计数、最繁重文件的行级细分、重叠组件之间的具体冗余行,以及 MCP 工具列表和每个工具模式大小的估算。
基本审计
/context-budget
技能:扫描设置 → 16个代理(12,400个令牌),28个技能(6,200),87个MCP工具(43,500),2个CLAUDE.md(1,200)
标记:3个重型代理,14个MCP服务器(3个可替换为CLI)
最高节省:移除3个MCP服务器 → -27,500个令牌(减少47%开销)详细模式
/context-budget --verbose
技能:完整报告 + 按文件细目显示 planner.md(213 行,1,840 个令牌),
MCP 工具列表及每个工具的大小,重复规则行并排显示扩容前检查
User: 我想再添加5个MCP服务器,有空间吗?
Skill: 当前开销33% → 添加5个服务器(约50个工具)会增加约25,000个tokens → 开销将升至45%
建议:先移除2个可用CLI替代的服务器以保持在40%以下words × 1.3,对代码密集型文件使用 chars / 4© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in docs/zh-CN/skills/context-budget of affaan-m/ECC.
Open the folder on GitHubat commit 2d515e4
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in affaan-m/ECC, which our catalogue first saw on October 7, 2026.
Context Budget next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Context Budget this skillaffaan-m/ECC | 277k | 1 repos | ~709 | Automated safety check: Pass | MIT | |
| Context Mode Output Sandboxmksglu/context-mode | 26k | — | ~4.1k | Automated safety check: Pass | Custom licence | |
| Context Mode for Antigravity CLImksglu/context-mode | 26k | — | ~850 | Automated safety check: Pass | Custom licence | |
| Base HelpChristopherKahler/base | 292 | — | ~2.6k | Automated safety check: Pass | Custom licence | |
| LemmalogJordyZomer/lemmalog | 329 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Cortex Mem MCPsopaco/cortex-mem | 313 | — | ~2.8k | Automated safety check: Pass | MIT |
mksglu/context-mode
Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.
mksglu/context-mode
Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.
ChristopherKahler/base
Coach mode for the base CLI: teaches what to do and why, rather than just answering.
JordyZomer/lemmalog
Externalize working memory and logical state into the lemmalog Datalog engine (MCP).
sopaco/cortex-mem
Persistent memory enhancement for AI agents. An agent skill from sopaco/cortex-mem.
Context-Engine-AI/Context-Engine
Rules for choosing Qdrant-Indexer semantic search over grep or file reads when exploring code, debugging or asking where and why questions.
affaan-m/ECC
Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.
affaan-m/ECC
Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.
affaan-m/ECC
Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.
affaan-m/ECC
Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.
affaan-m/ECC
Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.
affaan-m/ECC
Set an ECC-specific frontend design direction for production UI work.
Works with
Categories
审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。. Context Budget is an agent skill from affaan-m/ECC.
Context Budget fits situations like: tasks that involve Context engineering.
Run `npx skills add affaan-m/ECC --skill context-budget -a claude-code`. Or copy the skill folder (docs/zh-CN/skills/context-budget in affaan-m/ECC) into .claude/skills/context-budget in your project. Claude Code loads it when a task matches its description.
Run `npx skills add affaan-m/ECC --skill context-budget -a codex`. Or copy the skill folder (docs/zh-CN/skills/context-budget in affaan-m/ECC) into .agents/skills/context-budget in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill context-budget -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-budget, .gemini/skills/context-budget, .github/skills/context-budget and .opencode/skills/context-budget in your project.
SKILL.md names no scripts, command-line tools or credentials: Context Budget is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Context Budget is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 709 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Context Budget: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars), Base Help (ChristopherKahler/base, 292 stars) and Lemmalog (JordyZomer/lemmalog, 329 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,673 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 11, 2026.
Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.