memory-hygiene
Skill1 starsChanged 3 months agoMITView on GitHub
Maintain the health of project memory — archiving stale entries past their useful life, catching and flagging conflicting facts, validating that memory entries are still accurate, and cleaning up redundant checkpoints after consolidation. Use periodically as a maintenance pass (paired with memory-consolidation), when memory-recall surfaces a conflict between two entries, or when project memory has grown large enough that retrieval feels noisy.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- BSSE23047/nauraiz-devtheir own version, first seen Nov 8, 2026
- mahsumaktas/agent-evolution-kittheir own version, first seen Nov 8, 2026
- HsuanYuLee/polaristheir own version, first seen Nov 5, 2026
- Kein-chronicle/claude-code-memory-linttheir own version, first seen Nov 1, 2026
- GH-Mason/agent-memory-disciplinetheir own version, first seen Sep 24, 2026
- NecturaLabs/AgentSkillstheir own version, first seen Sep 24, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- huytieu/COG-second-brain★ 1.3ksame name
- NUX-Design/claude-skills-fable-opus★ 24same name
- HsuanYuLee/polaris★ 5same name
- megandmartin/agent-skills-repo★ 3same name
- BSSE23047/nauraiz-dev★ 2same name
- mahsumaktas/agent-evolution-kit★ 2same name
- NecturaLabs/AgentSkills★ 1same name
- chanjalme/claude-skills★ 0same name
- GH-Mason/agent-memory-discipline★ 0same name
- Kein-chronicle/claude-code-memory-lint★ 0same name
1 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 repository8 other files it gives its agents.
- agent-handoffSkill
- decision-logSkill
- memory-bootstrapSkill
- memory-captureSkill
- memory-consolidationSkill
- memory-recallSkill
- repo-awarenessSkill
- session-checkpointSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
4. Redundancy cleanup: After memory-consolidation folds checkpoints into an episode, the individual raw checkpoint files that contributed …
“Common” is measured: kept by at least 6 in 10 of the 10 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
Memory Hygiene
Source framing: both the Redis architecture guide and the ML Mastery pattern catalog name "forgetting" as the least-solved part of memory systems — "current systems are better at storing and retrieving than deciding what to safely forget" — and both insist explicit retention policy is mandatory precisely because the underlying research problem isn't solved yet. This skill is the operational discipline that substitutes for a not-yet-solved automatic answer: explicit, checkable rules rather than assuming the memory layer manages itself.
The four jobs bundled here, and why they're one skill
Originally conceived as five separate skills (cleanup, health, consistency, diff, merge, validate) — collapsed into one, because in practice they're facets of a single maintenance pass over the same files, not independent workflows a user would invoke separately:
1. Archival (not deletion). Entries past a reasonable TTL — old checkpoints already folded into an episode by memory-consolidation, episodes old enough that nothing has referenced them in a long time — move to .memory/archive/, not deleted outright. This preserves the "delete when appropriate" step in the lifecycle as a deliberate, rare, explicit action distinct from routine archival.
2. Conflict detection. When two memory entries disagree — a semantic fact that contradicts a more recent decision, two episodes describing the same situation differently — flag it explicitly rather than silently picking one. A conflict record: "semantic/project-facts.md says 'deploys go through staging first' but decisions/0018 changed this to direct-to-prod for hotfixes — reconcile." Resolution requires either updating the semantic fact to reflect the newer decision, or determining the conflict is real (different rules for different situations) and making that distinction explicit rather than leaving contradictory statements both standing.
3. Validation. Periodically spot-check whether semantic facts are still true — a "current" architecture description that's drifted from what the code actually does is worse than no description, because it actively misleads. This is the same discipline documentation-practices (elsewhere in this skill ecosystem) applies to project docs generally, applied specifically to .memory/semantic/.
4. Redundancy cleanup. After memory-consolidation folds checkpoints into an episode, the individual raw checkpoint files that contributed nothing beyond what's now in the episode summary can be archived — this is bookkeeping, not judgment, and follows directly from consolidation having already made the judgment call.
Provenance-aware flagging
Per ARCHITECTURE.md's adopted concern: entries tagged (by memory-capture) as sourced from untrusted input — a fetched web page, an unreviewed file — get extra scrutiny here specifically. An unqualified "fact" with untrusted provenance that's never been validated is exactly the case this pass should catch before it silently misdirects a future session.
Cadence
Pair with memory-consolidation at the same natural checkpoints (session boundaries, or when .memory/ has grown noticeably), rather than running as an unrelated separate ritual — consolidation decides what's durable; hygiene decides what's safe to remove, flag, or archive given that decision.
What this explicitly doesn't do
This isn't a distributed-conflict-resolution system — for the common case (two sequential sessions' memory disagreeing), explicit flag-and-resolve is sufficient. True concurrent-simultaneous-write conflicts between multiple agents working at the same time are a harder problem (see ARCHITECTURE.md's note on why CRDT infrastructure is out of scope) that this skill doesn't attempt to solve.
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.

