From rekal-skills
Maintains rekal memory database: detects duplicates, conflicts, stale conversations, quality issues; proposes fixes like memory_supersede for user approval. Use /rekal-hygiene or 'clean up memories'.
npx claudepluginhub janbjorge/rekal --plugin rekal-skillsThis skill is limited to using the following tools:
Find and fix problems in the rekal database. Every change requires explicit user approval. Never auto-delete. Never auto-modify.
Audits Pensyve memories for staleness (>30 days unaccessed or low retrievability), contradictions, low confidence (<0.5), and consolidation candidates, then offers confirmed cleanup actions. Use periodically.
Audits, classifies, and selectively prunes Claude Code agent memories by type, age, access frequency, staleness, and fidelity using decision trees and audit trails. Use when memory grows large, project state shifts, or retrieval degrades.
Runs memory maintenance: verifies IDs/duplicates, reconciles metadata, demotes working entries over 1500-word budget by score, cleans superseded entries.
Share bugs, ideas, or general feedback.
Find and fix problems in the rekal database. Every change requires explicit user approval. Never auto-delete. Never auto-modify.
memory_health()
Report one line:
"142 memories across 3 projects, spanning 6 months. 4 conflicts detected."
memory_conflicts() # global first
If > 10 conflicts, also run per-project: memory_conflicts(project="<name>")
Per conflict pair, classify and propose:
Conflict type?
├── One outdated, one current
│ └── Propose: memory_supersede(old_id="<outdated>", new_content="<current content>")
│
├── Both valid, different scope (e.g. PostgreSQL for OLTP, ClickHouse for analytics)
│ └── Propose: Keep both. Add project scope if missing.
│
├── Genuine contradiction, unclear which is correct
│ └── Ask user: "Which is correct? [A] or [B]?"
│
└── False positive (not actually contradictory)
└── Propose: Remove contradicts link.
memory_link(from_id="<id_a>", to_id="<id_b>", relation="related_to")
— or memory_delete the link if truly unrelated
Present as numbered list:
- "API uses v2" vs "API migrated to v3" Proposal: Supersede v2 with v3. [approve/reject]
- "Use PostgreSQL" vs "Use ClickHouse for analytics" Proposal: Not a real conflict — different use cases. Remove link. [approve/reject]
memory_topics() # or memory_topics(project="<name>")
For every topic cluster with count >= 3, search for near-duplicates:
memory_search(query="<topic name>", limit=10)
Read results. Group memories covering the same fact/preference/procedure.
Per duplicate group:
Format:
Duplicates (formatting preferences):
mem_abc: "User prefers Ruff" (2024-01)mem_def: "User prefers Ruff over Black for formatting" (2024-03)mem_ghi: "Use Ruff, not Black. Also handles import sorting." (2024-06)Proposal: Keep
mem_ghi(most complete). Supersedemem_abcandmem_definto it.memory_supersede(old_id="mem_abc", new_content="<content from mem_ghi>") memory_supersede(old_id="mem_def", new_content="<content from mem_ghi>")
conversation_stale(days=30)
conversation_threads(limit=20)
Flag conversations with 0 memories as cleanup candidates. Conversations with memories are fine — memories persist regardless.
Conversations are cheap storage. Only flag truly empty ones older than 30 days.
memory_timeline(limit=20)
Skip memories created < 24 hours ago — too fresh to judge.
Per memory, check against these rules:
Quality issue?
├── Content < 20 characters
│ └── Propose: reword with more context, or delete if worthless
│ memory_update(memory_id="<id>", content="<expanded content>")
│
├── Project-specific content but project=None
│ └── Propose: add scope
│ memory_update(memory_id="<id>", project="<correct project>") — NOT SUPPORTED
│ Note: memory_update cannot set project. Propose memory_supersede with project= set.
│
├── Wrong memory_type (e.g. a procedure stored as fact)
│ └── Propose: fix type
│ memory_update(memory_id="<id>", memory_type="<correct type>")
│
├── context-type AND older than 60 days
│ └── Propose: still true? → memory_update to fact. Stale? → memory_delete.
│ Ask user which.
│
└── No issues → skip
Compile ALL proposals from steps 2-5 into one summary:
Hygiene report:
- 4 conflicts: 2 supersede, 1 keep-both, 1 remove-link
- 3 duplicate clusters: 8 memories → 3
- 2 unscoped memories to re-scope
- 1 stale context memory to review
- 0 stale conversations
Approve all? Or review individually?
Wait for explicit approval. Do NOT execute anything until user approves.
After user approves (all or specific items):
memory_supersede for duplicates and outdated conflictsmemory_update for type/tag correctionsmemory_delete only for worthless entries (user explicitly approved)memory_link for relationship correctionsmemory_health() again, report improvement:"Done. 142 → 134 memories. 4 → 0 conflicts. 3 duplicate clusters resolved."
These are hard rules. No exceptions.
/rekal-save stores.Do NOT audit everything in one pass. Prioritize in this order:
After completing priority items, ask:
"Covered conflicts and top duplicate clusters. Want me to continue with a deeper audit?"