Communitygithub.com

토큰 예산 조언자

응답 흐름을 가로채서 Claude가 답변하기 전에 사용자에게 응답 깊이에 대한 선택을 제공합니다.

토큰 예산 조언자란 무엇인가요?

토큰 예산 조언자(TBA)는 사용자가 응답의 길이나 깊이를 제어하고자 할 때 Claude Code와 같은 AI 에이전트가 응답 깊이를 선택하도록 안내하는 기술 스킬입니다. 입력 토큰과 응답 복잡성을 추정하여 25%에서 100%까지 네 가지 깊이 레벨(핵심, 보통, 상세, 완전)을 제시합니다. 사용자가 이전에 레벨을 설정했다면 자동으로 유지하며, '25% 깊이', '짧게', '전체 분석' 같은 명시적 요청은 단축키로 바로 처리합니다. GitHub의 공식 TBA 프로젝트를 기반으로 하며, 정확도는 추정 방식으로 약 85–90% (±15%)입니다. Claude Code 및 히스토리 기반 추정을 지원하는 다른 터미널 AI 에이전트에 적합합니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/token-budget-advisor

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

토큰 예산 조언자 (TBA)

Claude가 답변하기 전에 응답 흐름을 가로채어 사용자에게 응답 깊이에 대한 선택을 제공합니다.

사용 시기

  • 사용자가 응답의 길이나 세부 수준을 제어하고 싶어할 때
  • 사용자가 토큰, 예산, 깊이, 응답 길이를 언급할 때
  • 사용자가 "짧게", "tl;dr", "간략히", "25% 깊이", "완전히" 등을 말할 때
  • 사용자가 깊이/세부 수준을 미리 선택하고자 할 때

트리거하지 마세요: 사용자가 이 세션에서 이미 레벨을 설정한 경우(자동 유지), 또는 답변이 한 줄로 끝나는 경우.

작동 방식

1단계 — 입력 토큰 추정

저장소의 표준 컨텍스트 예산 휴리스틱을 사용하여 프롬프트의 토큰 수를 대략적으로 추정합니다.

컨텍스트 예산과 동일한 보정 가이드를 사용하세요:

  • 일반 텍스트: 단어 수 × 1.3
  • 코드 위주 또는 혼합/코드 블록: 문자 수 / 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 — Token Budget Advisor for Claude Code의 독립형 스킬입니다. 원본 프로젝트에는 Python 추정기 스크립트도 포함되어 있지만, 이 저장소는 스킬을 자체 포함 휴리스틱 전용으로 유지합니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

관련 스킬