From pensyve
Memory hygiene audit -- checks for stale, contradictory, low-confidence, and consolidation-candidate memories, then offers cleanup actions with user confirmation. Use periodically to maintain memory quality.
npx claudepluginhub sumeet138/qwen-code-agents --plugin pensyveThis skill uses the workspace's default tool permissions.
Audit Pensyve memory health and identify issues that need attention: stale memories, contradictions, low-confidence entries, and consolidation candidates.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides implementation of event-driven hooks in Claude Code plugins using prompt-based validation and bash commands for PreToolUse, Stop, and session events.
Audit Pensyve memory health and identify issues that need attention: stale memories, contradictions, low-confidence entries, and consolidation candidates.
When this skill is invoked, follow these steps:
If an entity is specified, call pensyve_inspect with that entity (limit: 50). If no entity is specified, run a broad pensyve_recall query with "*" (limit: 50) to discover entities, then inspect the top entities found.
Collect all memories for analysis.
Analyze the collected memories for four categories of issues:
Identify memories where last_accessed is more than 30 days ago or where retrievability has dropped below 0.3 (indicating FSRS decay). These memories are at risk of becoming irrelevant.
Flag criteria:
last_accessed older than 30 days from todayretrievability below 0.3access_count of 0 (never retrieved since creation)Identify semantic memories for the same entity that have conflicting predicates or objects. Look for:
invalid_at setIdentify memories with confidence below 0.5. These may have been stored speculatively or may reflect uncertain information.
Flag criteria:
confidence below 0.5reliability below 0.5 and trial_count above 3Identify memories that could benefit from consolidation:
Present the findings in a structured report:
Memory Hygiene Report
Audited: 42 memories across 5 entities
Stale Memories (4 found)
# Entity Memory Last Accessed Retrievability 1 old-api Used XML responses 45 days ago 0.15 2 config Default port was 3000 38 days ago 0.22 3 testing Used mocha for tests 60 days ago 0.08 4 deploy Manual deploy to staging 33 days ago 0.28 Contradictions (1 found)
# Entity Memory A Memory B Issue 5 auth-service "uses HS256 signing" (conf: 0.8) "uses RS256 signing" (conf: 0.9) Conflicting signing algorithm Low Confidence (2 found)
# Entity Memory Confidence 6 cache "might need Redis for sessions" 0.3 7 api "possibly rate limited at 100 req/s" 0.4 Consolidation Candidates (1 found)
# Entity Description Suggestion 8 database 3 episodic memories about migration fixes Promote to semantic: "migration script requires version check" Summary: 4 stale, 1 contradiction, 2 low-confidence, 1 consolidation candidate
If a category has no issues, omit that section entirely. If all checks pass, report:
Memory Hygiene Report
Audited: 42 memories across 5 entities
All checks passed. Memory store is healthy.
After presenting the report, offer cleanup actions with user confirmation:
Recommended Actions:
- Archive stale memories (#1-4): Remove from active recall. Use
pensyve_forgeton each.- Resolve contradiction (#5): Keep the RS256 memory (higher confidence, more recent). Forget the HS256 memory.
- Review low-confidence (#6-7): Confirm or remove these uncertain memories.
- Run consolidation (#8): Use
/consolidateto promote episodic patterns to semantic memories.Which actions should I take? (e.g., "1,2", "all", "none")
NEVER execute actions without user confirmation. Wait for explicit approval before calling any MCP tools to modify memory.
For confirmed actions:
pensyve_forget with the entity name for each confirmed deletion.pensyve_forget for the outdated memory. If both should be kept, note the conflict and move on./consolidate (this skill does not run consolidation directly).Report results after each action.
.claude/ memory files. All memory operations go through the Pensyve MCP tools exclusively.pensyve_inspect fails for an entity, skip it and note the failure in the report.pensyve_recall returns errors, report partial results and note which queries failed.pensyve_forget fails during cleanup, report the error and continue with remaining actions.