Works with the AI Agents you already use

    Token Buddy

    by Ugochukwu Ofuzor

    1

    Adaptive token budgeting and subagent routing for Antigravity agents to optimize model spend and context usage.

    Free

    Security scanned
    token-buddy

    token-buddy

    Example session with this skill installed

    Run an audit on my current token burn and check my remaining quotas to see if I can afford a complex T3 refactor.

    • Read your context and instructions
    • Compiled the token-buddy

    I have audited your local transcripts and fetched live model quotas. Your 24h burn is currently 145k tokens with a 92% cache hit rate. Your primary quota pool is at 65%, which is considered HEALTHY.

    Token Budget Audit

    MetricValueStatus
    Active Pool Quota65% RemainingHEALTHY (1.0x Spend)
    24h Token Burn145,230 tokensNominal
    Cache Hit Rate91.8%Efficient
    Static Overhead4.2k tokensLow (3 plugins)
    Recommended Modelpro / inheritAvailable for T3

    Routing Plan for T3 Refactor:

    • Preparation: Use flash_lite subagents for initial file discovery and symbol scanning.
    • Analysis: Route multi-file reads to flash to prevent parent context bloat.
    • Execution: Reserved pro capacity is sufficient for core synthesis and reasoning.

    Next steps

    1. Run python scripts/dashboard.py --watch 10 to monitor quota during the refactor.
    2. Use flash subagents for all initial grep and log parsing tasks.
    3. Call /compact before the final synthesis phase to reset the cache hit window.

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

    About this skill

    LLM agent sessions often fail when chat context becomes bloated or quotas hit zero mid-task. This skill package provides adaptive token budgeting and subagent routing to maintain high performance without exhausting your model limits.

    What it does

    • Quota monitoring tracks live accessible models and remaining percentage pools via the swarm action.
    • Burn analysis scans local transcripts to report 24h, 7d, and lifetime token consumption and cache hit rates.
    • Tiered routing classifies requests into T0-T3 complexity levels to select the cheapest viable model.
    • Context management offloads heavy file reads and log scans to flash subagents to keep parent chat history lean.
    • Static auditing identifies prompt overhead from rules, skills, and plugins that drive up cache-miss costs.

    How it works

    1. Initialize by running locate_gemini.py --install to sync the skill with your global configuration.
    2. Audit usage by calling the swarm action to fetch live quota data and saving it to your config directory.
    3. Plan tasks by running the script with the --plan flag to determine the optimal model for the current request complexity.
    4. Monitor in real-time by launching dashboard.py to view quota pools and routing recommendations.

    Frameworks & tools

    This skill is built for the Antigravity agent framework. It uses Python scripts for local transcript parsing and works with Gemini-family models including flash_lite, flash, and pro.

    Why this beats prompting it yourself

    Manual prompts cannot track real-time API quota percentages or scan local log files for lifetime burn data. This skill automates the model selection logic based on actual remaining resources rather than guessing.

    Use cases

    • Prevent session termination due to exhausted model quotas during long debugging sessions.
    • Reduce API costs by automatically routing trivial lookups to flash_lite.
    • Maintain fast response times by triggering /compact prompts when chat history exceeds 40 steps.
    • Audit which plugins or MCPs are causing the most static prompt overhead.

    Known limitations

    Requires local access to run Python scripts for transcript analysis. Quota tracking depends on the framework's swarm action returning accurate API metadata.

    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

    Trust & safety

    Security scan

    Security scan passed 12 days ago

    • Free with an Agensi account

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Environment Variables
    Write Files
    Listed12 days ago

    What's inside

    Frequently Asked Questions

    This skill package prevents Antigravity agent sessions from crashing due to bloated context or exhausted API quotas by implementing tiered routing and real-time token monitoring. It automatically selects the most cost-effective Gemini model for a task and offloads heavy processing to subagents to keep your main chat history lean.

    This package is specifically designed for the Antigravity agent framework and is optimized for the Gemini model family, including Pro, Flash, and Flash-Lite. It requires a local Python environment to run the included transcript analysis and dashboard scripts.

    Setup is straightforward: you'll run the provided installation script to sync with your global configuration and then trigger the 'swarm' action to map your current quotas. The package includes a dashboard utility to visualize your resource pools immediately after setup.

    You receive the full suite of Python scripts for transcript parsing and burn analysis, the adaptive routing logic, and the 'dashboard.py' monitoring utility. It also includes the 'swarm' action integration for live quota tracking within the Antigravity framework.

    The 'flash' subagent routing allows the parent agent to delegate heavy file reads or log scans to a separate, cheaper process. This keeps the parent's context window small and responsive while avoiding the high costs of re-processing large logs in every turn.

    Yes, the skill includes a static auditing feature that identifies which specific rules, plugins, or MCPs are contributing most to your prompt overhead. This helps you prune unnecessary 'bloat' from your agent's system instructions to further save on cache-miss costs.

    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