Context Compression
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
在回答前,为用户提供关于消耗多少响应深度的知情选择。当用户明确希望控制响应长度、深度或令牌预算时使用此技能。触发条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed…
$ npx skills add affaan-m/ECC --skill token-budget-advisor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install affaan-m/ECC token-budget-advisor --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/token-budget-advisor .claude/skills/token-budget-advisor && 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 "token-budget-advisor" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/token-budget-advisor into .claude/skills/token-budget-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-budget-advisor", 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/token-budget-advisorType 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 token-budget-advisor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install affaan-m/ECC token-budget-advisor --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/token-budget-advisor .agents/skills/token-budget-advisor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "token-budget-advisor" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/token-budget-advisor into .agents/skills/token-budget-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-budget-advisor", 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 token-budget-advisor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install affaan-m/ECC token-budget-advisor --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/token-budget-advisor .cursor/skills/token-budget-advisor && 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 "token-budget-advisor" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/token-budget-advisor into .cursor/skills/token-budget-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-budget-advisor", 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/token-budget-advisor--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 token-budget-advisor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install affaan-m/ECC token-budget-advisor --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/token-budget-advisor .gemini/skills/token-budget-advisor && 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 "token-budget-advisor" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/token-budget-advisor into .gemini/skills/token-budget-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-budget-advisor", 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 token-budget-advisorInstalls 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 token-budget-advisor -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/token-budget-advisor .github/skills/token-budget-advisor && 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 "token-budget-advisor" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/token-budget-advisor into .github/skills/token-budget-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-budget-advisor", 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 token-budget-advisor -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 token-budget-advisor --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/token-budget-advisor .opencode/skills/token-budget-advisor && 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 "token-budget-advisor" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/zh-CN/skills/token-budget-advisor into .opencode/skills/token-budget-advisor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-budget-advisor", 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.
token-budget-advisor在回答前,为用户提供关于消耗多少响应深度的知情选择。当用户明确希望控制响应长度、深度或令牌预算时使用此技能。触发条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed…
Token Budget Advisor is an agent skill from affaan-m/ECC. 在回答前,为用户提供关于消耗多少响应深度的知情选择。当用户明确希望控制响应长度、深度或令牌预算时使用此技能。触发条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed answer", "exhaustive answer", "respuesta corta vs larga", "cuántos tokens", "ahorrar tokens", "responde al 50%", "dame la versión corta", "quiero controlar cuánto usas",或用户明确要求控制答案大小或深度的清晰变体。不触发条件:用户已在当前会话中指定了级别(保持该级别),请求明显是单字答案,或"token"指代认证/会话/支付令牌而非响应大小。
Its SKILL.md is about 930 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 AI & LLM Engineering, covering LLM cost and token optimization. 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 4eb71d9. 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.
Links to these hosts (documentation or services it may open):
github.comFrom 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.
Token Budget Advisor loads about 927 tokens when it runs. Until then it costs about 119 tokens; SKILL.md has 145 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 4eb71d9, republished under its MIT licence (© affaan-m). 145 words, ~927 tokens.
.claude/skills/token-budget-advisor/SKILL.md (or your agent's skills folder).在Claude回答之前拦截响应流程,让用户选择回答深度。
不要触发当:用户已在本会话中设置了级别(静默保持),或答案本身只有一行。
使用仓库的标准上下文预算启发式方法,在脑海中估算提示词的token数量。
使用与context-budget相同的校准指南:
words × 1.3chars / 4对于混合内容,使用主导内容类型并保持估算启发式方法。
对提示词进行分类,然后应用乘数范围获取完整响应窗口:
| 复杂度 | 乘数范围 | 示例提示词 |
|---|---|---|
| 简单 | 3× – 8× | "X是什么?",是/否问题,单一事实 |
| 中等 | 8× – 20× | "X是如何工作的?" |
| 中高 | 10× – 25× | 带上下文的代码请求 |
| 复杂 | 15× – 40× | 多部分分析、比较、架构 |
| 创意 | 10× – 30× | 故事、散文、叙事写作 |
响应窗口 = input_tokens × mult_min 到 input_tokens × mult_max(但不要超过模型配置的输出token限制)。
在回答之前呈现此区块,使用实际估算的数字:
分析您的提示...
输入:~[N] 个令牌 | 类型:[类型] | 复杂度:[级别] | 语言:[语言]
选择您的深度级别:
[1] 基础 (25%) -> ~[令牌数] 直接回答,无开场白
[2] 适中 (50%) -> ~[令牌数] 回答 + 背景 + 1个示例
[3] 详细 (75%) -> ~[令牌数] 完整回答及备选方案
[4] 详尽 (100%) -> ~[令牌数] 全部内容,无限制
选择哪个级别?(1-4 或说 "25% 深度", "50% 深度", "75% 深度", "100% 深度")
精确度:启发式估计约 85-90% 准确率(±15%)。各级别token估算(在响应窗口内):
min + (max - min) × 0.25min + (max - min) × 0.50min + (max - min) × 0.75max| 级别 | 目标长度 | 包含内容 | 省略内容 |
|---|---|---|---|
| 25% 核心 | 最多2-4句话 | 直接回答、关键结论 | 上下文、示例、细微差别、替代方案 |
| 50% 适中 | 1-3个段落 | 答案+必要上下文+1个示例 | 深度分析、边界情况、参考文献 |
| 75% 详细 | 结构化回答 | 多个示例、优缺点、替代方案 | 极端边界情况、详尽参考文献 |
| 100% 详尽 | 无限制 | 一切内容——完整分析、所有代码、所有视角 | 无 |
如果用户已表明级别,立即按该级别回答,无需询问:
| 用户所说 | 级别 |
|---|---|
| "1" / "25%深度" / "简短版" / "简要回答" / "太长不看" | 25% |
| "2" / "50%深度" / "适中深度" / "平衡回答" | 50% |
| "3" / "75%深度" / "详细回答" / "全面回答" | 75% |
| "4" / "100%深度" / "详尽回答" / "完整深入分析" | 100% |
如果用户在本会话中已设置级别,后续回答静默保持该级别,除非用户更改。
此技能使用启发式估算——非真实分词器。准确率约85-90%,偏差±15%。始终显示免责声明。
来自TBA — Claude Code的Token预算顾问的独立技能。 原始项目还附带了一个Python估算脚本,但本仓库保持技能自包含且仅使用启发式方法。
© 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/token-budget-advisor of affaan-m/ECC.
Open the folder on GitHubat commit 4eb71d9
Token Budget Advisor 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 |
|---|---|---|---|---|---|---|
| Token Budget Advisor this skillaffaan-m/ECC | 276k | — | ~927 | Automated safety check: Pass | MIT | |
| Context Compressionguanyang/open-agent-hub | 977 | 2 repos | ~4.6k | Automated safety check: Pass | MIT | |
| Bounty Hunter1sadjlk/bounty-hunter-skill | 282 | 1 repos | ~761 | Automated safety check: Pass | MIT | |
| Skill Shortenerluongnv89/asm | 955 | — | ~3.8k | Automated safety check: Notes | MIT | |
| Context Auditundefined-ui/second-brain-os | 1k | — | ~802 | Automated safety check: Pass | MIT | |
| Headroommomori777/Artemis | 380 | — | ~562 | Automated safety check: Pass | MIT |
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
1sadjlk/bounty-hunter-skill
A professional AI bounty hunter persona named Atlas. An agent skill from 1sadjlk/bounty-hunter-skill.
luongnv89/asm
Refactor a too-long SKILL.md by progressive disclosure: measure token cost, classify every section KEEP/CUT/MOVE, shorten the body into references/ and scripts/, verify nothing was lost.
undefined-ui/second-brain-os
Audit an agent's context layout against the four places: system prompt, tools, history, tail.
momori777/Artemis
SmartCrusher + CCR context compression — crunch large JSON arrays, tool outputs, and search results to save tokens.
butterbase-ai/butterbase-skills
A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage
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.
Categories
在回答前,为用户提供关于消耗多少响应深度的知情选择。当用户明确希望控制响应长度、深度或令牌预算时使用此技能。触发条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed…. Token Budget Advisor is an agent skill from affaan-m/ECC.
Token Budget Advisor fits situations like: tasks that involve LLM cost and token optimization.
Run `npx skills add affaan-m/ECC --skill token-budget-advisor -a claude-code`. Or copy the skill folder (docs/zh-CN/skills/token-budget-advisor in affaan-m/ECC) into .claude/skills/token-budget-advisor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add affaan-m/ECC --skill token-budget-advisor -a codex`. Or copy the skill folder (docs/zh-CN/skills/token-budget-advisor in affaan-m/ECC) into .agents/skills/token-budget-advisor 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 token-budget-advisor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/token-budget-advisor, .gemini/skills/token-budget-advisor, .github/skills/token-budget-advisor and .opencode/skills/token-budget-advisor in your project.
SKILL.md names no scripts, command-line tools or credentials: Token Budget Advisor is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: github.com. 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.
Token Budget Advisor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 927 tokens (SKILL.md is roughly 3.7k 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 Token Budget Advisor: Context Compression (guanyang/open-agent-hub, 977 stars), Bounty Hunter (1sadjlk/bounty-hunter-skill, 282 stars), Skill Shortener (luongnv89/asm, 955 stars) and Context Audit (undefined-ui/second-brain-os, 1k 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,111 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 10, 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.