The task to hand off: $ARGUMENTS
You don't implement this. You scout it, brief someone else, and stay free.
Every multiplexer step goes through scripts/multiplexer.sh, which ships with this
skill and drives Herdr or Rex, whichever you're running in. Replace <skill dir>
below with the base directory this skill was loaded from, as an absolute path, and
keep the quotes. Shell state doesn't survive between Bash calls, so source it at
the start of each one:
. "<skill dir>/scripts/multiplexer.sh" && mux_backendIt must print herdr or rex. If the file isn't there, or it prints anything
else, say so and stop: this skill needs a Claude Code session running inside Herdr
or Rex.
1. Scout before you delegate
Read the repo, write nothing. You're after the things that would cost the other agent an hour or send it down the wrong path:
- Does the plumbing for this already exist? Point at it by path.
- What's the convention for this kind of change — a sibling file doing the same thing? Name it.
- Anything that blocks or reshapes the task: a feature flag that's off, a gate the change lands behind, a constraint the task description didn't know about.
Stop as soon as you can brief someone. This is reconnaissance, not implementation.
2. Ask me only what changes the work
If scouting turned up a decision that genuinely forks the outcome and you can't settle it from the repo or a sensible default, ask me now — once the agent is running it can't reach me. Everything else: default it, and say so.
3. Create the worktree
First clear out what earlier hand-offs left behind: mux_worktree_gc removes every
worktree it created whose PR is merged or closed, with its agents, their tabs
and space (Herdr) or session (Rex), and local branch. It keeps any with uncommitted changes to tracked
files and says so — pass that on to me, don't force it.
git fetch origin --quiet
. "<skill dir>/scripts/multiplexer.sh" && mux_worktree_gc && mux_worktree_create "$PWD" <kebab-branch> origin/<base> "<label>" ["<group>"]<label> is a few plain words naming the task (dark mode). Pass
<group> only when the caller gave you one (orchestrate does): every worktree with
the same group shares one Herdr space or Rex session, one tab per agent. Herdr
names the space after the group, or the label when there's no group. Each agent
is labelled herdr.parent=<your terminal>, so a sidebar can draw its space
under your row. Rex names
the session after the one you're in plus the group or label: myapp / dark mode,
which Rex shows as myapp - dark mode. The worktree goes in
~/.worktrees/<repo>/<branch>.
It prints <worktree path><TAB><handle>. The handle is the Herdr space id
(sp…) or the Rex handle (myapp / dark mode, plain ASCII, with spaces). Always
quote it. Keep both; don't guess them.
4. Start the agent and brief it
Write the brief to a file first; long prompts don't survive shell quoting. Then:
. "<skill dir>/scripts/multiplexer.sh" && mux_agent_launch <kebab-name> "<handle>" "<worktree path>" <brief-file> --dangerously-skip-permissionsThe name must match [a-z][a-z0-9_-]{0,31}. It returns once the agent has picked
up the brief. Exit status 3 means it's stuck on Claude's folder-trust dialog:
tell me, don't answer it yourself. Under Herdr the agent is an hc terminal named
<kebab-name>, so hc get and hc read work on it too.
The brief carries, in order: the task; everything you found while scouting, so it doesn't repeat your work; the decisions I made and the ones you defaulted; what it must not touch; the deliverable. Last line is /ship.
A launch or prompt that reports a failure may still have landed. Check
mux_agent_status <name>/mux_agent_read <name>before reacting, and never re-send: you'd queue the brief twice.
5. Report and get out of the way
Give me the worktree path, the branch, the agent name, and where to follow it: the
Herdr space (named after the group or label), or the Rex session (<current session> / <group or label>, shown with a branch icon), where
the agent's tab carries its name. Don't block waiting on it.
Anything scouting surfaced that I should decide but that doesn't block the work — a rollout step, a cost, a stale assumption — goes here in a line or two, outside the brief.