merge

merge is a command for Claude Code from cwakim/claude-plugins. It costs 64 tokens per session (2,765 once invoked), scanned A, original, MIT.

An interactive command for combining memory, handoff, and planning files from backups or another machine into the current machine. A monorepo-like mirror is not required; it can work with backup sources such as a GitHub repository, object storage, or a zip file.

In plain words
What is it for?
Use it to merge saved memories, handoff notes, and plans from one or more machine mirrors, review a restore-style plan, resolve conflicts, and rebuild shared indexes.
Why use it?
It helps reconcile differences between machines while preserving local files and asking before conflicts are applied. It excludes machine-specific configuration because copying that automatically could cause breakage.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the memory-backup plugin — 5 commands shipped together

Good fit Use it to merge saved memories, handoff notes, and plans from one or more machine mirrors, review a restore-style plan, resolve conflicts, and rebuild shared indexes.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add cwakim/claude-plugins
Claude Code
/plugin install memory-backup

Made for: Claude Code.

Or install memory-backup, the plugin that ships this one along with the rest of its 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for merge

README.md
[![agentmods](https://agentmods.dev/badge/commands/cwakim/claude-plugins/merge/github.svg)](https://agentmods.dev/commands/cwakim/claude-plugins/merge)
Your own site
<a href="https://agentmods.dev/commands/cwakim/claude-plugins/merge"><img src="https://agentmods.dev/badge/commands/cwakim/claude-plugins/merge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for merge

Your own site · 80×15
<a href="https://agentmods.dev/commands/cwakim/claude-plugins/merge"><img src="https://agentmods.dev/badge/commands/cwakim/claude-plugins/merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.02765
Opus 5.5 $0.00026 $0.01106
Sonnet 5.5 $0.00013 $0.00553
Haiku 4.5 $0.00006 $0.00277

Measured 2mo ago against content hash cbaf6187a74b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

merge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/memory-backup/commands/merge.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Merge (merge [--dry-run] [path])

Converges this machine's live state with the other machines' mirrors. Merge reads one, several, or all of the other machines/<host>/ subtrees from a backup source and applies their content into the live stores here, with restore's temperament throughout: plan first, conflicts asked, nothing local ever deleted, nothing applied before the plan is confirmed. It never writes into any machines/ subtree; the every-machine-writes-only-its-own invariant from docs/layout.md stands. It works for any number of machines. Full convergence is one cycle: each machine in turn merges from all the others and backs up, in any order; after the last machine's turn every subtree agrees, and resolutions made early in the cycle propagate through the mirror, so later machines mostly just confirm them.

Merge covers memories, handoffs, and plans. Config is excluded by design: settings.json, keybindings, commands, and agents legitimately differ per machine, and merging them invites subtle breakage. Config moves between machines only through an explicit restore, where the user has deliberately chosen a source machine to copy from.

The mirror tree and name-to-target derivation rules live in ${CLAUDE_PLUGIN_ROOT}/docs/layout.md; read it before building the plan. If the source machine picked below turns out to be this machine's own subtree, refuse and point at restore: merging a mirror into the machine it came from is what restore is for.

Resolve the source

Identical to restore's source resolution (see commands/restore.md), except merge wants every machine's subtree, not just this host's:

  • <path> given: a zip made by zip <path>, or its already-extracted folder. A .zip file is extracted into a fresh temp directory (mktemp -d); a directory is used directly. Verify the source root contains at least one machines/<hostname>/ subtree; if not, say so and stop. No GitHub, no gh, no network.
  • <path> is a gist URL (https://gist.github.com/...): a share bundle from share (${CLAUDE_PLUGIN_ROOT}/commands/share.md), the common way a colleague receives a thread. Resolve it exactly as restore does (gh gist view the bundle.zip.base64 file, base64-decode, extract into a fresh temp directory), then treat that directory as the source root like any extracted zip. Requires gh authenticated. A share bundle holds one machine's curated subtree, so the single-source path below applies; point the user at its ONBOARDING.md in the report.
  • No <path>: a configured backup target; both kinds may exist.
    • GitHub mirror (~/.claude/memory-backup/ clone): git pull --ff-only first so it is current. The source root is the clone.
    • Object storage (~/.claude/memory-backup-obstore.json): materialize it into a fresh temp directory with ${CLAUDE_PLUGIN_ROOT}/scripts/obstore-pull.sh --dest <tmp> --bucket ... reading bucket/prefix/endpoint/region/profile from the config. Pass no --host, so the whole machines/ tree (every machine) comes down, which is what merge reads across. The temp dir is then the source root, handled exactly like an extracted zip.
    • Both configured: ask via AskUserQuestion which to merge from. Only one: use it without asking. If nothing is configured, say so and stop: merge presumes an established mirror (for disaster recovery onto a fresh machine, use restore).

Read the full file on GitHub · 191 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +9 lines cbaf6187a74b
  2. 3mo ago First seen · 182 lines · 64 tokens per session scan A 46018af7ff4d

Subscribe to this mod's changes

merge is a command published in the GitHub repository cwakim/claude-plugins (2 stars, last pushed 2mo ago), licensed MIT. It adds 64 tokens to every session and 2,765 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

merge compared with commands from other repositories

merge next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mergecwakim/claude-pluginsCommand22mo agoMITA64Claude Code
patternsmycelium-hq/ai-brain-starterCommand612d agoMITA20Claude Code
context-primejoaquimscosta/arkhe-claude-pluginsCommand241mo agoMITA65Claude Code
diaryjoaquimscosta/arkhe-claude-pluginsCommand241mo agoMITA16Claude Code
tourLH8PPL/core-memory-kitCommand82mo agoMITA21Claude Code
claude-flow-memoryjazz-max/ruflo-hubCommand43mo agononeA12Claude Code
post-taskjazz-max/ruflo-hubCommand43mo agononeA0Claude Code