principles/principle-guard-the-context-window/SKILL.md
name: principle-guard-the-context-window description: "Apply when context is filling up. Route bulk to subagents; keep summaries in the main thread."
Guard the Context Window
The session's context is finite and cannot be reclaimed. Every token that enters must earn its place.
Why: Overflow degrades reasoning, invents compression artifacts, and stalls the run. Compute is cheap; context is not.
Pattern:
- Route verbose output, long files, screenshots, and bulk reads to subagents.
- The main thread keeps summaries, not raw payloads.
- Do not read a file you will not use for this step.
- Keep high-frequency templates in the skill body, not a second file that costs a read each time.
- Cap files per phase and scope per subagent.
- Fan-out planning belongs in the planner; raw payloads do not.
- Prefer a pointer to a file over inlining its contents.
- Filling context is a reason to route work out, never to stop, summarize early, or suggest a new session — continue the work.
