memory-hygiene

Audit and prune stale or duplicate memory entries in MEMORY.md.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/johwer/marketplace --skill memory-hygiene-johwer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-hygiene
Source: https://github.com/johwer/marketplace/tree/main/skills/memory-hygiene
Command: npx skills add https://github.com/johwer/marketplace --skill memory-hygiene-johwer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Review and clean up memory files to keep context costs low — triggered during cleanup, compact, or session end.

Core Features & Use Cases

  • Memory budgeting: analyzes MEMORY.md to control token growth and optimize prompts.
  • Stale memory cleanup: identifies and remove or archive outdated memories.
  • Reference hygiene: validates links to external resources and prunes broken memories.
  • Session learnings consolidation: flags old Dream Team learnings for archiving while preserving recent insights.

Quick Start

Run memory-hygiene at session end to audit MEMORY.md and prune stale or duplicate memories.

Frequently Asked Questions about memory-hygiene

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up stale memory entries to reduce context costs?

To reduce context costs, memory cleanup involves auditing and pruning stale entries from your memory file. This skill runs at session end or during cleanup to identify outdated references and duplicates, requiring explicit confirmation before deleting or archiving them.

What is the best way to manage token growth in my memory file?

Managing token growth requires memory budgeting, which analyzes your memory file to control size and optimize prompts. This skill implements size checks to detect duplicate entries and outdated references, preventing uncontrolled context expansion while preserving user preferences.

Does memory hygiene automatically delete outdated memories?

Memory hygiene does not automatically delete outdated memories without explicit user confirmation. It audits memory entries, detects duplicates and broken references, and requires your approval before proceeding with any deletion or archiving actions.

How do I validate external links and clean up broken references in memory?

To validate external links and clean up broken references, this skill performs reference hygiene by checking stored memories against external resources. It prunes broken memories and identifies outdated references during a session audit.

When should I run a memory audit for my session?

You should run a memory audit at session start or session end to review and clean up memory files. Running it during compact or cleanup phases keeps context costs low by consolidating session learnings and archiving old entries.

Can I preserve user preferences while pruning duplicate memory entries?

You can preserve user preferences while pruning duplicate memory entries because this skill explicitly safeguards them during the cleanup process. It flags old learnings for archiving while retaining recent insights and user-specific settings.