Guard the Context Window
The context window is finite and non-renewable within a session. Every token should be worth its cost.
Why: Context overflow degrades reasoning quality, creates compression artifacts, and halts progress.
Pattern:
- Isolate large payloads. Route verbose outputs, screenshots, and large documents to
delegate_taskworkers. The main context gets summaries, not raw data. - Keep frequently used content inline. Templates and references used on every invocation belong in the skill file, not in separate files that cost a read each time.
- Size phases and cap scope. Limit files per phase, set turn budgets, account for mechanism costs.
<!-- CORE-OVERLAY-START -->
This repository (Asymmetric-al/core)
Vendored from p3-stack (MIT) at commit 09909eb. Provenance is in references/upstream.md. On conflict, the current user request, root AGENTS.md, the nearest nested AGENTS.md, and the matching docs/ai/rules/* rulebook win over this skill.
- Explicit invocation only: use it when the user invokes
/principle-guard-the-context-window(Claude Code, Cursor, T3 Code) or$principle-guard-the-context-window(Codex), or when an invoked p3-stack skill routes here. Do not route other work to it. - The T3 Code tools named above map to Claude Code, Codex, and Cursor in
docs/ai/skills/p3-mode/references/core-adapter.md. Read it before you delegate, watch a PR, schedule work, or drive a preview outside T3 Code. - Confirm before outward-facing or hard-to-reverse actions such as pushing, merging, deploying, deleting, or posting messages, unless the user authorized that action for this task.
Edit this canonical copy in docs/ai/skills/principle-guard-the-context-window/, then run bun run skills:sync and bun run skills:verify.
<!-- CORE-OVERLAY-END -->