context-management
Skill0 starsChanged 3 months agoMITView on GitHub
Keep the context window lean and survive compaction without losing the thread. Use when a session runs long, when many large files or logs have been loaded, before fanning out major work, when you catch yourself re-reading or re-deriving established facts, or when compaction looms — write state down BEFORE it is lost, not after.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- AnthonyPoschen/agent-skillstheir own version, first seen Oct 26, 2026
- timfewi/unix-agent-skillstheir own version, first seen Oct 17, 2026
- opensite-ai/opensite-skillstheir own version, first seen Oct 13, 2026
- krema/agent-skillstheir own version, first seen Oct 13, 2026
- ttttmr/pi-contexttheir own version, first seen Oct 9, 2026
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- ttttmr/pi-context★ 304same name
- kangarooking/system-prompt-skills★ 178same name
- REPOZY/superpowers-optimized★ 147same name
- opensite-ai/opensite-skills★ 15same name
- sefaertunc/Worclaude★ 4same name
- AnthonyPoschen/agent-skills★ 2same name
- bjornjee/skills★ 2same name
- stateofthehart/claude-code-config★ 2same name
- timfewi/unix-agent-skills★ 2same name
- sefaertunc/anthropic-watch★ 1same name
4 more not listed
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 repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormSkill
- cleanupSkill
- critiqueSkill
- debuggingSkill
- design-decisionsSkill
- diff-managementSkill
- fan-outSkill
- final-checkSkill
- handoverSkill
- loopsSkill
- memorySkill
- orientSkill
- planningSkill
- researchSkill
- roadmapSkill
- verificationSkill
- web-testingSkill
- writing-reviewSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Never let the FIRST handover of a long session be the one written at 95% context — by then the details worth handing over are already gone.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context management
Context is a budget, not a given. Everything held only in conversation is one compaction away from gone; everything written to artifacts survives. Manage accordingly.
Keep it lean (during work)
- Don't load what a subagent can read for you. Bulk file reading, broad searches, long logs → fan out (fan-out skill) and keep only the conclusions.
- Read narrowly. The section, not the file; the diff, not the repo; the failing test's output, not the whole run.
- Don't re-read to "confirm". A file you just edited is in the state the tool result reported.
- Summarize as you go. Long tool output becomes one line in the plan ledger or task list; the artifact remembers so the context doesn't have to.
Warning signs (act when you see them)
- Re-deriving facts already established this session, or re-opening files already read.
- Raw dumps sitting in context where a one-line conclusion would do.
- Starting a large new phase while carrying a finished phase's debris.
- The session is long AND the newest handover is stale — the gap between reality and paper is the amount you lose on compaction.
Before compaction (or any risk of context loss)
- Handover NOW (handover skill) — zero-context resumability is the standard.
- Flush memory writes (memory skill) — preferences, failures, and decisions still only in conversation get files immediately.
- Sync the paper trail — plan ledger current, task list statuses true, roadmap honest.
After compaction / on resume
Re-orient (orient skill): memory index → newest handover → roadmap → verify claimed state against reality. Trust the artifacts over the summary's confidence — summaries compress, artifacts don't.
Rules
- State written to artifacts beats state held in context, always.
- A phase boundary is the natural shedding point: ledger updated, memory written, then move on light.
- Never let the FIRST handover of a long session be the one written at 95% context — by then the details worth handing over are already gone.
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.

