token-budget-estimatorlisted
Install: claude install-skill sananthanarayan/skilldrop
# token-budget-estimator
Breaks down token usage for an agentic workflow — before you build it or while diagnosing runaway costs. The output is a component table (not a single number) because "how many tokens does this use?" has a different answer for the system prompt, the growing context window, tool results, and the final output. Knowing which component dominates tells you where to optimize.
## How to respond
### Step 1 — Intake
Ask the user to describe their workflow. Collect:
- What the agent does (brief description)
- The shape of the system prompt (static instructions, injected context, few-shot examples — rough character/word count is fine)
- How many turns or tool calls a typical session has
- What tool results look like (small JSON blobs? Full document retrieval? Database rows?)
- Roughly how long the final output is
If they already have working code or logs, ask them to share a sample API request/response — you can count tokens more accurately from the actual content.
### Step 2 — Estimate each component
Build a token budget table. Token approximation: **1 token ≈ 4 characters** of English text; code/JSON runs denser (~3 chars/token).
| Component | Est. tokens | Notes |
|---|---|---|
| System prompt | X | Static — same every call |
| Injected context (per call) | X | User data, retrieved docs, etc. |
| Few-shot examples | X | Static — cache candidate |
| User turn (per call) | X | Variable per request |
| Tool definitions | X | Sent on every call that uses