# memory-merge

The memory-merge command consolidates multiple semantic tree nodes into one, removing duplicates and grouping related concepts under a single node.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 1357 repo stars
- Author: qdhenry
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/commands/memory/memory-merge.md
- Updated: 2026-03-01
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/memory-merge

## What it does

It operates on the project's semantic tree (WFGY-based): calculates pairwise ΔS compatibility, checks topic and insight overlap, then builds a new node with averaged metrics and merged context. Under the hood: semantic similarity scoring, conflict resolution, and index rebuilds.

The command takes a comma-separated list of node IDs. If ΔS exceeds 0.5 or insights contradict, the merge is blocked unless you pass `--force`. Drop the command file into `.claude/commands/memory-merge.md`.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/memory-merge.md` — Call it with /memory-merge. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/memory-merge.md` — Call it with /prompts:memory-merge. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/memory-merge.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/memory-merge.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/commands/memory/memory-merge.md

## When to use it
- merge duplicate semantic tree nodes into a single entry
- consolidate closely related concepts without losing relationships
- remove memory redundancy while preserving context
- resolve contradictions between nodes during consolidation

## Example prompts
- Merge nodes `auth_jwt_001` and `auth_oauth_002` into one
- Consolidate nodes from list `node_a, node_b, node_c` and show what gets lost
- Run `/memory:merge "user_model_v1,user_model_v2" --preview`

## Similar
- [deep-agents-memory](https://affpapa.org/en/nevibecode/skills/deep-agents-memory.md) — skill · 20000 installs
- [memory-spring-cleaning](https://affpapa.org/en/nevibecode/commands/memory-spring-cleaning.md) — command · 391 installs
- [memory-discipline](https://affpapa.org/en/nevibecode/skills/memory-discipline.md) — skill · 4900 installs
- [memory-md-management](https://affpapa.org/en/nevibecode/skills/memory-md-management.md) — skill · 3700 installs
- [parallel-memory](https://affpapa.org/en/nevibecode/skills/parallel-memory.md) — skill · 2900 installs
- [OMEGA Memory](https://affpapa.org/en/nevibecode/mcp/omega-memory-omega-memory.md) — MCP server · 2862 installs

From the same set: [qdhenry/claude-command-suite](https://affpapa.org/en/nevibecode/by/qdhenry/claude-command-suite.md) — 112 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
