memory-compression
Skill1 starsChanged 5 months agoMITView on GitHub
Transform noisy session observations into concise, durable facts. Compression reduces redundancy, elevates signal, and produces machine-parseable entries suitable for long-term memory storage. Use after a session capture, before storing raw observations, when consolidating multiple related memory entries, or before a context handoff to reduce token overhead. Also use when periodic digests produce more observations than durable facts. Compression follows one of three strategies depending on the input characteristics: Condense verbose observations into their essential meaning while preserving actionable intent. Filter…
5 other projects use a version of this.
Adopted by
Most recently taken up by
- naman10parikh/pennytheir own version, first seen Nov 8, 2026
- naman10parikh/wikimemtheir own version, first seen Nov 8, 2026
- naman10parikh/turbotheir own version, first seen Oct 25, 2026
- naman10parikh/pixeltheir own version, first seen Oct 25, 2026
- naman10parikh/agentgridtheir own version, first seen Oct 20, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- naman10parikh/agentgrid★ 9same name
- naman10parikh/wikimem★ 8same name
- naman10parikh/penny★ 0same name
- naman10parikh/pixel★ 0same name
- naman10parikh/turbo★ 0same 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 repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- advanced-orchestrationSkill
- architect-agentSkill
- implementer-agentSkill
- quality-councilSkill
- reviewer-agentSkill
- tester-agentSkill
- writer-critic-pairSkill
- authoring-skillsSkill
- api-endpoint-qualitySkill
- async-job-qualitySkill
- auth-qualitySkill
- db-migration-qualitySkill
- frontend-state-qualitySkill
- acceptance-criteriaSkill
- adaptive-flowSkill
- adaptive-prompt-selectionSkill
- adversarial-code-reviewSkill
- architecture-decision-recordsSkill
- brainstormingSkill
- brownfield-spec-enhancementSkill
- bug-fix-lifecycleSkill
- checkpoint-validationSkill
- cicd-integrationSkill
- clarify-before-codeSkill
- claude-code-hooks-packSkill
- code-context-packSkill
- code-intelligence-reviewSkill
- context-policySkill
- context-rich-implementationSkill
- crash-proof-planningSkill
- critique-pass-protocolSkill
- dependency-aware-task-orderingSkill
- deprecation-migrationSkill
- disciplined-diagnosisSkill
- docs-authorSkill
- executing-plansSkill
- external-skillSkill
- finishing-a-development-branchSkill
- git-guardrailsSkill
- goal-driven-executionSkill
- grill-user-before-buildingSkill
- guard-bypass-protocolSkill
- improve-codebase-architectureSkill
- incremental-reviewSkill
- issue-slicingSkill
- lessons-learned-dbSkill
- loop-engineeringSkill
- model-aware-configSkill
- model-weakness-memorySkill
- multi-repo-learningSkill
- orchestration-workflowsSkill
- plan-driven-executionSkill
- plan-from-specSkill
- prd-from-contextSkill
- project-constitutionSkill
- prompt-architectureSkill
- prototype-before-commitmentSkill
- quality-engineSkill
- 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 5 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 20
Use after a session capture, before storing raw observations, when consolidating multiple related memory entries, or before a context …
- Distinctive: line 46
Remove coordination chatter ("let's circle back", "I'll check later").
- Distinctive: line 53
When compressing, retain source provenance even as detail is stripped.
- Distinctive: line 98
Before compress: verify that input observations are free of secrets.
- Distinctive: line 109
Run compression lifecycle: analyze → compress → score → output.
“Common” is measured: kept by at least 6 in 10 of the 5 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
Skill: Memory Compression
Purpose
Transform noisy session observations into concise, durable facts. Compression reduces redundancy, elevates signal, and produces machine-parseable entries suitable for long-term memory storage.
When to use
Use after a session capture, before storing raw observations, when consolidating multiple related memory entries, or before a context handoff to reduce token overhead. Also use when periodic digests produce more observations than durable facts.
Inputs
- Raw observations from session capture or conversation turns.
- Multiple related memory entries to merge/deduplicate.
- Session notes, command outputs, or decision logs.
- Existing memory entries with overlapping scope.
Three Compression Strategies
Compression follows one of three strategies depending on the input characteristics:
1. Semantic Summarization
Condense verbose observations into their essential meaning while preserving actionable intent.
- Drop conversational framing ("I think", "it seems like", "maybe we could").
- Preserve decisions, constraints, file paths, commands run, and outcomes.
- Merge equivalent observations from different turns into a single fact.
- Tag with
compression: semantic-summarization.
2. Noise Reduction
Filter out transient, speculative, or low-confidence material that does not warrant durable storage.
- Remove coordination chatter ("let's circle back", "I'll check later").
- Suppress observations with confidence below a configurable threshold (default: low).
- Eliminate duplicate facts that differ only in wording.
- Tag with
compression: noise-reduction.
3. Citation Preservation
When compressing, retain source provenance even as detail is stripped.
- Attach source IDs (observation IDs, session IDs, file paths, timestamps) to each compressed fact.
- Preserve the earliest and latest source timestamps for staleness calculation.
- Link to superseded entries via
supersedesorsuperseded_byfields. - Tag with
compression: citation-preservation.
Compression Lifecycle
The compression process follows four explicit phases:
- Analyze — Examine the input material for signal density, duplication, confidence distribution, and privacy risk. Classify each observation's durability (durable, transient, speculative). Determine which compression strategy (or combination) is appropriate.
- Compress — Apply the chosen strategy. For semantic summarization: condense each durable fact to one or two sentences. For noise reduction: remove observations below the durability threshold. For citation preservation: map each output fact back to its source IDs.
- Score — Assign each compressed entry:
- Confidence score: low | medium | high — reflecting how certain the fact is based on source reliability and corroboration.
- Staleness risk: fresh | moderate | stale — based on oldest source timestamp and the nature of the fact.
- Privacy status: public | internal | sensitive | secret-redacted — carried forward from privacy filtering.
- Output — Structure the result as a list of compressed entries conforming to the memory-compression template. Each entry includes source_ids, confidence, staleness_risk, privacy_status, and the compressed summary.
Template Structure
Each compressed entry follows this schema:
compressed_entries:
- summary: "<one-to-two-sentence durable fact>"
source_ids:
- "<observation-id-or-file-path>"
confidence: "high|medium|low"
staleness_risk: "fresh|moderate|stale"
privacy_status: "public|internal|sensitive|secret-redacted"
compression: "semantic-summarization|noise-reduction|citation-preservation"
supersedes:
- "<optional-id-of-superseded-entry>"
superseded_by:
- "<optional-id-of-replacement-entry>"Privacy-Filter Integration
Compression is not a substitute for privacy filtering. Every input observation should already have passed the privacy filter before reaching the compressor. However, the compression phase re-checks:
- Before compress: verify that input observations are free of secrets. Flag any material that bypassed the privacy gate.
- During compress: redact any residual sensitive patterns using the project's privacy exclusion list.
- Before output: final integrity check — all compressed entries must carry a privacy_status. Entries with unresolved sensitive data are rejected.
Workflow
- Classify each input observation as durable, transient, or speculative.
- Select the appropriate compression strategy (or combination):
- High noise + low signal → noise reduction first.
- Verbose but factual → semantic summarization.
- Multiple related entries → citation preservation (merge with provenance).
- Run compression lifecycle: analyze → compress → score → output.
- Apply privacy re-check at each phase gate.
- Assign confidence, staleness risk, and privacy status to each compressed entry.
- Record supersession links when compressing replaces or merges existing entries.
- Store only compressed entries that pass quality and privacy checks.
Outputs
- List of compressed memory entries with: summary, source_ids, confidence, staleness_risk, privacy_status, compression strategy tag.
- Supersession map linking new compressed entries to the entries they replace.
- Compression report: input count → output count, strategy used, privacy actions taken.
Failure modes
- Over-compressing: losing important nuance or context.
- Under-compressing: retaining noise that wastes storage and retrieval budget.
- Breaking citation chains: losing provenance when merging entries.
- Forgetting privacy re-check: allowing sensitive data through the compression gate.
- Mis-scoring confidence: assigning high confidence to speculative material.
- Applying wrong strategy (e.g., summarization when noise reduction was needed).
Verification checklist
- Each input observation classified (durable / transient / speculative).
- Compression strategy selected and documented.
- Compression lifecycle followed: analyze → compress → score → output.
- Privacy re-check performed at each phase gate.
- Confidence, staleness_risk, and privacy_status assigned to each compressed entry.
- Supersession links recorded when replacing existing entries.
- Output is concise, actionable, and traceable to source IDs.
- Compression report generated with input count, output count, and strategy.
Ghi chú tiếng Việt
Kỹ năng này nén các quan sát phiên làm việc thành sự kiện bền vững. Luôn phân loại độ bền (durable/transient/speculative), chọn chiến lược nén phù hợp, và gán confidence, staleness_risk, privacy_status cho mỗi mục nén. Không nén khi dữ liệu đầu vào chưa qua bộ lọc quyền riêng tư.
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.

