cd-merge

cd-merge is a command for coding agents from Jinghao67/conductor. It costs 14 tokens per session (431 once invoked), scanned A, original, MIT.

A command for merging an approved branch report into the main snapshot in the Conductor workflow. A branch is a separate work stream for part of a larger task.

In plain words
What is it for?
Use it in the master session to verify a branch report and add its summarized findings to the master snapshot.
Why use it?
It limits the merge to a verified completion report, reducing the chance that unfinished or unreviewed branch work enters the main record.

Command

Part of the claude-code plugin — 1 skill, 7 commands, 1 agent, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jinghao67/conductor/cd-merge
Clone the repo
git clone --depth 1 https://github.com/Jinghao67/conductor

Or install claude-code, the plugin that ships this one along with the rest of its 1 skill, 7 commands, 1 agent, 4 hooks.

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 cd-merge

README.md
[![agentmods](https://agentmods.dev/badge/commands/jinghao67/conductor/cd-merge.svg)](https://agentmods.dev/commands/jinghao67/conductor/cd-merge)
Your own site
<a href="https://agentmods.dev/commands/jinghao67/conductor/cd-merge"><img src="https://agentmods.dev/badge/commands/jinghao67/conductor/cd-merge.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00014 $0.00431
Opus 5 $0.00007 $0.00216
Sonnet 5 $0.00003 $0.00086
Haiku 4.5 $0.00001 $0.00043

Measured 5d ago against content hash c819f37bbee5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cd-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 5d 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.

claude-code/commands/cd-merge.md · 17 lines

What it actually says

Merge lock set, and the completion report below is the ONLY input you may use: !B="$ARGUMENTS"; D=".conductor"; if [ ! -f "$D/branches/$B/completion-report.md" ]; then echo "MISSING REPORT for $B — the branch must run /cd-complete first."; else printf '%s' "$B" > "$D/.merge-lock"; echo "merge-lock set for $B"; echo "=== completion-report.md ($B) ==="; cat "$D/branches/$B/completion-report.md"; fi; true

Steps (do not read the branch's working history or files — only the report above):

  1. Verify first. Launch the cd-merge-verify subagent (Task tool, subagent_type: cd-merge-verify) with the branch id $ARGUMENTS, the brief path .conductor/branches/$ARGUMENTS/brief.md, and the report path .conductor/branches/$ARGUMENTS/completion-report.md. It returns APPROVE/REJECT and, on APPROVE, writes the .conductor/branches/$ARGUMENTS/report.approved sentinel.
  2. If REJECTED: do not merge. Summarize what's missing for the user, remove the lock (rm -f .conductor/.merge-lock), and stop.
  3. If APPROVED: append the report's Suggested Merge Note to .conductor/master-snapshot.md (compress further and normalize terminology). The merge-gate hook allows this edit only because report.approved now exists. Surface any Proposed Global Decisions to the user for explicit confirmation before treating them as binding.
  4. Editing the snapshot auto-flips the branch to merged and clears the lock. Confirm the Today View with /cd-status.

Explainer-sidecar reports never merge by default.

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. 5d ago First seen · 17 lines · 14 tokens per session scan A c819f37bbee5

Subscribe to this mod's changes

cd-merge is a command published in the GitHub repository Jinghao67/conductor (106 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 431 once invoked, about $0.0001 per session on Opus 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-30.