Works with the AI Agents you already use

    Token Guardian: Plan Context Budget Without Losing Evidence

    by a365ngay

    1

    Spend context where it matters: rank what the agent must read, keep required evidence even over budget, defer the rest, and report only savings you actually measured.

    Free

    Security scanned

    What it does

    • Prioritizes essential files so the AI never skips important instructions to save space
    • Reads exact duplicates once, only when their content and role are interchangeable
    • Calculates data sizes in tokens or bytes to stay within your specified limits
    • Generates a report showing exactly what evidence was used and what was deferred
    • Handles large tasks by suggesting a phased approach if the data exceeds the budget

    Who it's for

    Developers working in large codebases

    Stop your AI from getting lost or hitting limits when working on big projects.

    Try asking: “Review this repo and fix the auth bug within a 30k token budget.”

    Technical writers managing long documents

    Keep your AI focused on the important parts of your text without wasting space on repeats.

    Try asking: “Edit these ten chapters but keep the total context under 50,000 bytes.”

    Founders auditing technical assets

    Get a clear report on what files your AI is actually reading and how much space they take.

    Try asking: “Audit the files in the source folder and plan a migration within a strict budget.”

    Token Guardian: Plan Context Budget Without Losing Evidence

    Token Guardian: Plan Context Budget Without Losing Evidence

    Example session with this skill installed

    Use Token Guardian. I need you to fix the auth bug, but keep the reading budget around 1,000 tokens. Candidates: the requirements doc (~400, must read), the auth code (~450), and an old log (~900). Plan what to read before you start.

    • Read your context and instructions
    • Compiled the token guardian

    Summary

    Read 2 of 3 items (850 of 1,000 estimated tokens). The requirements doc stays in because it is required; the old log is deferred, not dropped. No savings are claimed: these are estimates, not measured counts.

    Reading plan

    OrderItemEst. tokensRequiredPriorityDecision
    1requirements400yes-read (required items always first)
    2auth-code450no10read
    3old-log900no1deferred: would push total to 1,750

    Planner output (python3 scripts/engine.py plan.json)

    {
      "unit": "tokens",
      "count_basis": "estimate",
      "budget": 1000,
      "selected": ["requirements", "auth-code"],
      "deferred": ["old-log"],
      "aliases": [],
      "planned_cost": 850,
      "unfiltered_cost": 1750,
      "planned_difference": 900,
      "required_overflow": 0,
      "actual_savings": null,
      "billing_savings": null
    }
    

    How to read this

    • planned_difference: 900 is what the plan skips,

    not a saving: actual_savings and billing_savings stay null until you compare measured usage against a baseline run.

    • required_overflow: 0: every required item fits. If it did not, I would list the overflow and propose phases instead of dropping evidence.
    • No exact duplicates were found, so nothing was merged.

    Next steps

    1. I read the requirements and auth code and attempt the fix.
    2. If the fix depends on runtime history, I come back for the deferred log (or a targeted slice of it) and tell you before I do.

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

    About this skill

    When you give an AI agent too much information at once, it can get confused, miss details, or simply stop working because the "context window" is full. This skill helps your AI agent manage its memory by planning exactly what to read, what to skip, and how to stay within a specific budget. It acts like a filter that ensures the most important files are prioritized while duplicate data is removed.

    How it works

    1. You provide a task and a list of files or data you want the AI agent to look at.
    2. The skill identifies which items are required and which are optional based on your goal.
    3. It uses a planning script to calculate the size of your data in bytes or tokens to see if it fits your budget.
    4. The AI agent removes exact duplicates to save space while keeping all the necessary evidence.
    5. You receive a report showing what was used, what was deferred, and how much of your budget remains.

    Frameworks & tools

    This skill uses JSON files for planning and a Python script to calculate budgets and manage data lists. It also includes Markdown templates for reporting its findings to you.

    Why this beats prompting it yourself

    Plain AI agents often try to read everything at once, which leads to "context overflow" or forgotten instructions. This skill forces the AI to create a formal plan and verify sizes before it starts working, preventing it from silently dropping important files when things get crowded. It also uses math via a script to get accurate measurements instead of just guessing how much it has read.

    Use cases

    • Analyzing a large software project without hitting model limits.
    • Cleaning up repeated data when merging multiple long text documents.
    • Planning a multi-step task that needs to be broken into smaller chunks.
    • Tracking exactly how much data your AI agent consumes for a specific job.

    Known limitations

    This skill cannot see your actual billing or subscription limits. It only manages the data you explicitly give it and relies on the sizes you or the host provide.

    Uses a Python 3.10+ engine (scripts/engine.py) to process UTF-8 JSON inputs for budget planning. It supports SHA-256 hashing for deduplication and uses a structured schema (references/input-schema.json) to manage item priorities and byte/token counts. The workflow is designed for LLMs with large context windows to avoid overflow by calculating evidence requirements before execution.

    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 1 day ago

    • Free with an Agensi account

    Nothing to install. It runs in your AI agent.

    Optional
    Python 3.10+

    Permissions

    Terminal / Shell
    Read Files

    Shell and file read are only for the optional planner: it reads the candidate list JSON you give it and prints a reading plan to stdout. It writes no files, uses no network and never sends data anywhere.

    Listed1 day ago

    What's inside

    Frequently Asked Questions

    This skill acts as a memory filter for your AI agent. It stops the agent from getting confused by too much data by creating a plan to prioritize essential information, removing duplicate files, and staying within a specific token or byte budget.

    You will receive a clear report showing exactly which files were used, which were skipped to save space, and how much of your budget remains. It uses a planning script to give you accurate measurements of data usage instead of just guessing.

    To get the most accurate measurements, your agent needs access to Python 3.10 or newer on its system. If Python is not available, the agent will still follow the logic manually but will flag that the formal script checks were not run.

    This skill cannot see your actual billing, subscription limits, or the hidden reasoning steps the AI takes. It only manages the specific text and files you provide and relies on the sizes or limits you tell it to follow.

    You can tell your agent to use this skill when you have a large project or a long list of documents to analyze. Simply provide your task and the files, then ask the agent to create a context budget plan before it starts reading.

    New in Productivity

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Productivity.

    Free