defrag

Detect and merge near-duplicate memories in memory-mcp instances.

1|1|Updated May 9, 2026
One-click install
npx skills add https://github.com/butterflyskies/claude-marketplace --skill defrag-butterflyskies
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defrag
Source: https://github.com/butterflyskies/claude-marketplace/tree/main/plugins/memory/skills/defrag
Command: npx skills add https://github.com/butterflyskies/claude-marketplace --skill defrag-butterflyskies

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The Skill solves the problem of managing memory-mcp instances by consolidating and cleaning up memories, making the system more efficient and organized.

Core Features & Use Cases

  • Memory Consolidation: Merges near-duplicate, overlapping, or stale memories to improve system performance.
  • Scalable: Works on all scopes, including shared and private.
  • Configurable: Offers flags for dry-run, model selection, and threshold settings for near-duplicates and related memories.
  • Use Case: When you need to regularly defragment and consolidate memories to maintain a clean and efficient system.

Quick Start

Execute the defrag skill to initiate memory consolidation across all scopes with the default settings.

Frequently Asked Questions about defrag

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

FAQPage Schema
How do I consolidate near-duplicate memories in my AI memory system?

You can consolidate near-duplicate memories by running an automated defragmentation process that detects overlapping entries, merges them, and strengthens cross-links. This improves memory management efficiency and reduces redundancy.

What is the best way to clean up stale AI memories across shared and private scopes?

Cleaning up stale AI memories is best handled by an automated pruning mechanism that flags outdated entries across all scopes. This ensures memory consolidation works on both shared and private instances to maintain an organized system.

Can I test memory defragmentation before permanently deleting or merging records?

Yes, you can test memory defragmentation safely using a dry-run mode. This allows you to preview which near-duplicates and stale memories will be merged or flagged without executing permanent changes to your memory instances.

How do I configure memory consolidation thresholds for related entries?

You can configure memory consolidation thresholds by adjusting specific settings for near-duplicates and related memories. This allows you to control how aggressively the system merges overlapping data during the defragmentation process.

Does memory defragmentation require system access to manage recall and edit operations?

Yes, memory defragmentation requires system access to execute commands for listing, recalling, reading, editing, and forgetting memories. This access is necessary to detect duplicates and apply merges across instances.

Why does my AI memory system become less efficient over time?

AI memory systems become less efficient over time due to the accumulation of overlapping, near-duplicate, and stale memories. Defragmentation solves this by merging redundant data and strengthening cross-links to streamline memory management.