Skip to main content
command CX Codex

memory-merge — Claude Code command: merge semantic nodes

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

no license ★ 1,357 updated 2026-03-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/memory-merge.md
Open on GitHub

What memory-merge 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.

What it helps with

  • 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 for the agent

  • 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

How to install memory-merge

Manually: put the files in place

.claude/commands/memory-merge.md

Call it with /memory-merge. For all projects use ~/.claude/commands/

Questions about memory-merge

How to install memory-merge in Claude Code?

Place the file in .claude/commands/memory-merge.md — the command becomes available as /memory:merge.

What does memory-merge do?

It merges semantic tree nodes: computes pairwise similarity, synthesizes a shared insight, averages metrics, and updates all references to the merged nodes.

When will memory-merge refuse to merge nodes?

When ΔS between nodes exceeds 0.5, insights conflict, or a node is marked protected. The --force flag overrides these checks.

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set112

The whole set →
sync-status The sync-status command for Claude Code checks GitHub–Linear sync health, queues, webhooks, failures, and data mismatches. It supports diagnosis of synchronization issues. CX Codex +1 ★ 1,357repo stars performance-auditor performance-auditor — a subagent that hunts bottlenecks: algorithm cost, N+1 queries, bundle size, wasted re-renders. You get a prioritized report. CX Codex ★ 1,357repo stars sync-linear-to-issues sync-linear-to-issues exports Linear tasks into GitHub issues while preserving issue descriptions, sprint milestones, and status mappings. CX Codex +1 ★ 1,357repo stars task-from-pr task-from-pr is a Claude Code command that transfers GitHub pull request details to a Linear task, linking PR work with project tasks. CX Codex +1 ★ 1,357repo stars sync-conflict-resolver The sync-conflict-resolver command for Claude Code identifies and resolves data conflicts between GitHub issues and Linear tasks, merging non-conflicting fields or applying a chosen strategy. CX Codex +1 ★ 1,357repo stars standup-report standup-report builds daily standup updates from Git, GitHub, and Linear, with output suited to a team summary, Slack, or email. CX Codex +1 ★ 1,357repo stars memory-compress memory-compress shrinks the semantic memory tree by merging near-identical nodes and dropping duplicates, while key checkpoints stay put. CX Codex +1 ★ 1,357repo stars memory-prune memory-prune cleans low-value, broken, and outdated nodes from your semantic memory tree. Keeps project context lean and responsive. CX Codex +1 ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open