Agent skill

Token Budget Advisor

by affaan-m in affaan-m/ECC

回答する前に、どれだけの回答深度を消費するかについてユーザーに情報に基づいた選択を提供する。ユーザーが回答の長さ、深さ、またはトークンバジェットを明示的に制御したい場合にこのスキルを使用する。トリガー条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth"…

MITAuto-check passedAI & LLM Engineering

Install Token Budget Advisor

skills CLI
$ npx skills add affaan-m/ECC --skill token-budget-advisor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC token-budget-advisor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/ja-JP/skills/token-budget-advisor .claude/skills/token-budget-advisor && rm -rf skills-src

Use ~/.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/

Facts

Skill name
token-budget-advisor
GitHub stars
276k
Token cost
~910 tokens
SKILL.md length
139 words
Files
1
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

回答する前に、どれだけの回答深度を消費するかについてユーザーに情報に基づいた選択を提供する。ユーザーが回答の長さ、深さ、またはトークンバジェットを明示的に制御したい場合にこのスキルを使用する。トリガー条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth"…

  • Tasks that involve LLM cost and token optimization
  • SKILL.md covers 使用場面, 動作原理, ショートカット——質問をスキップ and 精度について, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

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…

Its SKILL.md is about 910 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.

When your agent uses it

  • Tasks that involve LLM cost and token optimization

Example prompts

  • “token budget”
  • “token count”
  • “token usage”
  • “/token-budget-advisor”

What it can do on your machine

Read from SKILL.md and the folder at commit 4eb71d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Token Budget Advisor loads about 910 tokens when it runs. Until then it costs about 142 tokens; SKILL.md has 139 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~142
When it runs · the whole SKILL.md, loaded when a task matches
~910

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from affaan-m/ECC at commit 4eb71d9, republished under its MIT licence (© affaan-m). 139 words, ~910 tokens.

