cmux-terminal-multiplexer
cmux-terminal-multiplexer — an installable skill for AI agents.
By reason-machines · 1,436 installs
npx skills add reason-machines/trending-skills --skill cmux-terminal-multiplexer
Source repository · Upstream listing
cmux — AI Native Terminal Multiplexer
Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection
cmux is a terminal multiplexer with a programmable socket API designed for AI coding agents. It provides full Playwright equivalent browser automation, real time terminal split management, sidebar status reporting, and agent team coordination — all via a simple CLI.
What cmux Does
Terminal splits — create side by side or stacked panes, send commands, capture output
Browser automation — full headless Chromium with snapshot based element refs (no CSS selectors)
Status sidebar — live progress bars, log messages, and icon badges visible to the user
Notifications — native OS notifications from agent workflows
Agent teams — coordinate parallel subagents, each with their own visible split
Orient Yourself
Environment variables set automatically:
$CMUX SURFACE ID — your current surface ref
$CMUX WORKSPACE ID — your current workspace ref
Handles use short refs: surface:N , pane:N , workspace:N , window:N .
Terminal Splits
Create splits
Always capture the returned surface ref :
Send commands and read output
Golden rule: never steal focus. Always use surface targeting.
Worker split pattern
Pane management
Browser Automation
cmux embeds a full headless Chromium engine with a Playwright style API. No external Chrome required. Every command targets a browser surface by ref.
Workflow pattern
Open and navigate
Capture the surface ref:
Snapshot and element refs
Instead of CSS selectors, snapshot to get stable element refs ( e1 , e2 , ...):
Refs are invalidated after DOM mutations — always re snapshot after navigation or clicks. Use snapshot after to auto get a fresh snapshot:
Interact with elements
Wait for state
Read page content
Locators (Playwright style)
JavaScript evaluation
Frames and dialogs
Cookies, storage, and state
Authentication flow
Diagnostics
Script and style injection
Sidebar Status and Progress
Show live status to the user without interrupting their flow:
Notifications
Agent Teams with cmux
Use cmux splits to give each agent teammate a visible workspace. Coordinate via SendMessage and task lists — never via reading each other's terminal output.
The pattern
1. Create splits for each teammate
2. Spawn teammates via Agent tool — pass each their cmux surface ref
3. Teammates run commands in their split via cmux send surface
4. Teammates report status via cmux set status and cmux log
5. User sees all work side by side
Example: 3 agent team
Then in each teammate's prompt:
Mixed layout: terminals + browsers
Key rules
Never spawn claude p in splits — use the Agent tool with team name instead
Create splits before spawning teammates — pass refs in their prompts
One split per teammate — each owns their visible workspace
Coordinate via SendMessage , not by reading each other's terminal output
Clean up : cmux close surface surface <ref when done
Quick Reference
Task Command
Where am I? cmux identify json
Split right cmux json new split right
Split down cmux json new split down
Send command cmux send surface surface <ref "cmd\n"
Read output cmux capture pane surface <ref
Open browser cmux json browser open <url
Page snapshot cmux browser <ref snapshot interactive
Click element cmux browser <ref click e1
Fill input cmux browser <ref fill e1 "text"
Wait for load cmux browser <ref wait load state complete timeout ms 15000
Read page text cmux browser <ref get text body
Evaluate JS cmux browser <ref eval "expression"
Find by role cmux browser <ref find role button
Save auth cmux browser <ref state save ./auth.json
Load auth cmux browser <ref state load ./auth.json
Set status cmux set status <key "text" icon <name
Progress bar cmux set progress 0.5 label "Working..."
Log message cmux log "message"
Notify cmux notify title "T" body "B"
Close split cmux close surface surface <ref
Screenshot cmux browser <ref screenshot
Common Patterns
Run build in background split, tail logs
QA test flow
Status driven long task