principle-guard-the-context-window
Skill1 starsChanged 54 days agoMITView on GitHub
Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads.
21 other projects use a version of this, 17 of them edited.
Adopted by
Most recently taken up by
- uzairansaruzi/p3-stackedited, first seen Oct 5, 2026
- backnotprop/pstackword for word, first seen Oct 4, 2026
- creedants/pstack-t3edited, first seen Oct 3, 2026
- adjohn/pstackword for word, first seen Oct 2, 2026
- dhanji4U/skillsedited, first seen Oct 2, 2026
- lucasvidela94/opencode-pstackedited, first seen Sep 30, 2026
Used with
Projects with it also use make-bot-ui.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 7 projects that use this
Other versions21 projects use a version of this.
Word for word · 2
- backnotprop/pstack★ 991100% same
- adjohn/pstack★ 4100% same
Edited · 17
- uzairansaruzi/p3-stack★ 12990% same
- jtaroreh/agystack★ 5857% same
- shrimpwtf/oh-my-pstack★ 3152% same
- painhardcore/pstack★ 665% same
- 0xrsydn/pstack-pi★ 368% same
- creedants/pstack-t3★ 397% same
- dhanji4U/skills★ 280% same
- JoshueOsuna/pstack★ 282% same
- shishiv/pi-pstack★ 168% same
- ahmedbenaw/pstack★ 079% same
7 more not listed
Wrote their own version · 2
- TheOnlyFusionCube/potetos-for-everyone★ 6same name
- shiwenbin1617/pstack★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- correctSkill
- create-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- maintain-verification-skillSkill
- no-commentsSkill
- poteto-helpSkill
- Poteto ModeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-type-system-disciplineSkill
- recallSkill
- reflectSkill
- show-me-your-workSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- typescript-best-practicesSkill
- unslopSkill
- whySkill
The file
Files
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 subagents. 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

