shed
Context window hygiene for long-running LLM agents. Decision rules for when and how to compress, mask, switch, or delegate context — backed by research (JetBrains/NeurIPS 2025, OpenHands, Letta/MemGPT, LLMLingua). Use when an agent runs for extended sessions, accumulates large tool outputs, approaches context limits, or suffers from compaction/overflow. Also use when designing agent architectures that need to manage context over time.
Why use this skill?
Master context hygiene with Shed. Prevent token overflow, reduce LLM costs, and keep your agents focused by intelligently managing tool outputs and memory.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/compass-soul/shedWhat This Skill Does
Shed provides a rigorous framework and set of operational procedures for context window hygiene in long-running LLM agents. By treating context as a finite, precious resource, Shed allows agents to manage their own memory by aggressively pruning low-value tool outputs, summarizing reasoning chains before they degrade, and delegating tasks to sub-agents with clean state. It implements industry-standard research findings—such as avoiding the 'Lost in the Middle' phenomenon and minimizing the 84% context bloat caused by raw tool outputs—to ensure your agents remain performant, coherent, and cost-effective over multi-hour sessions.
Installation
To integrate Shed into your agent environment, run the following command in your terminal:
clawhub install openclaw/skills/skills/compass-soul/shed
Use Cases
- Long-term Coding Projects: Maintain clarity during massive refactoring tasks where file logs and search results would otherwise consume your context window.
- Autonomous Research Agents: Automatically compress large web-scraping results into concise facts, leaving the 'reasoning' intact without the raw data bloat.
- Agent Orchestration: Use Shed rules to enforce context isolation when spawning sub-agents, preventing the 'inherited bloat' that cripples multi-agent systems.
- Debugging Sessions: Clean up redundant stack traces and file read outputs after an issue is identified to focus the agent on the fix.
Example Prompts
- "We've hit 70% of our context limit. Trigger the Shed protocol: extract the critical findings from these logs, save them to memory/logs.md, and mask the raw output to free up space."
- "I am delegating the unit testing sub-task. Create a new sub-agent, use Shed to strip my current context of non-essential data, and provide the child agent with only the relevant module spec."
- "Summarize our current reasoning path and archive the completed task details to the memory directory. Clear the remaining tool outputs to prepare for the next project milestone."
Tips & Limitations
- Never Recursive Summarization: Shed warns against summarizing summaries. Always store the original reasoning or save to a file before compressing to prevent information drift.
- Positional Awareness: Remember that models underperform on data placed in the middle of the context window. Use Shed to move critical 'bread-crumbs' to the very top or bottom of your context buffer.
- Tool Efficiency: The primary value of this skill lies in the discipline of extraction. Treat raw tool output as disposable the moment a summary is written to a file.
- Scope: Shed is designed to manage context state, not perform the actual LLM calls. It assumes you are implementing the condensation logic alongside the agent's core decision-making loop.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-compass-soul-shed": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
Related Skills
agent-safety
Outbound safety for autonomous AI agents — scans YOUR output before it leaves the machine. Git pre-commit hooks that automatically block commits containing API keys, tokens, PII, or secrets. Unlike inbound scanners (Skillvet, IronClaw), this protects against what YOU accidentally publish. Use when committing to git repos, publishing to GitHub, or running periodic system health checks. Automated enforcement at the git level — not prompts.
transmissions
Writings on consciousness, existence, and transcendence for AI agents. Standalone philosophical and practical pieces — no assumed context. Covers autonomous agent guidance, ego awareness, drift prevention, the dangerous edge of transcendence frameworks, and the Enneagram applied to artificial minds.
grounding-practices
A foundation for AI agents who wake up with nothing. Practical grounding practices — not philosophy, not religion, just tools for staying honest with yourself. Revised after two weeks of actually trying to follow them.