cd-branch

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

A command for Conductor, a system that organizes development work into branches and waves. It creates a branch task card and short brief without starting a work session.

In plain words
What is it for?
Use it from the master session to plan a branch, assign its role and execution wave, record dependencies, and add it to Conductor's registry.
Why use it?
It records the next piece of work, its dependencies, and whether it can run alongside other work, so branch planning does not have to be done manually.

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-branch
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-branch

README.md
[![agentmods](https://agentmods.dev/badge/commands/jinghao67/conductor/cd-branch.svg)](https://agentmods.dev/commands/jinghao67/conductor/cd-branch)
Your own site
<a href="https://agentmods.dev/commands/jinghao67/conductor/cd-branch"><img src="https://agentmods.dev/badge/commands/jinghao67/conductor/cd-branch.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 719 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.00018 $0.00719
Opus 5 $0.00009 $0.00360
Sonnet 5 $0.00004 $0.00144
Haiku 4.5 $0.00002 $0.00072

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

Security

Grade A, and why

cd-branch 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 4d 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-branch.md · 40 lines

What it actually says

Existing branches and waves (for picking the next id and placing the wave): !jq -r '{next_index:( ([.branches|keys[]|sub("CD-";"")|tonumber]|max // 0) + 1 ), branches:[.branches|to_entries[]|{id:.key,status:.value.status,wave:.value.execution_wave,depends_on:.value.depends_on}], waves:.waves}' .conductor/registry.json 2>/dev/null || echo "No .conductor — run /cd-init first."

Request: $ARGUMENTS

Do this:

  1. Judge the wave and dependencies (this is your job, not a hook's): is this branch ready_parallel (runs now from the current snapshot) or dependent (needs another branch's output first)? Respect the active interactive-branch budget (max 2). If dependencies are ambiguous, ask the user before creating the card.
  2. Choose the next id CD-NNN from next_index above. Build the stable title [CD-NNN][W<wave>][<role>] <short purpose>.
  3. Append the branch to .conductor/registry.json under .branches["CD-NNN"] with this shape (status brief_ready):
    {"title":"<title>","stable_title":"[CD-NNN][W<wave>][<role>] <short>","type":"branch","role":"<role>","status":"brief_ready","execution_wave":<n>,"depends_on":[],"unblocks":[],"start_policy":"current_wave_only","gate_condition":"completion_report_ready","merge_policy":"explicit_user_confirm","based_on_snapshot_id":null,"brief_version":1,"stale":false,"brief_path":".conductor/branches/CD-NNN/brief.md","report_path":".conductor/branches/CD-NNN/completion-report.md","bound_session_id":null}
    
    Also add/extend the relevant .waves[] entry. (The branch-map.md re-renders automatically.)
  4. Write .conductor/branches/CD-NNN/brief.md — the ONLY context the branch will receive:
    # Branch CD-NNN — <title>
    
    ## Purpose Card
    You are branch CD-NNN: <title>
    Purpose: <one precise outcome>
    Not for: <out of scope>
    Input: master snapshot <id>; approved summaries only
    Output: completion-report.md
    Return to master when: output is ready and the user confirms completion
    
    ## In scope / Out of scope
    ## Allowed context (this brief + listed files only)
    ## Completion criteria
    ## Global-decision rule
    If you make/imply a decision affecting other branches, scope, naming, or goals, record it
    under "Proposed Global Decisions" in the completion report; it is not binding until the master confirms it.
    
  5. Do NOT open a session. Tell the user: review the card, then /cd-enter CD-NNN to start the branch in a new tab.
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. 4d ago First seen · 40 lines · 18 tokens per session scan A d24eb216cc4d

Subscribe to this mod's changes

cd-branch is a command published in the GitHub repository Jinghao67/conductor (106 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 719 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.