Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

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 (JetB...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 467 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The name/description (context hygiene for long-running agents) aligns with the instructions: masking tool outputs, summarization, writing compact facts to files, switching context, and spawning sub-agents are all relevant capabilities. The skill does not request unrelated credentials or binaries.
Instruction Scope
SKILL.md explicitly instructs the agent to write extracted facts and breadcrumbs to files (e.g., memory/YYYY-MM-DD.md), mask or delete raw tool outputs, spawn fresh-context sub-agents, and move context around. Those actions are within scope for a context-management skill but they imply filesystem and agent-management operations that can persist data; the skill does not declare any config paths or describe where those files live or how long they are retained.
Install Mechanism
This is an instruction-only skill with no install spec and no code files — low install risk. Nothing is downloaded or written by a separate install step.
Credentials
The skill requires no environment variables, credentials, or external tokens, which is proportionate for the stated purpose. No extraneous secrets are requested.
Persistence & Privilege
The skill does not request always:true or elevated platform privileges. It instructs spawning sub-agents and writing memory files, which are reasonable for an agent hygiene tool, but these behaviors increase persistent surface (on-disk memories, sub-agent state) and therefore rely on the runtime's sandboxing, access controls, and retention policies.
Assessment
This skill appears coherent and matches its purpose, but before installing: (1) confirm where 'memory/YYYY-MM-DD.md' and other files will be stored, who can read them, and how long they are retained; (2) test it in a sandboxed agent runtime to verify file-IO and sub-agent behavior; (3) ensure the runtime masks or filters any sensitive data before writing; (4) note the package has no source/homepage listed and an anonymous owner — if you need provenance or accountability, request the source or prefer a skill with clear authorship. If those controls are acceptable, the skill's instructions are reasonable for managing context.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97as2581kc5wnt1k2bd4x3qj1818zd9

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Shed — Context Hygiene for Agents

Shed what you don't need. Keep what matters.

Named for molting — the process of shedding an outer layer to grow. Your context window is your skin. When it gets too heavy, shed the dead weight.

Core Principle

Tool outputs are 84% of your context growth but the lowest-value tokens you carry. (Lindenbauer et al., NeurIPS 2025 DL4C workshop, measured on SWE-agent). Everything flows from this.

The Rules

After Every Tool Call

  1. Extract, don't accumulate. When a tool returns large output (file contents, search results, logs, API responses), immediately write the key facts to a file or compress into bullets. The raw output is now disposable.
  2. Ask: "Will I need this verbatim later?" Almost never. The answer you extracted is what matters, not the 500 lines that contained it.

When Context Reaches ~70%

  1. Trigger condensation. Don't wait for the platform to compact you — that's losing control of your own memory. At 70%, actively shed.
  2. Mask old tool outputs first (free, no LLM calls). Keep your reasoning and action history intact — you need your decision chain, not the raw ls -la from 20 turns ago.
  3. Summarize reasoning only as backup. If masking isn't enough, compress old reasoning turns. But this is lossy and costs an LLM call — use sparingly.
  4. Never re-summarize a summary. If you've already condensed once and context is growing again, switch context or spawn a sub-agent. Recursive summarization compounds errors.

When Completing a Task

  1. Write results to file, then switch context immediately. Stale completed-task context is anti-signal for your next task. Don't carry it.
  2. Leave breadcrumbs. Before switching: write what you did, what's next, and where the files are to memory/YYYY-MM-DD.md. Future-you needs a trailhead, not a transcript.

When Delegating Work

  1. Spawn fresh-context sub-agents for complex sub-tasks. Your context is noise for their work. Give them a clean prompt with just what they need.
  2. Don't inherit parent context into children. The AutoGen pattern: each agent gets its own token budget. Inherited bloat = inherited degradation.

Architecture (For Agent Builders)

  1. Structure context into typed blocks with hard size limits. Every production framework converges here — Letta uses labeled blocks (human, persona, knowledge) with character caps. A monolithic context is unmanageable.
  2. Separate working memory (in-context) from reference memory (file/DB). Your effective context is much smaller than your window size. Models lose information in the middle of long contexts.
  3. Place critical information at the beginning or end of context, never the middle. Positional attention bias underweights middle content by up to 15 percentage points (Hsieh et al., 2024, "Found in the Middle").

The Complexity Trap

Don't assume sophisticated compression (LLM summarization) beats simple approaches (observation masking). The JetBrains "Complexity Trap" paper (2025) tested both across 5 model configurations on SWE-bench Verified:

  • Simple masking halved cost relative to raw agent
  • Masking matched or exceeded LLM summarization solve rates
  • Example: Qwen3-Coder went from 53.8% → 54.8% with masking alone

The lesson: start simple. Mask tool outputs. Only add summarization if masking alone isn't enough.

Cost Model

Without intervention, cost per turn scales quadratically (each turn adds tokens AND reprocesses all previous tokens). Periodic condensation converts this to linear scaling. OpenHands measured 2x cost reduction with their condenser.

Quick Reference

SituationAction
Tool returned big outputExtract facts → file → discard raw
Context at ~70%Mask old tool outputs
Context still growing after maskingSummarize oldest reasoning turns
Task completeWrite results → switch context
Complex sub-task neededSpawn fresh sub-agent
Already condensed, still growingSwitch context or spawn
Critical info to preservePut at start or end, not middle

Sources

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…