Token Budget — Paste File Sizes, Get Share of the Window
Estimate token shares from file-size rows and a context-window size. Characters ÷ 4 is an English-oriented heuristic and can underestimate Japanese text; the package states this limitation up front.
$5
Works with the AI Agents you already use
Token Budget — Paste File Sizes, Get Share of the Window
Example session with this skill installed
python3 scripts/token_budget.py examples/files.csv --window 10000
- Read your context and instructions
- Compiled the token budget
- Generated the data export
Input (examples/files.csv):
file,size,unit
README.md,1200,characters
src/app.py,900,characters
notes-ja.txt,2400,characters
meeting-notes.txt,750,words
Output
Rough estimate only. The characters ÷ 4 rule is an English-oriented heuristic; Japanese text often uses more tokens per character, so this can underestimate Japanese text. Actual tokenization depends on the model and content.
Formula: characters ÷ chars-per-token; words ÷ words-per-token; share = estimate ÷ window × 100
Window: 10000 estimated tokens
Total: 2125.00 tokens; over window: false
File | Estimate | Share | Over window
meeting-notes.txt | 1000.00 | 10.00% | false
notes-ja.txt | 600.00 | 6.00% | false
README.md | 300.00 | 3.00% | false
src/app.py | 225.00 | 2.25% | false
files.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Send a table of file names and character or word counts, plus a context-window size. Get rough token estimates, each file's share of the window, a size-ranked table, and a marker when the total estimate exceeds the window.
Input: a CSV or TSV with the columns file, size and unit (characters, chars or words). Rows may use different units. Character rows use size ÷ chars-per-token (default 4); word rows use size ÷ words-per-token (default 0.75). The tool does not open the files; it works only from the sizes you supply. Input is limited to 100,000 bytes and 2,000 rows, and malformed rows are reported by row number.
Options: --window (required), --chars-per-token, --words-per-token, --format text|markdown|json|csv, --delimiter, --sort, --min-share, --limit and --output. The report can be written to a new file; existing paths are never overwritten.
Limits: this is a rough estimate, not an exact tokenizer. Characters ÷ 4 is an English-oriented heuristic, and Japanese text often uses more tokens per character, so it can underestimate Japanese text. It does not inspect file contents, count system prompts or message formatting, identify a model's actual context limit, or recommend files to remove.
Included: the Python script (standard library only), unit tests, a sample table and its sample report, and a README.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Rough estimate only, not an exact tokenizer. Characters ÷ 4 is an English-oriented heuristic and can underestimate Japanese text. It does not inspect file contents, count system prompts or message formatting, identify a model's actual context limit, or recommend files to remove. Input is limited to 100,000 bytes and 2,000 rows.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
- Software
Python 3.9+