context-compression
Skill6 starsChanged 4 months agoApache-2.0View on GitHub
Use when conversation context is bloated, constraints are being forgotten, or a compact handoff is needed before continuing work.
24 other projects use a version of this.
Adopted by
Most recently taken up by
- docxology/templatetheir own version, first seen Oct 30, 2026
- viasrijan/crazy-skillstheir own version, first seen Oct 20, 2026
- AbdelrhmanAlquran/claude-skillstheir own version, first seen Oct 20, 2026
- xfstudio/skillstheir own version, first seen Oct 13, 2026
- brake71/1c-ssl-skillstheir own version, first seen Oct 13, 2026
- DBAAZzz/skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use bdi-mental-states, hosted-agents and 10 more.
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.
Downey6689Skillbdi-mental-states
Transforms external RDF context into BDI mental states. Invoke when modeling beliefs, desires, and intentions.
Also in 5 projects that use this
Downey6689Skillhosted-agents
Guidance for hosted/sandboxed agents. Invoke when running background agents in isolated VMs or multi-client setups.
Also in 5 projects that use this
DVwebBiz11Skillself-improvement-loops
This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that mine their own failures and propose bounded edits, evolutionary or population-based search over agent scaffolds, acceptance gates for self-modifying systems, and agentic context evolution where the mechanism that produces context is versioned and evolved. Route governance of a single autonomous loop (locked surfaces, durable logs, rollback, novelty gates, approval boundaries) to harness-engineering, measurement and quality-gate design to evaluation, judge design to advanced-evaluation, and remote sandbox infrastructure to hosted-agents.
Also in 4 projects that use this
DVwebBiz11Skilllong-horizon-prompting
This skill should be used when writing, enhancing, or evaluating the launch prompt for a long-running autonomous agent or a parallel multi-agent orchestration attacking a hard problem: pseudo-formal task briefs that define terms and an exact success predicate linguistically, enumerate non-counting outcomes, set persistence rules with explicit stop and return conditions and effort floors, manage a diverse portfolio of parallel approaches with an approach registry and blocked-route bookkeeping, and gate the return on adversarial audit. Route agent topology and coordination protocols to multi-agent-patterns, runtime control surfaces and loop governance to harness-engineering, evaluator and quality-gate construction to evaluation, judge design to advanced-evaluation, and compaction or memory mechanics to context-compression and memory-systems.
Also in 4 projects that use this
AbdelrhmanAlquranSkilllatent-briefing
This skill should be used when the user asks to "share memory between agents", "KV cache compaction for multi-agent", "orchestrator worker context", "latent briefing", "reduce worker tokens", "cross-agent memory without summarization", or discusses Attention Matching compaction, recursive language models with workers, or token explosion in hierarchical agents.
Also in 4 projects that use this
Dimks777Skillmemory-system
Развёртывание и обслуживание 3-слойной системы памяти для любого агента OpenClaw — чтобы контекст переживал сессии. Активируется на: настрой память, memory setup, проверь память, memory check, почисти память, memory cleanup, память.
Also in 5 projects that use this
- +2 more from Downey6689
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- bojieli/ai-agent-book-projects★ 53ksame name
- bojieli/ai-agent-book★ 53ksame name
- muratcankoylan/Agent-Skills-for-Context-Engineering★ 18ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- brake71/1c-ssl-skills★ 85same name
- Fandry96/k3-agentic-skills★ 27same name
- docxology/template★ 23same name
- soumatheusgomes/agentville★ 9same name
- xfstudio/skills★ 9same name
14 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 repository116 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/graphify/references/CLAUDE.mdCLAUDE.md
- agent-config-security-auditSkill
- agent-harness-designSkill
- agent-readable-docsSkill
- agent-runtime-patternsSkill
- agent-session-forensicsSkill
- ai-regression-testingSkill
- ai-slop-cleanerSkill
- api-doc-reviewSkill
- architecture-decision-recordsSkill
- architecture-simplificationSkill
- ask-claudeSkill
- ask-codexSkill
- ask-geminiSkill
- autonomous-delivery-pipelineSkill
- baseline-comparison-reviewSkill
- bigquery-cost-auditSkill
- brainstormingSkill
- browser-automation-safetySkill
- bug-huntSkill
- build-fix-minimal-diffSkill
- canonical-advisor-routingSkill
- change-impact-checkSkill
- changelog-generatorSkill
- ci-failure-readoutSkill
- codebase-migration-batchesSkill
- context-docsSkill
- context-minimizationSkill
- context-retrieval-loopSkill
- data-qualitySkill
- dataset-split-reviewSkill
- dbt-incremental-strategy-auditSkill
- dbt-preflightSkill
- dbt-strategySkill
- dead-code-removalSkill
- defuddleSkill
- dependency-cleanupSkill
- deploy-pipeline-runbookSkill
- dispatching-parallel-agentsSkill
- doc-consistency-checkSkill
- environment-doctorSkill
- experiment-tracking-reviewSkill
- failure-triageSkill
- filesystem-mcp-guardrailsSkill
- finishing-a-development-branchSkill
- flaky-test-investigationSkill
- gh-address-commentsSkill
- github-ci-failure-triageSkill
- graphifySkill
- handoff-disciplineSkill
- hard-won-skill-extractorSkill
- hook-safety-reviewSkill
- incident-readoutSkill
- incremental-migrationSkill
- json-canvasSkill
- local-rag-mcpSkill
- log-driven-diagnosisSkill
- managed-codebase-contextSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
5
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 9
Use when context approaches limits or response quality degrades (repeated mistakes, forgotten constraints, lost-in-the-middle effects) — …
- Distinctive: line 52
Before finalizing, verify the handoff can answer:
- Distinctive: line 59
Do NOT silently drop critical architectural constraints or user preferences during compression.
- Distinctive: line 60
Write the handoff document to disk before asking the user to restart.
- Distinctive: line 65
All four quality probes (recall, artifact, continuation, decision) can be answered from the artifact without re-reading the full transcript.
“Common” is measured: kept by at least 6 in 10 of the 17 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 Compression
When to use
Use when context approaches limits or response quality degrades (repeated mistakes, forgotten constraints, lost-in-the-middle effects) — typically after many turns of debugging or complex planning.
Requirements / Checks
- Active session contains long stack traces, large file dumps, or multiple failed iterations.
Workflow
- Diagnose bloat — identify: redundant outputs (same file read multiple times), contradictory instructions that accumulated over turns, constraint forgetting (earlier requirements no longer respected).
- Draft summary — synthesize the current valid state of the code or plan in 3–5 sentences.
- Extract anti-patterns — list what failed and why:
"Attempted X → failed because Y". These are critical to prevent the next session from looping on the same mistakes. Generate handoff artifact — write the following template to disk:
## Goal [One-sentence objective] ## Current state [What is working / what is in place right now] ## Blocker / next step [The exact next action to take] ## Anti-patterns (do not repeat) - Tried X → failed because Y - Tried A → blocked by B ## Key files - `path/to/file.ts` — [what it does / why it matters] ## Open risks - [Anything uncertain or requiring verification] ## Decisions made - [Key tradeoffs and why alternatives were rejected]- Restart — tell the user to start a new chat session and attach the handoff file as the first message.
Quality Probes
Before finalizing, verify the handoff can answer:
- Recall: exact commands, errors, versions, decisions that still matter.
- Artifact: files created, modified, inspected, intentionally untouched.
- Continuation: next action, current blocker, validation state, open risks.
- Decision: why key tradeoffs were chosen and what alternatives were rejected.
Safety Constraints
- Do NOT silently drop critical architectural constraints or user preferences during compression.
- Write the handoff document to disk before asking the user to restart.
Validation / Done Criteria
- Handoff artifact exists on disk and is in the template format above.
- User is explicitly told to restart the session and attach the file.
- All four quality probes (recall, artifact, continuation, decision) can be answered from the artifact without re-reading the full transcript.
Anti-loss Checklist
- Goal is clearly stated.
- Current blocker / next step is identified.
- Failed approaches are documented to prevent looping.
- Relevant file paths are listed.
- Key decisions and their reasons are recorded.
References
references/compression-quality-probes.md
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.

