cd-init

A command that sets up Conductor in a project and makes the current session its clean master session. Conductor is a system for coordinating separate coding branches and sessions.

In plain words
What is it for?
Use it at the start of a Conductor workflow to initialize branch tracking, bind the master session, and record the project’s current state.
Why use it?
It creates the project records and control structure needed to manage branches without mixing their work into the master session.

Command

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-init
Clone the repo
git clone --depth 1 https://github.com/Jinghao67/conductor
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 530 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.00530
Opus 5 $0.00009 $0.00265
Sonnet 5 $0.00004 $0.00106
Haiku 4.5 $0.00002 $0.00053

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

Security

Grade A, and why

cd-init 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 2d 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-init.md · 21 lines

What it actually says

Scaffolding result (runs before you act): !D=".conductor"; mkdir -p "$D/branches" "$D/bindings" "$D/snapshots"; SID="${CLAUDE_SESSION_ID}"; PROJ="$(basename "$PWD")"; if [ ! -f "$D/registry.json" ]; then printf '{"schema_version":1,"project":"%s","master":{"session_id":"%s","snapshot_id":null,"current_wave":1,"active_interactive_branch_limit":2},"waves":[],"branches":{},"snapshots":[]}\n' "$PROJ" "$SID" > "$D/registry.json"; else tmp="$(mktemp)"; jq --arg s "$SID" '.master.session_id=$s' "$D/registry.json" > "$tmp" && mv "$tmp" "$D/registry.json"; fi; printf '{"session_id":"%s","role":"master","branch_id":null}\n' "$SID" > "$D/bindings/$SID.json"; [ -f "$D/master-snapshot.md" ] || printf '# Master Snapshot\n\n- Goal: <fill>\n- Constraints: <fill>\n- Current wave: 1\n' > "$D/master-snapshot.md"; echo "initialized .conductor (master session bound)"

You are now the Conductor master (control room) for this project ($ARGUMENTS overrides the project name if given — update .conductor/registry.json .project if so).

Master discipline now in effect (enforced by hooks):

  • Hold only goals, constraints, the branch map, confirmed decisions, risks, and approved summaries here.
  • Broad/external reads (Grep/Glob/WebFetch/WebSearch/large Read) are firewalled in this session — delegate them to the Explore subagent (codebase) or cd-research (web/papers); only their distilled result returns here.
  • Branches are separate sessions you drive directly; they return only through approved completion reports.

Next steps to tell the user:

  1. Edit .conductor/master-snapshot.md to capture the real goal and constraints.
  2. /cd-branch "<title>" --role <role> --wave <n> to create the first branch card.
  3. /cd-status any time for the Today View.
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. 2d ago First seen · 21 lines · 18 tokens per session scan A 28c92060a7e0

Subscribe to this mod's changes

cd-init 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 530 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.