knowledge-audit
Skill13 starsChanged 9 months agoApache-2.0View on GitHub
Review and clean up stored memories — find duplicates, contradictions, stale entries, and consolidate
2 other projects use a version of this.
Adopted by
Most recently taken up by
- YourGPT/yourgpt-claude-plugintheir own version, first seen Oct 11, 2026
- ch4570/vulporatheir own version, first seen Oct 11, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ch4570/vulpora★ 1same name
- YourGPT/yourgpt-claude-plugin★ 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 repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- memory-commitSkill
- recall-contextSkill
- session-handoffSkill
- temporal-querySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 12 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
If topic specified: memory(action="search", query="[topic]") to find all related memories
- Very specific: line 15
If "all": memory(action="list") to get full inventory, then memory(action="stats") for overview
- Distinctive: line 19
Search for memories with similar content or overlapping keywords
- Very specific: line 22
Use memory(action="delete", id="[duplicate-id]") for removals
- Distinctive: line 25
Look for memories that make opposing claims about the same topic
- Distinctive: line 31
Update the surviving memory to note it supersedes the old one
- Very specific: line 43
Use memory(action="consolidate", ...) if available, otherwise manual merge
- Distinctive: line 73
Explicit supersession: If memory B says "switched from A to B", delete memory about using A
- Distinctive: line 76
Ambiguous: When unclear, DO NOT delete — ask the user
- Distinctive: line 81
When memory search returns confusing or contradictory results
- Distinctive: line 82
After a major migration or architecture change
- Distinctive: line 83
When starting a new phase of a project
- Distinctive: line 84
When memory count grows large and retrieval quality degrades
- Very specific: line 126
Audit-trail integrity: every mutation (insert / update / supersede / delete) should write a memory_audit row with prev_state_hash and …
- Distinctive: line 137
After running the Phase 1/2 "Knowledge Audit" steps above.
- Distinctive: line 138
After importing a Phase 2 passport bundle (legacy schema → can leave bitemporal columns NULL).
- Very specific: line 140
After any large memory(action="capture", auto=True) batch with KG_AUTO_ENABLED=true (entity resolution may need tuning).
- Distinctive: line 142
Before exporting a Phase 3 passport bundle (so receiver gets a clean KG).
≈ “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
Knowledge Audit
Systematic review of stored memories to maintain quality. Finds duplicates, detects contradictions, flags stale entries, and consolidates overlapping memories.
Steps
- Scope the audit:
- If topic specified:
memory(action="search", query="[topic]")to find all related memories - If "all":
memory(action="list")to get full inventory, thenmemory(action="stats")for overview - Group memories by tag/category for systematic review
- If topic specified:
- Identify duplicates:
- Search for memories with similar content or overlapping keywords
- Compare pairs that cover the same topic
- Decision: keep the more detailed/recent one, delete the other
- Use
memory(action="delete", id="[duplicate-id]")for removals
- Detect contradictions:
- Look for memories that make opposing claims about the same topic
- Examples: "Use library A" vs "Switched to library B", conflicting conventions
- Decision tree:
- Both have dates -> keep the newer one (it supersedes)
- Neither has date -> ask user which is current
- Both are valid (context-dependent) -> update both to clarify their scope
- Update the surviving memory to note it supersedes the old one
- Flag stale entries:
- Memories referencing specific versions that are now outdated
- Memories about temporary workarounds that may have been resolved
- Memories about tools/libraries that have been replaced
- Action: mark as stale with
memory(action="update", ...)adding[STALE]prefix, or delete if clearly obsolete
- Consolidate overlapping memories:
- Multiple memories about the same topic that each have partial info
- Merge into a single comprehensive memory
- Steps: create new consolidated memory -> verify retrieval -> delete originals
- Use
memory(action="consolidate", ...)if available, otherwise manual merge
- Produce audit report:
## Knowledge Audit — [topic/all] — [date] ### Summary - Total memories reviewed: [N] - Duplicates removed: [N] - Contradictions resolved: [N] - Stale entries flagged/removed: [N] - Memories consolidated: [N merged into M] ### Actions Taken - [list of specific changes] ### Recommendations - [any patterns noticed, e.g., "many memories lack WHY context"]
Staleness Indicators
- References to specific version numbers (check if still current)
- Contains "temporary", "workaround", "until X is fixed"
- References removed/renamed files, deprecated APIs, old URLs
- Predates a major migration or refactor (check project history)
- Contains "TODO" or "will be" — was it done?
Contradiction Resolution Rules
- Explicit supersession: If memory B says "switched from A to B", delete memory about using A
- Scope difference: "Use X for backend" and "Use Y for frontend" are NOT contradictions
- Evolution: "Started with X" and "Migrated to Y" — keep Y, delete X (unless X context is still relevant)
- Ambiguous: When unclear, DO NOT delete — ask the user
When to Use
- Periodically (monthly or after major project changes)
- When memory search returns confusing or contradictory results
- After a major migration or architecture change
- When starting a new phase of a project
- When memory count grows large and retrieval quality degrades
Phase 3: Temporal KG Audit (v2.0+)
Phase 3 ships a temporal knowledge graph (entities + edges + bitemporal versioning + supersession). The audit checklist now also covers KG hygiene:
KG-aware audit dimensions
- Stale entities: entity rows that no longer link to any active
memory (their last
memory_entity_linksrow points at an archived / superseded memory).- Detect:
memory(action="entity_search", name="<entity>")returning 0 currently-valid hits → candidate stale. - Action: confirm with the user, then delete the orphaned entity row (cascade removes edges).
- Detect:
- Orphan edges: edges in
memory_edgeswhose source or targetmemory_entitiesrow was deleted but the edge survived.- Detect: server logs show "edge with missing endpoint" warnings, or
entity_graphreturns nodes referenced from edges that aren't in the nodes list. - Action: ask user; either re-extract the originating capture or hand-delete the edge by id.
- Detect: server logs show "edge with missing endpoint" warnings, or
- Contradicting / superseded chains: a memory in a supersession
chain still surfaces in default
memory.getresults because someone leftvalid_to = NULLon an old fact.- Detect:
memory(action="history", entity_id=<x>)returning multiple rows withvalid_to = NULLfor the same entity. - Action: pick the most-recent / most-correct row and update
valid_toon the others to the supersession timestamp.
- Detect:
- Bitemporal drift: capture has no
valid_fromset, falls outside the bitemporal index. Usually a pre-Phase-3 row that was missed by backfill, or a manualdb.addthat bypassed the capture pipeline.- Detect: SQL spot check
SELECT COUNT(*) FROM memories WHERE valid_from IS NULL. - Action: re-run the Phase 3 backfill (
MemoryDB._backfill_phase3_temporal) or update the rows manually.
- Detect: SQL spot check
- Audit-trail integrity: every mutation (insert / update / supersede
/ delete) should write a
memory_auditrow withprev_state_hashandnew_state_hash. A gap in the chain (audit row absent for an update) signals a bug or out-of-band write.- Detect:
SELECT m.id FROM memories m LEFT JOIN memory_audit a ON a.memory_id = m.id WHERE a.id IS NULL. - Action: investigate which path wrote the row; do NOT rewrite the audit history (preserves tamper-detection guarantees).
- Detect:
When to run the temporal sub-audit
- After running the Phase 1/2 "Knowledge Audit" steps above.
- After importing a Phase 2 passport bundle (legacy schema → can leave bitemporal columns NULL).
- After any large
memory(action="capture", auto=True)batch withKG_AUTO_ENABLED=true(entity resolution may need tuning). - Before exporting a Phase 3 passport bundle (so receiver gets a clean KG).
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.

