agentsclimarketplace

Memory

Skill sevenbelowllc/the-library/skills/memory

Memory lifecycle management. Prune stale entries, validate references, aggregate related memories, detect conflicts, track age. Garbage collection for the knowledge layer.From its SKILL.md

Install
npx -y skills add sevenbelowllc/the-library --skill memory

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.0 KB, as published. Nobody here has run it

library:memory — Memory Lifecycle

Maintain memory health across sessions.

When to Use

  • Periodically (every few sessions) to prevent memory rot
  • When memory index is getting long (approaching 200 lines)
  • When you suspect stale or conflicting memories
  • After major project changes (renames, restructuring)

Operations

Scan

Call library_memory_scan to get full report:

  • All memory entries with metadata
  • Stale entries (not modified in >N days)
  • Total count

Present report to user.

Validate

For each memory entry:

  1. If it references a file path → check the file exists (use Glob/Read)
  2. If it references a function or flag → grep for it
  3. If it references a project decision → check if decision still holds in specs

Flag entries that reference nonexistent things.

Aggregate

Call library_memory_aggregate with dry_run=True first:

  • Review merge suggestions
  • Present to user for approval
  • If approved, call with dry_run=False

Prune

Call library_memory_prune with dry_run=True first:

  • Review candidates for deletion
  • Present to user for approval
  • If approved, call with dry_run=False

Conflict Detection

Compare memory entries against:

  • Each other (two memories saying different things about same topic)
  • Current code state (memory says X, code shows Y)
  • Canonical specs (memory says X, spec says Z)

Report conflicts for manual resolution.

Health Report

Call library_memory_health to get:

  • Vault stats (file count, domain count, decision count)
  • Keyword accuracy per domain
  • CLAUDE.md line count
  • Present as formatted report to user

Learning Report

Call library_memory_learn to get:

  • Per-domain accuracy with hit/miss/noise counts
  • Drift detection results
  • Propose keyword changes to user (HITL — user approves each change)
  • Apply approved changes by editing domain file frontmatter

Optimize

Call library_memory_scan on ~/.claude/projects/*/memory/:

  • Identify stale Claude auto-memories (>30 days, low reference)
  • Propose offloading to vault wiki articles (HITL per entry)
  • Remove migrated entries from Claude memory, keep pointer in MEMORY.md

Safety

  • Always dry_run first. Never delete without showing candidates.
  • User confirms destructive operations. Prune and aggregate require explicit approval.
  • Archive, don't destroy. Move pruned memories to an archive section rather than deleting.

Token Budget

Weight: Heavy Estimated context cost: ~3000 tokens Subagent delegation: No (needs main context for decisions)

MCP Tools Used

  • library_memory_scan — scan all memories
  • library_memory_aggregate — find merge opportunities
  • library_memory_prune — remove stale entries
  • library_config_get — memory path and thresholds
  • library_memory_health
  • library_memory_learn

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.