- Home
- Skills
- Prompt & Skill Engineering
- Diet Context
Works with the AI Agents you already use
Diet Context
by Badung
Manage long-running agent context by offloading bulky tool results and compacting history into structured handoffs.
$3
Diet Context
Example session with this skill installed
I just ran a massive test suite with 400 failures. The output is 5000 lines long. I need to fix the auth errors first, but don't want this log clogging up my context window.
- Read your context and instructions
- Compiled the diet context
I have offloaded the full test log to a temporary artifact to keep our context clean. I have extracted the relevant auth failures below so we can start fixing them immediately.
Context Diet: Test Result Offload
Artifact: logs/test_run_20231027_1430.log
Produced by: npm test
Summary: 400 failures detected across 12 suites. The majority are related to timeout issues (340), but there are 12 critical authentication failures in the middleware/auth.test.ts suite.
Key details
- Auth Errors: 401 Unauthorized returned on 12 specific endpoints.
- Regression: Failures began after the
AuthServicerefactor in PR #42. - Database state: No connection errors; users exist in the local test DB.
Retrieval hints
- Search strings:
FAIL middleware/auth.test.ts,status: 401 - Line ranges: 450-620 (for detailed stack traces of auth failures)
Next steps
- Read lines 450-620 of
logs/test_run_20231027_1430.logto see the stack traces. - Review the recent changes in
src/services/AuthService.ts. - Fix the 401 errors and re-run only the auth test suite.
Connects securely to your tools. The creator never sees your data.
About this skill
A long session gets slower, more expensive and less accurate — not because the task got harder, but because everything it produced is still sitting in the context. A 5,000-line test log, a full build trace, twenty scraped pages, a stack trace you already diagnosed: all of it keeps getting re-sent, re-read and re-reasoned about for the rest of the run.
Diet Context is a context-management policy for AI agents. It keeps the active context small without throwing away information that may still be needed later.
What it does
Tool-result offloading. Large or noisy tool output goes to a file or artifact. What stays in context is a compact record: what produced it, a summary, the key errors and values, the artifact path, and retrieval hints (search terms, line ranges, sections) for pulling only the part you need later.
Structured handoff and compaction. When a workflow has accumulated many finished steps, the history is replaced by an operational state — goal, constraints, done, in progress, blocked, decisions with their reasons, next steps, facts that must not be lost, and where the raw evidence still lives. Adaptive judgment instead of fixed thresholds. There are no token, byte or line cutoffs. The skill weighs expected reuse, information density, task length and loss risk, and prefers keeping context intact when the task is nearly finished, when exact wording or numbers matter, when output cannot be stored reliably, or when summarizing would cost more than it saves. When uncertain, it preserves more.
Orchestration stays in charge. The skill decides what context travels with the work, never who does what. It does not create or delegate to agents, and does not change roles, models, permissions, parallelism, stages or execution order. It composes with orchestration skills instead of competing with them.
Recoverable compression, not deletion. Raw evidence stays external with its provenance and enough metadata to find it again; facts are kept apart from interpretations; if later evidence contradicts a handoff, the authoritative source wins and the handoff is updated. If artifact storage fails, it says so rather than pretending the data survived.
What an offload record looks like
Artifact: logs/test_run_1430.log
Produced by: npm test
Summary: 400 failures across 12 suites; 12 are auth failures.
Key details:
- 401 on 12 endpoints in middleware/auth.test.ts
- regressions start after the AuthService refactor
Retrieval hints: "FAIL middleware/auth", "status: 401", lines 450-620
The full log is still there when it matters. The context carries twelve lines, not five thousand.
What a handoff looks like
Goal
Constraints
Progress: Done / In Progress / Blocked
Key Decisions (with the reason where it matters)
Next Steps
Critical Context
Artifacts / Relevant Files
Only the sections that carry information are filled. Exact identifiers, commands, paths, error text, numbers and user constraints are carried over verbatim instead of being paraphrased.
Who it is for
- Long coding sessions — refactors that touch dozens of files, where the agent needs to know what is done and what is not, not the diff of every step.
- Tool-heavy debugging — huge test runs, build logs and stack traces, where one root cause matters and the rest is noise.
- Research runs — many searches and page scrapes condensed into one source of truth instead of a pile of raw excerpts.
- Multi-stage and multi-agent work — a dense briefing for the next stage or agent, so it does not inherit a fifty-turn backstory.
Compatibility
Written to the open SKILL.md standard, so it works with any compatible agent, including Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI. It is language and framework agnostic and needs no scripts, dependencies, API keys or network access — only the ability to write and read files.
Known limitations
- Offloading needs a filesystem or artifact store. Without one, the skill reduces less aggressively instead of dropping data.
- Selective retrieval depends on the quality of the retrieval hints. They are written for that purpose, but an imprecise hint costs one extra search.
- It is context policy, not a runtime. The agent still decides when to apply it, and the skill tells it to prefer keeping context when the trade is not worth it.
What you get
The complete SKILL.md — the offload decision rules, the offload record and handoff schemas, the handoff-between-agents guidance and the completion check — plus full documentation in English and Korean. MIT licensed.
Why not just say "summarize when it gets long"
Because a summary of the wrong thing loses exactly what you still need: paths, identifiers, numbers, error text, and the reason behind a decision. Diet Context replaces that with a fixed schema and an explicit recoverability rule, so compaction stops being a gamble and becomes a file you can search.
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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 14 days ago
- Software
Git
Nothing to install: no Git, no dependencies, no API keys. Copy SKILL.md into your agent's skills folder and it applies immediately.
Permissions
What's inside
Frequently Asked Questions
New in Prompt & Skill Engineering
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Prompt & Skill Engineering.