- Home
- Skills
- Productivity
- Token Guardian: Plan Context Budget Without Losing Evidence
Works with the AI Agents you already use
Token Guardian: Plan Context Budget Without Losing Evidence
by a365ngay
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
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
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
| Order | Item | Est. tokens | Required | Priority | Decision |
|---|---|---|---|---|---|
| 1 | requirements | 400 | yes | - | read (required items always first) |
| 2 | auth-code | 450 | no | 10 | read |
| 3 | old-log | 900 | no | 1 | deferred: 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: 900is 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
- I read the requirements and auth code and attempt the fix.
- 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
- You provide a task and a list of files or data you want the AI agent to look at.
- The skill identifies which items are required and which are optional based on your goal.
- It uses a planning script to calculate the size of your data in bytes or tokens to see if it fits your budget.
- The AI agent removes exact duplicates to save space while keeping all the necessary evidence.
- 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
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
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
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.
What's inside
Frequently Asked Questions
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.