| name | cmux |
| description | cmux terminal orchestration — split panes, spawn Claude Code instances, send commands, poll output, report sidebar progress, automate the built-in browser, and preview markdown. Use this skill whenever you need to: run parallel tasks in separate panes, launch sub-Claude-Code instances, monitor terminal output, update sidebar status/progress, coordinate multiple terminal sessions, fan out work across splits, open a website in a cmux browser pane, interact with web pages, or display markdown alongside the terminal. Even if the user just says 'run these in parallel', 'open that in a browser', or 'show the plan', this skill applies. |
cmux Orchestration
Orchestrate terminal sessions, spawn Claude Code instances, automate the built-in browser, preview markdown — all inside cmux.
Detection
Check CMUX_WORKSPACE_ID env var. If set → you're in cmux. If unset → skip all cmux commands.
Auto-set env vars: CMUX_WORKSPACE_ID, CMUX_SURFACE_ID, CMUX_SOCKET_PATH.
Hierarchy
Window > Workspace (sidebar tab) > Pane (split region) > Surface (terminal tab in pane).
Short refs: workspace:1, pane:1, surface:2.
Orientation
cmux identify --json
cmux list-workspaces
cmux list-panes
cmux list-pane-surfaces --pane <ref>
cmux tree --all
Create Terminals
cmux new-split <left|right|up|down>
cmux new-workspace --cwd <path>
cmux new-surface
Launch Claude Code in a Pane
Network access requires proxy. Always include it before claude.
cmux send --surface <ref> 'proxy && claude --dangerously-skip-permissions\n'
cmux send --surface <ref> 'proxy && claude -p "your prompt" --model haiku 2>&1 | tee /tmp/agent-output.txt; echo "AGENT_DONE"\n'
Send Input / Read Output
cmux send --surface <ref> "text\n"
cmux send-key --surface <ref> <key>
cmux read-screen --surface <ref> --lines <n>
Sidebar Status & Progress
The sidebar is always visible — use it to give the user a glance at what's happening without switching panes.
cmux set-status <key> <value> --icon <name> --color <#hex>
cmux set-progress <0.0-1.0> --label "text"
cmux log --level <info|success|warning|error> --source "agent" -- "message"
cmux notify --title "Title" --body "Body"
cmux clear-status <key> / cmux clear-progress / cmux clear-log
Workspace Management
cmux rename-workspace "name"
cmux rename-tab --surface <ref> "name"
cmux close-surface --surface <ref>
cmux close-workspace --workspace <ref>
Browser (quick reference)
Open sites in cmux's built-in browser, interact with pages, take screenshots. Read references/browser.md for full command reference, form automation, and troubleshooting.
cmux --json browser open https://example.com
cmux browser <surface> wait --load-state complete --timeout-ms 15000
cmux browser <surface> snapshot --interactive
cmux browser <surface> click e1
cmux browser <surface> fill e2 "text"
cmux browser <surface> screenshot --out /tmp/s.png
cmux browser <surface> get url
cmux browser <surface> get title
cmux browser <surface> navigate <url>
Markdown Preview (quick reference)
Display formatted markdown alongside the terminal with live reload. Read references/markdown.md for routing options and agent integration patterns.
cmux markdown open plan.md
cmux markdown open plan.md --workspace workspace:2
Workflow Patterns
Fan out into splits (parallel tasks)
cmux new-split right
cmux send --surface surface:2 'proxy && claude -p "analyze project structure" --model haiku > /tmp/a1.txt; echo "DONE"\n'
cmux new-split down
cmux send --surface surface:3 'proxy && claude -p "count code lines" --model haiku > /tmp/a2.txt; echo "DONE"\n'
cmux set-status task "Running" --icon hammer --color "#1565C0"
Interactive sub-agents (user can intervene)
cmux new-split right
cmux send --surface surface:2 'proxy && claude --dangerously-skip-permissions\n'
Progress tracking
cmux set-progress 0.0 --label "Starting"
cmux set-progress 0.5 --label "Testing"
cmux set-progress 1.0 --label "Complete"
cmux clear-progress
cmux notify --title "Done" --body "All tasks finished"
Safety Rules
- Don't send to surfaces you didn't create — the user may be actively typing there.
- Always target by surface ref — use
--surface <ref> from when you created the pane.
- Don't steal focus — avoid
select-workspace, focus-pane unless the user asked.
- Clean up after yourself — close surfaces/workspaces you created once done.
- Start with
identify --json — know your context before creating terminals.