memory-hygiene

Deduplicate and validate memory entries during bulk operations and maintenance.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/benreceveur/claude-workflow-engine --skill memory-hygiene
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-hygiene
Source: https://github.com/benreceveur/claude-workflow-engine/tree/main/skills/memory-hygiene
Command: npx skills add https://github.com/benreceveur/claude-workflow-engine --skill memory-hygiene

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Maintains memory cleanliness with deduplication, validation, and expiration to prevent memory bloat and ensure queryable, high-quality memories.

Core Features & Use Cases

  • Compact Memory: Deduplicates and compresses memory for faster queries.
  • Validate Schema: Enforces memory schema before writes to catch errors early.
  • Expire Stale Entries: Auto-archives or removes outdated memory entries.
  • Merge Duplicates: Reconciles near-duplicates to keep memory concise.
  • Real-World Use Case: Schedule daily hygiene to keep memory under 5MB and ensure consistent lookups.

Quick Start

Use the memory-hygiene skill to validate a new memory entry before writing to memory, then run a periodic maintenance job to expire stale items.

Frequently Asked Questions about memory-hygiene

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

FAQPage Schema
How do I prevent memory bloat from duplicate entries?

Deduplication removes redundant memory entries to keep your memory compact and queryable. This Skill automatically identifies and merges near-duplicates during bulk operations, imports, and periodic maintenance, reducing memory size while preserving data integrity.

How do I validate memory entries before writing them?

Schema validation enforces required fields, data types, TTL format (ISO8601), and confidence scores (0.0–1.0) before writes. This catches malformed entries early and ensures all stored memories meet your quality standards.

Can I automatically expire or remove outdated memory entries?

Yes, TTL-aware expiration automatically archives or removes stale entries based on their expiration timestamps. Schedule daily or periodic maintenance jobs to keep memory fresh and under your target size limit.

What happens if something goes wrong during memory cleanup?

The Skill backs up memory before modification, logs all changes, and supports atomic operations with rollback. You can run dry-run mode first to preview changes and inspect detailed logs before committing modifications.

How does deduplication handle near-duplicate memories?

Merge logic reconciles similar entries by comparing content, timestamps, and confidence values. Duplicates are consolidated into a single high-quality record while preserving provenance and metadata from merged sources.