context-compress
Skill1 starsChanged 5 months agoMITView on GitHub
Compress and optimize context usage — summarize verbose outputs, layer information by relevance, preserve critical facts across sessions
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Open330/context-compresstheir own version, first seen Jul 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Open330/context-compress★ 8same 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 repository84 other files it gives its agents.
- api-design-reviewerSkill
- api-test-suite-builderSkill
- ask-mattSkill
- aws-solution-architectSkill
- captureSkill
- changelog-generatorSkill
- ci-cd-pipeline-builderSkill
- cloud-securitySkill
- codebase-designSkill
- codebase-onboardingSkill
- code-reviewerSkill
- context-modeSkill
- database-designerSkill
- database-schema-designerSkill
- dependency-auditorSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- env-secrets-managerSkill
- finish-branchSkill
- firecrawlSkill
- focused-fixSkill
- frontend-designSkill
- get-shit-doneSkill
- git-guardrails-claude-codeSkill
- git-worktree-managerSkill
- git-worktreesSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- implementSkill
- improve-codebase-architectureSkill
- incident-commanderSkill
- incident-responseSkill
- mcp-builderSkill
- memSkill
- migration-architectSkill
- monorepo-navigatorSkill
- observability-designerSkill
- performance-profilerSkill
- playwright-testingSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-gainSkill
- ponytail-helpSkill
- ponytail-reviewSkill
- ponytailSkill
- prompt-engineeringSkill
- prototypeSkill
- pr-review-expertSkill
- rag-architectSkill
- red-teamSkill
- reflectSkill
- resolving-merge-conflictsSkill
- root-cause-tracingSkill
- runbook-generatorSkill
- self-evalSkill
- senior-architectSkill
- senior-backendSkill
- senior-devopsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Use notes.md for session observations
- Distinctive: line 57
Search memory before re-exploring
- Distinctive: line 64
Don't pass full conversation to every subagent
- Distinctive: line 75
Rule: If reading it twice, summarize it once.
- Distinctive: line 79
When context is tight:
- Very specific: line 81
Write findings to notes.md or task progress
- Distinctive: line 84
Start fresh session with focused prompt
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Compress
Maximize signal, minimize noise in context windows.
When to Use
- Context window approaching limits
- Starting session with prior work
- Large codebase exploration consuming tokens
- Need to preserve decisions across checkpoints
Strategies
1. Summarize Aggressively
Bad: Full stack trace (50 lines)
Good: "TypeError at src/api.ts:42 — missing null check on response.data.user"
Bad: Entire file read (500 lines)
Good: "File has 200 lines, key function at line 85-120, uses X pattern"
Bad: Running every test individually
Good: "All 47 tests pass, coverage at 82%"2. Layer Information
Critical (always keep):
- Current task goal
- Active blockers
- Key architectural decisions
- Modified file paths
Important (summarize when needed):
- Prior decisions and rationale
- Test results
- Exploration findings
Ephemeral (drop when tight):
- Full file contents (re-read on demand)
- Verbose command output
- Intermediate search results3. Use Memory System
- Store durable facts in
MEMORY.md - Use
notes.mdfor session observations - Reference memory instead of re-deriving
- Search memory before re-exploring
4. Parallel Context via Subagents
- Spawn subagents for heavy exploration
- Each gets clean context
- Synthesize findings, not raw output
- Don't pass full conversation to every subagent
Token Budget
| Content | Cost |
| Full file (500 lines) | ~2000 tokens |
| Command output (100 lines) | ~400 tokens |
| Subagent prompt | ~500 tokens |
| Checkpoint summary | ~800 tokens |
Rule: If reading it twice, summarize it once.
Session Handoff
When context is tight:
- Write findings to
notes.mdor task progress - Summarize what's done and what's next
- Reference specific file paths and line numbers
- Start fresh session with focused prompt
Anti-Patterns
| Pattern | Problem |
| Reading full files unnecessarily | Burns tokens |
| Re-deriving from memory | Wastes context |
| Passing full conversation to subagents | Redundant |
| Keeping verbose output | Noisy |
| Not summarizing at checkpoints | Loses critical info |
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.

