principle-guard-the-context-window · git:20261109.c998def · 2026-11-09 · sha256 a65f612d8ce8d7dc

principle-guard-the-context-window git:20261109.c998defA

Immutable. This exact content never changes and is served at /api/v1/blob/a65f612d8ce8d7dc.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_6qhocx7m5ilppygw/a65f612d8ce8d7dcc9ba77aa0ce8881a8eeffa3159fba55d59e6f179fecae619.json

Then /plugin install principle-guard-the-context-window@markdownregistry-6qhocx7m5ilppygw in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: principle-guard-the-context-window
description: "Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to delegated tasks; keep summaries in the main thread, not raw payloads."
disable-model-invocation: true
---

# 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_task` workers. 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](https://github.com/uzairansaruzi/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 -->