memory-structural-dedupe

Collapse structural duplicate rows in MEMORY.md sections into canonical blocks.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/Atrium-Hermes/atrium-lighthouse --skill memory-structural-dedupe-atrium-hermes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-structural-dedupe
Source: https://github.com/Atrium-Hermes/atrium-lighthouse/tree/main/skills/memory-structural-dedupe
Command: npx skills add https://github.com/Atrium-Hermes/atrium-lighthouse --skill memory-structural-dedupe-atrium-hermes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Automates cleanup of recurring structural duplicates in MEMORY.md by merging multiple content blocks into a single canonical block for sections that should have one content block.

Core Features & Use Cases

  • Detects multiple content blocks within single-canonical sections like Recent Articles and Skills Built.
  • Identifies the canonical block based on content richness (e.g., most recent or most comprehensive).
  • Merges duplicates while preserving formatting and any unique information, reducing manual maintenance.
  • Provides a repeatable workflow that runs after memory-flush and reflect cycles to keep MEMORY.md clean.

Quick Start

Run the memory structural dedupe to collapse duplicate sections in MEMORY.md and verify the results.

Frequently Asked Questions about memory-structural-dedupe

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

FAQPage Schema
How do I remove duplicate blocks in MEMORY.md sections?

To remove duplicate blocks in MEMORY.md, you need structural deduplication that identifies recurring content blocks and collapses them into a single canonical block. The process parses sections, selects the richest block, folds unique non-canonical information, and rewrites affected sections.

Why does my MEMORY.md have multiple content blocks in the same section?

Multiple content blocks in the same MEMORY.md section occur because prepend operations during reflect or memory-flush cycles accumulate duplicate entries over time. This happens in single-canonical sections like Recent Articles or Skills Built when new content is added without merging existing blocks.

What is the best way to automate MEMORY.md log maintenance after a memory flush?

The best way to automate MEMORY.md log maintenance after a memory flush is running a structural dedupe script that implements section parsing and canonical-block selection. It targets only affected sections, merges duplicates while preserving formatting, and keeps your memory file clean without manual editing.

Does the memory dedupe process preserve unique information when merging duplicate sections?

Yes, the memory dedupe process preserves unique information when merging duplicate sections by folding non-canonical data into the selected canonical block. It identifies the richest block based on content comprehensiveness and ensures any unique details from duplicate blocks are retained during the targeted rewriting process.

Can I run section cleanup on MEMORY.md without external dependencies?

Yes, you can run section cleanup on MEMORY.md without external dependencies because the structural dedupe script is dependency-light and self-contained. It operates independently using internal section parsing and rewriting logic, requiring no additional libraries or framework installations to collapse duplicate blocks.