From mjmendo-plugins
Spin up parallel Claude subagents in cmux panes, delegate tasks, monitor, and close when done.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mjmendo-plugins:cmux-agentsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
All cmux commands need `--socket /tmp/cmux.sock` and `dangerouslyDisableSandbox: true`.
All cmux commands need --socket /tmp/cmux.sock and dangerouslyDisableSandbox: true.
cmux --socket /tmp/cmux.sock identify # note workspace:N
cmux --socket /tmp/cmux.sock new-pane right --workspace workspace:N
# → OK surface:X pane:Y workspace:N
Save surface:X — that's the ref for all send/read/close commands. Open all panes before starting Claude in any of them.
cmux --socket /tmp/cmux.sock send --surface surface:X "claude"
cmux --socket /tmp/cmux.sock send-key --surface surface:X "Return"
sleep 6
cmux --socket /tmp/cmux.sock read-screen --surface surface:X --lines 4
Confirm ❯ prompt before sending tasks. Never put \n in send strings — always use a separate send-key Return.
cat > /tmp/agent1.txt << 'END'
Task description here. No escaping needed.
END
Always use temp files — inline strings break on backticks, $, and special chars.
cmux --socket /tmp/cmux.sock send --surface surface:X "$(cat /tmp/agent1.txt)"
cmux --socket /tmp/cmux.sock send-key --surface surface:X "Return"
Send all agents before polling — they run in parallel.
cmux --socket /tmp/cmux.sock read-screen --surface surface:X --lines 12
Poll early, then regularly: Agents often hit permission prompts within the first 15–30 seconds of running (e.g., reading from /tmp/, shell command warnings). Poll at ~15s after sending the prompt, then again at 30s if needed, before settling into 60–120s intervals. Missing early prompts stalls all agents simultaneously.
Poll every 60–120s after the initial burst. Agents pause on file-write permission prompts:
Do you want to create file.py?
❯ 1. Yes
2. Yes, allow all edits during this session
Unblock with send "2" — not send-key "2" (send-key fails on menu selections):
cmux --socket /tmp/cmux.sock send --surface surface:X "2"
Done when screen shows Worked for Xm Xs or idle ❯ with no spinner.
ls path/to/expected/output/
cmux --socket /tmp/cmux.sock close-surface --surface surface:X
For agent isolation decisions → /cmux-agents-isolation
For writing effective subagent prompts → /cmux-agents-prompts
npx claudepluginhub mjmendo/claude-plugins --plugin mjmendo-pluginsOrchestrates terminal panes, spawns Claude/Codex sub-agents, sends keys between surfaces, reads pane output, and manages browser/markdown panes via cmux CLI. Replaces plain bash for parallel multi-pane workflows.
Orchestrates parallel AI agent workflows using dmux tmux pane manager across Claude Code, Codex, OpenCode. Activate for multi-agent coordination, parallel sessions, or divide-and-conquer dev tasks.
Splits cmux panels for parallel Codex (code), Gemini (design), and Claude (planning) task execution via log streaming and agent teams. Use /cmux-ai-run for multi-AI workflows in cmux.