Download SKILL.mdSave it as .claude/skills/token-budget-advisor/SKILL.md (or your agent's skills folder).
name
token-budget-advisor
description
回答する前に、どれだけの回答深度を消費するかについてユーザーに情報に基づいた選択を提供する。ユーザーが回答の長さ、深さ、またはトークンバジェットを明示的に制御したい場合にこのスキルを使用する。トリガー条件:"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」が認証/セッション/支払いトークンを指している。
origin
community

トークンバジェットアドバイザー(TBA)

Claudeが回答する前にレスポンスフローをインターセプトし、ユーザーが回答の深さを選択できるようにする。

使用場面

  • ユーザーが回答の長さや詳細度を制御したい場合
  • ユーザーがトークン、バジェット、深さ、または回答の長さに言及する場合
  • ユーザーが「短いバージョン」「TL;DR」「簡潔に」「25%」「詳細に」などと言う場合
  • ユーザーが事前に深さ/詳細度を選択したい場合

トリガーしない場合:ユーザーが本セッションですでにレベルを設定している(静かに維持)、または回答が本質的に一行。

動作原理

ステップ 1 — 入力トークンを推定する

リポジトリの標準コンテキストバジェットのヒューリスティックスを使用して、プロンプトのトークン数を頭の中で推定する。

context-budget と同じキャリブレーションガイドラインを使用する:

  • 散文:words × 1.3
  • コード集約またはコード混在/コードブロック:chars / 4

混在コンテンツの場合、支配的なコンテンツタイプを使用し、推定ヒューリスティックスを保持する。

ステップ 2 — 複雑度に応じてレスポンスサイズを推定する

プロンプトを分類し、乗数範囲を適用して完全なレスポンスウィンドウを得る:

複雑度乗数範囲プロンプト例
シンプル3× – 8×「Xとは何ですか?」、はい/いいえの質問、単一の事実
中程度8× – 20×「Xはどのように機能しますか?」
中〜高10× – 25×コンテキスト付きのコードリクエスト
複雑15× – 40×マルチパート分析、比較、アーキテクチャ
クリエイティブ10× – 30×ストーリー、散文、ナラティブライティング

レスポンスウィンドウ = input_tokens × mult_min から input_tokens × mult_max(ただしモデルの設定済み出力トークン制限を超えない)。

ステップ 3 — 深さのオプションを提示する

回答する前に、実際に推定した数値を使用してこのブロックを提示する:

プロンプトを分析中...

入力:~[N] トークン  |  タイプ:[タイプ]  |  複雑度:[レベル]  |  言語:[言語]

深さレベルを選択してください:

[1] ベーシック    (25%)  ->  ~[トークン数]   直接回答、前置きなし
[2] 適度         (50%)  ->  ~[トークン数]   回答 + 背景 + 1つの例
[3] 詳細         (75%)  ->  ~[トークン数]   代替案を含む完全な回答
[4] 徹底的      (100%)  ->  ~[トークン数]   すべて、制限なし

どのレベルを選択しますか?(1-4 または「25%の深さ」「50%の深さ」「75%の深さ」「100%の深さ」)

精度:ヒューリスティック推定、約85〜90%の精度(±15%)。

各レベルのトークン推定(レスポンスウィンドウ内):

  • 25% → min + (max - min) × 0.25
  • 50% → min + (max - min) × 0.50
  • 75% → min + (max - min) × 0.75
  • 100% → max
ステップ 4 — 選択されたレベルで回答する
レベル目標の長さ含む内容省略する内容
25% コア最大2〜4文直接回答、重要な結論コンテキスト、例、ニュアンス、代替案
50% 適度1〜3段落回答 + 必要なコンテキスト + 1つの例深い分析、エッジケース、参考文献
75% 詳細構造化された回答複数の例、長所/短所、代替案極端なエッジケース、網羅的な参考文献
100% 徹底的制限なしすべて——完全な分析、すべてのコード、すべての視点なし

ショートカット——質問をスキップ

ユーザーがすでにレベルを示している場合、質問せずにそのレベルで即座に回答する:

ユーザーの発言レベル
「1」/「25%の深さ」/「短いバージョン」/「簡潔に」/「TL;DR」25%
「2」/「50%の深さ」/「適度の深さ」/「バランスの取れた回答」50%
「3」/「75%の深さ」/「詳細な回答」/「包括的な回答」75%
「4」/「100%の深さ」/「徹底的な回答」/「完全で詳細な分析」100%

ユーザーが本セッションですでにレベルを設定している場合、ユーザーが変更しない限り後続の回答も静かにそのレベルを維持する。

精度について

このスキルはヒューリスティック推定を使用する——実際のトークナイザーではない。精度は約85〜90%で偏差は±15%。常に免責事項を表示する。

例

トリガーシナリオ
  • 「まず短いバージョンをください。」
  • 「あなたの回答は何トークン使いますか?」
  • 「50%の深さで回答してください。」
  • 「徹底的な回答が欲しい、サマリーはいらない。」
  • 「まず短いバージョン、次に詳細なバージョンをください。」
トリガーしないシナリオ
  • 「JWTトークンとは何ですか?」
  • 「チェックアウトフローは支払いトークンを使用しています。」
  • 「これは正常ですか?」
  • 「リファクタリングを完了してください。」
  • ユーザーが本セッションの深さを選択した後の後続の質問

出典

TBA — Claude CodeのToken Budget Advisorから引用した独立スキル。 元のプロジェクトには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

Files

Just SKILL.md in docs/ja-JP/skills/token-budget-advisor of affaan-m/ECC.

Open the folder on GitHubat commit 4eb71d9

Compare with similar skills

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.

Token Budget Advisor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Token Budget Advisor this skillaffaan-m/ECC276k—~910Automated safety check: PassMIT
Context Compressionguanyang/open-agent-hub9772 repos~4.6kAutomated safety check: PassMIT
Bounty Hunter1sadjlk/bounty-hunter-skill2821 repos~761Automated safety check: PassMIT
Skill Shortenerluongnv89/asm955—~3.8kAutomated safety check: NotesMIT
Context Auditundefined-ui/second-brain-os1k—~802Automated safety check: PassMIT
Headroommomori777/Artemis380—~562Automated safety check: PassMIT

Similar skills

  • 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…

    977 GitHub starsUsed in 2 repos~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Bounty Hunter

    1sadjlk/bounty-hunter-skill

    A professional AI bounty hunter persona named Atlas. An agent skill from 1sadjlk/bounty-hunter-skill.

    282 GitHub starsUsed in 1 repo~761 tokens
    AI & LLM EngineeringAuto-check passed
  • Skill Shortener

    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.

    955 GitHub stars~3.8k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Context Audit

    undefined-ui/second-brain-os

    Audit an agent's context layout against the four places: system prompt, tools, history, tail.

    1k GitHub stars~802 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Headroom

    momori777/Artemis

    SmartCrusher + CCR context compression — crunch large JSON arrays, tool outputs, and search results to save tokens.

    380 GitHub stars~562 tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed
  • AI

    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

    534 GitHub stars~1.1k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    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.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    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.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    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.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    277k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Token Budget Advisor

What does Token Budget Advisor do?

回答する前に、どれだけの回答深度を消費するかについてユーザーに情報に基づいた選択を提供する。ユーザーが回答の長さ、深さ、またはトークンバジェットを明示的に制御したい場合にこのスキルを使用する。トリガー条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth"…. Token Budget Advisor is an agent skill from affaan-m/ECC.

When should I use Token Budget Advisor?

Token Budget Advisor fits situations like: tasks that involve LLM cost and token optimization.

How do I install Token Budget Advisor in Claude Code?

Run `npx skills add affaan-m/ECC --skill token-budget-advisor -a claude-code`. Or copy the skill folder (docs/ja-JP/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.

How do I install Token Budget Advisor in Codex?

Run `npx skills add affaan-m/ECC --skill token-budget-advisor -a codex`. Or copy the skill folder (docs/ja-JP/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.

Can I use Token Budget Advisor in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Token Budget Advisor need to run?

SKILL.md names no scripts, command-line tools or credentials: Token Budget Advisor is instructions for the agent only.

Does Token Budget Advisor access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Token Budget Advisor safe to install?

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.

What licence does Token Budget Advisor use?

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.

How many tokens does Token Budget Advisor use?

About 910 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Token Budget Advisor?

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.

Who maintains Token Budget Advisor?

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.