Chuyển đến nội dung
Skillpedia
Tự động hóa280k · #425

token-budget-advisor

Skill này làm gì

Giúp bạn kiểm soát độ dài câu trả lời của AI. Trước khi trả lời, nó ước tính số “token” (các đoạn văn bản nhỏ) mà câu trả lời sẽ dùng và đưa ra các mức độ chi tiết (ngắn, vừa, chi tiết, toàn diện).

Khi nào nên dùng

  • ✓Khi bạn muốn câu trả lời ngắn hơn hoặc dài hơn.
  • ✓Khi bạn lo lắng về việc dùng “token” hoặc kích thước câu trả lời.
  • ✓Khi bạn yêu cầu một bản “tóm tắt” hoặc một câu trả lời “đầy đủ”.

Liên kết skill

https://github.com/affaan-m/ECC/blob/main/skills/token-budget-advisor/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/affaan-m/ECC/blob/main/skills/token-budget-advisor/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy cho tôi một câu trả lời ngắn về cách làm bánh.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI trước tiên ước tính số “token” câu hỏi của bạn dùng. Sau đó, nó tính kích thước câu trả lời dự kiến dựa trên độ phức tạp của câu hỏi và đưa ra các mức độ chi tiết (25%, 50%, 75%, 100%).

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Token Budget Advisor (TBA)

Intercept the response flow to offer the user a choice about response depth before Claude answers.

When to Use

  • User wants to control how long or detailed a response is
  • User mentions tokens, budget, depth, or response length
  • User says "short version", "tldr", "brief", "al 25%", "exhaustive", etc.
  • Any time the user wants to choose depth/detail level upfront

Do not trigger when: user already set a level this session (maintain it silently), or the answer is trivially one line.

How It Works

Step 1 — Estimate input tokens

Use the repository's canonical context-budget heuristics to estimate the prompt's token count mentally.

Use the same calibration guidance as context-budget:

  • prose: words × 1.3
  • code-heavy or mixed/code blocks: chars / 4

For mixed content, use the dominant content type and keep the estimate heuristic.

Step 2 — Estimate response size by complexity

Classify the prompt, then apply the multiplier range to get the full response window:

Complexity Multiplier range Example prompts
Simple 3× – 8× "What is X?", yes/no, single fact
Medium 8× – 20× "How does X work?"
Medium-High 10× – 25× Code request with context
Complex 15× – 40× Multi-part analysis, comparisons, architecture
Creative 10× – 30× Stories, essays, narrative writing

Response window = input_tokens × mult_min to input_tokens × mult_max (but don’t exceed your model’s configured output-token limit).

Step 3 — Present depth options

Present this block before answering, using the actual estimated numbers:

Analyzing your prompt...

Input: ~[N] tokens  |  Type: [type]  |  Complexity: [level]  |  Language: [lang]

Choose your depth level:

[1] Essential   (25%)  ->  ~[tokens]   Direct answer only, no preamble
[2] Moderate    (50%)  ->  ~[tokens]   Answer + context + 1 example
[3] Detailed    (75%)  ->  ~[tokens]   Full answer with alternatives
[4] Exhaustive (100%)  ->  ~[tokens]   Everything, no limits

Which level? (1-4 or say "25% depth", "50% depth", "75% depth", "100% depth")

Precision: heuristic estimate ~85-90% accuracy (±15%).

Level token estimates (within the response window):

  • 25% → min + (max - min) × 0.25
  • 50% → min + (max - min) × 0.50
  • 75% → min + (max - min) × 0.75
  • 100% → max

Step 4 — Respond at the chosen level

Level Target length Include Omit
25% Essential 2-4 sentences max Direct answer, key conclusion Context, examples, nuance, alternatives
50% Moderate 1-3 paragraphs Answer + necessary context + 1 example Deep analysis, edge cases, references
75% Detailed Structured response Multiple examples, pros/cons, alternatives Extreme edge cases, exhaustive references
100% Exhaustive No restriction Everything — full analysis, all code, all perspectives Nothing

Shortcuts — skip the question

If the user already signals a level, respond at that level immediately without asking:

What they say Level
"1" / "25% depth" / "short version" / "brief answer" / "tldr" 25%
"2" / "50% depth" / "moderate depth" / "balanced answer" 50%
"3" / "75% depth" / "detailed answer" / "thorough answer" 75%
"4" / "100% depth" / "exhaustive answer" / "full deep dive" 100%

If the user set a level earlier in the session, maintain it silently for subsequent responses unless they change it.

Precision note

This skill uses heuristic estimation — no real tokenizer. Accuracy ~85-90%, variance ±15%. Always show the disclaimer.

Examples

Triggers

  • "Give me the short version first."

…

Câu hỏi thường gặp

“Token” là gì?

Hãy coi “token” như các mẩu của từ. AI dùng token để đo kích thước văn bản mà nó đọc và viết.

Vì sao phải kiểm soát độ dài câu trả lời?

Câu trả lời ngắn nhanh hơn và dùng ít tài nguyên hơn. Câu trả lời dài có thể cung cấp thêm chi tiết và ví dụ.

Số lượng token có chính xác không?

Không, đây là ước tính. AI dùng một phương pháp gần đúng, nhưng thường khá chính xác (khoảng 85-90%).

Chi tiết

Mô tả gốc của tác giả

Offer a choice of response depth (25%/50%/75%/100%) with token estimates before answering, then answer at that level. Use when the user asks to control response length or token budget, such as 'token budget', 'short version', 'brief answer', 'respuesta corta vs larga', 'cuántos tokens', 'ahorrar tokens', 'responde al 50%', 'dame la versión corta', 'quiero controlar cuánto usas'. Skip if depth is a

repo: affaan-m/ECC

Độ phổ biến

Sao GitHub
280k
Vị trí xếp hạng
#425
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự