Token Budget — Paste File Sizes, Get Share of the Window

    1

    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

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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

    Generated

    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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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+

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed8 days ago
    Updated4 days ago

    What's inside

    Frequently Asked Questions

    This skill uses deterministic mathematical heuristics based on character and word counts to predict token usage, preventing the arithmetic errors and 'hallucinated' counts often produced by LLMs when they analyze large file manifests.

    No, this skill calculates estimates based on metadata you provide (file names and sizes) rather than reading the raw content, ensuring your sensitive data remains private while staying within the 100,000-byte input limit.

    You receive the standalone 'token_budget.py' Python script, comprehensive documentation on configuration, and sample CSV templates to help you format your file manifests for immediate analysis.

    Yes, you can adjust the character-per-token and word-per-token divisors in the script configuration to better reflect the tokenization density of non-English languages or specific technical formats.

    As a standalone Python utility, it can be integrated into any AI agent workflow that supports script execution, such as AutoGPT, LangChain agents, or custom CI/CD pipelines for RAG data auditing.

    New in LLM Ops