memory-hygiene
Periodic trust sweep of persistent memory and durable knowledge notes - re-verifies environment-dependent claims against the live environment, stamps last_verified + confidence, and proposes archiving drifted entries
Install / Use
npx skills add huytieu/COG-second-brain --skill memory-hygieneInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of memory-hygiene
memory-hygiene scores 85/100 on our quality scale, 2657th of 4,698 Development & Engineering skills we index.
Its SKILL.md is 4.7 KB long, well organised into 10 sections with 1 code example: a solid amount of guidance for an agent.
With 1,216 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so memory-hygiene is actively maintained.
- Our last check on 2026-11-05 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit β read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk β read a skill before letting an agent act on it.
memory-hygiene compared with similar skills
All 4 of these similar skills score higher than memory-hygiene; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| memory-hygiene (this skill)by huytieu | 85 | 1.2k | 59d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install memory-hygiene?
- Run
npx skills add huytieu/COG-second-brain --skill memory-hygiene. The install tabs above show the steps for each supported agent. - Which AI agents does memory-hygiene work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is memory-hygiene safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is memory-hygiene still maintained?
- The repository was last updated about 2 months ago, so memory-hygiene is actively maintained.
Skill content
View source on GitHubname: memory-hygiene description: Periodic trust sweep of persistent memory and durable knowledge notes - re-verifies environment-dependent claims against the live environment, stamps last_verified + confidence, and proposes archiving drifted entries roles: [all] integrations: []
COG Memory Hygiene Skill
Purpose
Prevent the stale-but-confident failure mode: a memory or knowledge note that was correct when written ("the webhook lives at X", "the board ID is Y") silently drifts after the environment changes, yet still ranks high at recall and gets acted on.
The system move (adapted from "From Model Scaling to System Scaling: Scaling the Harness in Agentic AI", Gu, UC Berkeley, arXiv:2605.26112): make trust a runtime decision, not a property of the stored item. Re-verify against the live environment, and keep per-entry last_verified and confidence as first-class fields so future recalls can weigh trust.
When to Invoke
/memory-hygiene- "Audit my memories" / "check for stale memories"
- After a memory misfires (a recalled fact turned out wrong)
- Default cadence: monthly
Scope
Sweep two stores:
- Agent memory β wherever your agent keeps persistent memory files (e.g. Claude Code's auto-memory directory). Sweep every entry except the index itself.
- Durable knowledge notes β
05-knowledge/**files whose claims reference the environment (paths, URLs, IDs, tool names).
A partial sweep ("just the reference entries") is fine when asked.
Claim Classification
For each entry, split its claims into two buckets:
| Bucket | Examples | Action | |---|---|---| | Environment-dependent | file/dir paths, repo names, branch names, channel IDs, board IDs, URLs, API endpoints, cron/routine IDs, CLI names, version numbers, "X lives at Y" | Verify against the live environment | | Preference / judgment | tone rules, formatting rules, "never do X", people facts, strategy context | No environment check possible; verify only for internal contradiction with newer entries |
Verification Moves (cheap first)
- Paths and files:
ls/test -e. Skills, commands, and agents named in an entry must still exist at the stated path. - URLs: resolve with a HEAD/GET (
curl -sI); flag 404 or redirect-to-login. - Repos/branches:
gh repo view,git ls-remotewhen cheap. - IDs (channels, boards, routine triggers): verify only if an MCP/CLI check is one call; otherwise mark
unverifiable-cheaplyand leave confidence untouched. - Cross-entry contradiction: newer entry wins; flag the older one.
Never spend more than ~1 minute per entry. This is hygiene, not an investigation. Unverifiable β drifted.
Stamping
After checking an entry, update its frontmatter metadata: block in place (do not touch body text unless fixing a verified-wrong fact):
metadata:
type: reference
last_verified: 2026-07-10
confidence: high # high = verified now | medium = unverifiable cheaply | low = partially drifted
- Verified clean β
confidence: high, stamp date. - Unverifiable cheaply β keep prior confidence (or
medium), stamp date. - Partially drifted β fix the drifted fact directly in the body (reviewable via the report); set
confidence: lowonly if unsure the fix is complete. - Fully obsolete β propose archive, don't delete. List it in the report's "Propose archive" section; only archive after the user confirms.
The Loop (see /loop-engineering)
Scan-until-done over the entry list with a per-entry budget guard (~1 min). The deterministic verifier is the environment itself (test -e, curl, gh) β never the agent's own recollection of whether something "should" still exist. Human escalation: all deletions/archives.
Report (single file)
Write one report per sweep to 01-daily/YYYY-MM-DD-memory-hygiene.md, structured around four evolution questions:
- What persists? β counts by type (user/feedback/project/reference).
- What updated? β entries whose body was corrected, with old β new.
- What is measured? β scorecard:
verified / unverifiable / drifted / propose-archivecounts, plus deltas vs the previous sweep report (the drift trend is the longitudinal signal one-shot checks miss). - What is auditable? β every change in this sweep is a line in this report; for stores Git does not track, the report IS the audit trail.
End the report with a Propose archive section (explicit list, one line of evidence each) and a Waiting on you line if anything needs a decision.
Rules
- Propose-only for deletions/archives; direct-apply for stamps and verified factual corrections.
- Never rewrite an entry's voice or restructure it during a sweep.
- If the memory index points at renamed/missing files, fix the index.
- Keep the sweep itself out of memory: the report file is the record.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code β from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6kπ€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit β see the Safety scan above for what the skill file itself contains.
