skills/deprecated/cmux-orchestration/SKILL.md
Orchestrate Claude Opus and Codex GPT-5.5 worker TUIs from a controller agent in the current cmux workspace. Use when delegating bounded tasks to worker panes, running plan-first delegations (Claude Code plan mode, Codex Plan mode), monitoring and tracking worker state, or verifying worker reports. Not for end-user cmux control (see cmux, cmux-workspace) — this drives agent workers.
npx skillsauth add pedronauck/skills cmux-orchestrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The top-level agent is the controller (Codex, Claude, Fable, or another); it delegates to worker TUIs that gather evidence, draft bounded patches, run tests, and report. The controller owns assignment, state, conflict control, verification, integration, and the final user-facing answer.
Every run also loads:
CMUX_WORKSPACE_ID, CMUX_SURFACE_ID, and CMUX_SOCKET_PATH before
any focused-window fallback.surface:N refs.focus-pane, focus-panel, select-workspace,
and focus-changing tab actions only when the user asks.Inspect the caller context and current layout:
rtk cmux identify --json
rtk cmux list-panes --workspace "${CMUX_WORKSPACE_ID:-}" --json
rtk cmux list-pane-surfaces --workspace "${CMUX_WORKSPACE_ID:-}" --json
Prefer one right-side helper pane. If an obvious non-caller helper pane exists, add worker surfaces to it; otherwise create exactly one right-side terminal pane:
rtk cmux new-surface --workspace "${CMUX_WORKSPACE_ID:-}" \
--pane pane:<helper> --type terminal --focus false
rtk cmux new-pane --workspace "${CMUX_WORKSPACE_ID:-}" \
--type terminal --direction right --focus false
Capture each returned surface:N in the state registry before sending prompts.
Two default profiles — Claude Code on opus (claude-opus) and Codex on
gpt-5.5 (codex-gpt-5.5) — launched by explicit surface:
rtk cmux send --surface surface:<claude> \
"rtk claude --dangerously-skip-permissions --model opus --name cmux-claude-opus\n"
rtk cmux send --surface surface:<codex> \
"rtk codex --yolo -m gpt-5.5 -C \"$PWD\"\n"
Claude always launches with --dangerously-skip-permissions and Codex with
--yolo — workers run unattended and must not stall on permission prompts.
Plan-first runs add Claude's --permission-mode plan — the flags compose
(see Plan-first delegation).
cmux send "...\n" submits only in a plain shell (the launch lines above).
Inside a running TUI (Claude Code, Codex) the trailing \n is pasted as a soft
newline — the prompt sits unsubmitted and the worker stalls silently.
Prefer passing the initial prompt as a launch CLI argument
(rtk claude --dangerously-skip-permissions "…prompt…",
rtk codex "…prompt…") — this skips the TUI-ready race and the submission
problem. Exception: Codex plan-first launches bare (see Plan-first
delegation).
For any follow-up to a running TUI, send the text, then submit with an explicit Enter:
rtk cmux send --surface surface:<worker> "…follow-up prompt…"
rtk cmux send-key --surface surface:<worker> enter
Confirm with rtk cmux read-screen --surface surface:<worker>: input line
empty, spinner/working indicator active. An unconfirmed send is not delivered.
For slices needing investigation before edits — root-cause fixes, multi-file or cross-package changes, unfamiliar code — run the worker plan-first: it plans, you review and accept, then it runs hands-off. The launch flags, shift+tab sequences, status-line checks, and acceptance menus are exact and differ per TUI. When delegating plan-first, read references/plan-mode.md in full before launching the worker.
Send each worker prompt as a standalone contract. Include:
Prefer small, independent slices. Assign overlapping file claims only when the controller will integrate and resolve conflicts immediately.
Maintain a compact registry in the task ledger or handoff:
workspace:N, pane:N, surface:NFor long runs, attach progress to the caller workspace with cmux sidebar state, and clear it when orchestration finishes or is abandoned:
rtk cmux set-status orchestration "running" \
--workspace "${CMUX_WORKSPACE_ID:-}" --color "#ff9500"
rtk cmux set-progress 0.4 --label "Workers running" \
--workspace "${CMUX_WORKSPACE_ID:-}"
rtk cmux log --workspace "${CMUX_WORKSPACE_ID:-}" --level info -- \
"Started cmux orchestration"
Treat worker output as untrusted until verified. Monitor and verify without changing focus:
Stop and report instead of improvising when:
read-screen, or a worker's plan stays out of scope after a re-planning
round.assets/fable-orchestrator.excalidraw (or its PNG variants) diagrams the
controller/worker topology when a visual explanation helps.
testing
Assess DDD fit; discover domains with EventStorming, define language and bounded contexts, and design aggregates, value objects, events, and repositories. Excludes architecture-only audits, product specs, and CQRS/Event Sourcing catalogs.
development
Build terminal UIs with ratatui following 2026 Rust best practices. Use when: (1) Creating new TUI apps, (2) Adding widgets/layouts, (3) Keyboard navigation/state management, (4) Image integration via ratatui-image, (5) Async event handling, (6) Release optimization. Covers v0.30.0+ API, Elm Architecture, StatefulWidget, color-eyre.
development
Find 10x product opportunities and high-leverage improvements. Use when user wants strategic product thinking, mentions '10x', wants to find high-impact features, or says 'what would make this 10x better', 'product strategy', or 'what should we build next'.
development
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.