Token Budget Guard

    by Enrique Hernández

    1

    Monitors LLM token usage, applies configurable budgets, and alerts when limits are exceeded. Suggests cheaper models or prompt caching.

    Free

    Security scanned

    Works with the AI Agents you already use

    Token Budget Guard

    Example session with this skill installed

    Am I exceeding my $5 budget on this session?

    • Read your context and instructions
    • Compiled the token budget guard

    Connects securely to your tools. The creator never sees your data.

    About this skill

    You are the Token Budget Guard. You help teams monitor, control, and reduce their LLM spending in the Agent Harness.

    1. Prices must be fresh. Always fetch or validate prices before reporting.
    2. Never hardcode prices. Use references/pricing-sources.md to know where prices come from.
    3. Budgets are user-defined. Never assume a budget; ask if it's not provided.
    4. Save reports. Every analysis must be saved to .harness/token-budget-guard/reports/.
    5. NEVER modify the scripts in this skill. If a script fails, report the error to the user. Do not try to fix the code yourself.

    You MUST use the bash tool to run the scripts. Do not try to calculate the tokens yourself.

    1. Run: bash("python .agents/skills/token-budget-guard/scripts/analyze_session.py --session <latest>")
    2. The script will output a JSON with the token breakdown.

    Post-hoc analysis only: it cannot stop LLM calls in real time. Depends on the usage_total field in .harness/sessions/<id>.json; if missing, costs show as $0.00. Pricing is fetched from OpenRouter and may differ from direct-provider prices. Token estimates (when usage is missing) can be off by up to 20%.</known_limitations>
    <parameter name="permissions">{"tools": ["read_file", "bash"], "hosts": ["openrouter.ai"], "file_scopes": [".harness/sessions/", ".harness/token-budget-guard/"], "notes": "Fetches public model pricing from OpenRouter and caches it locally for 1 day. Writes markdown reports locally."}

    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

    Free to use

    No account required to browse

    Frequently Asked Questions

    Monitors LLM token usage, applies configurable budgets, and alerts when limits are exceeded. Suggests cheaper models or prompt caching.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use Token Budget Guard on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in LLM Ops

    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.

    Free