Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
affaan-m avatar

Token Budget Advisor

  • 4.5k installs
  • 238k repo stars
  • Updated August 5, 2026
  • affaan-m/everything-claude-code

A skill that interrupts Claude's response pipeline to prompt users for answer depth selection (25%, 50%, 75%, 100%) using heuristic token estimation before generation.

About

Token Budget Advisor (TBA) intercepts Claude's response flow before answering, allowing users to select answer depth (25%, 50%, 75%, 100%) based on token budget constraints. It estimates input tokens using prose (words × 1.3) or code (chars / 4) heuristics, classifies prompt complexity (simple to complex), applies multiplier ranges (3× - 40×) to estimate full response windows, then presents depth options with token estimates. Users trigger it by mentioning token count, response length, or depth control; shortcut phrases like "TL;DR" or "detailed" skip the menu. Each depth level defines content scope: 25% gives core answer only; 50% adds context and one example; 75% includes alternatives and analysis; 100% covers everything. Accuracy is ~85 - 90% (±15%) using heuristic estimation, not tokenization. Estimates input tokens via prose (×1.3) or code (÷4) heuristics before responding Classifies complexity (simple - complex) and applies 3× - 40× multiplier ranges to predict response windows Presents four depth levels with estimated token counts; users select 25%, 50%, 75%, or 100% Supports shortcut triggers ("short", "TL;DR", "detailed")

  • Estimates input tokens via prose (×1.3) or code (÷4) heuristics before responding
  • Classifies complexity (simple - complex) and applies 3× - 40× multiplier ranges to predict response windows
  • Presents four depth levels with estimated token counts; users select 25%, 50%, 75%, or 100%
  • Supports shortcut triggers ("short", "TL;DR", "detailed") to skip the menu and respond immediately
  • Maintains selected depth level silently across subsequent questions in session

Token Budget Advisor by the numbers

  • 4,502 all-time installs (skills.sh)
  • +251 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #167 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: CRITICAL risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

token-budget-advisor capabilities & compatibility

Capabilities
token count estimation via heuristics · prompt complexity classification · response window prediction · depth level menu presentation · session persistent depth tracking
Use cases
token optimization
From the docs

What token-budget-advisor says it does

ユーザーが回答の深さを選択できるようにする。
SKILL.md, intro
入力:~[N] トークン | タイプ:[タイプ] | 複雑度:[レベル] | 言語:[言語]
SKILL.md, Step 3 menu block
精度:ヒューリスティック推定、約85〜90%の精度(±15%)。
SKILL.md, precision section
npx skills add https://github.com/affaan-m/everything-claude-code --skill token-budget-advisor

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs4.5k
repo stars238k
Security audit2 / 3 scanners passed
Last updatedAugust 5, 2026
Repositoryaffaan-m/everything-claude-code

What it does

Intercept Claude responses to let users choose answer depth and token consumption before generation.

Who is it for?

Interactive AI workflows where users want explicit control over response scope, token budgets, or answer detail level.

Skip if: One-word factual queries, authentication/session tokens, or scenarios where response is inherently brief.

When should I use this skill?

User mentions token budget, token count, response length, answer depth, or shortcut phrases like TL;DR, brief answer, detailed answer, short version.

What you get

Users make informed depth choices upfront, reducing token waste and improving response relevance to their actual constraints.

  • depth option menu
  • token-conscious response

By the numbers

  • 4 depth levels (25%, 50%, 75%, 100%)
  • Multiplier ranges 3× - 40× based on complexity
  • ~85 - 90% heuristic estimation accuracy (±15%)

Files

SKILL.mdMarkdownGitHub ↗

トークンバジェットアドバイザー(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推定スクリプトも付属しているが、本リポジトリではスキルを自己完結型に保ち、ヒューリスティックスのみを使用する。

Related skills

Forks & variants (1)

Token Budget Advisor has 1 known copy in the catalog totaling 1.4k installs. They canonicalize to this original listing.

How it compares

Pick token-budget-advisor when the user explicitly wants depth or token control; skip it for standard implementation tasks without length constraints.

FAQ

Is the token estimate accurate?

Estimates use heuristics (prose ×1.3, code ÷4) with ~85 - 90% accuracy (±15%); not actual tokenization. Disclaimer always shown.

Do I have to choose a depth every time?

No. Once you pick a level in a session, all subsequent answers silently maintain that level unless you change it.

What if I say '25%' or 'detailed'?

Shortcuts skip the menu; TBA responds immediately at that depth without asking.

Is Token Budget Advisor safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.