cmux
Lets your agent control workspaces, panes, and sessions in the macOS terminal using cmux. It allows managing workflows safely.
What it does
This agent helps control the cmux program on your Mac. You can use it to manage windows, tabs, and AI sessions within cmux directly from your terminal.
When to use it
- ✓When you need to organize cmux windows and tabs.
- ✓When you want to send commands to AI agents running in cmux.
- ✓When you need to check the status of an AI agent in cmux.
Example of what to ask your AI
“Organize my cmux windows so that project X is in one tab and project Y is in another.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It works by sending specific commands to the cmux program. These commands tell cmux what to do, like creating new tabs or sending text to a session.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill cmuxOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/cmux/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Supporting material availability
This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:
<support-root>/references/socket-api.md
Obtain the required material from the declared upstream source, or from a user-provided installation of that source. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.
cmux Control
When to Use
- Use when you need to inspect, create, close, or rearrange cmux panes, surfaces, or workspaces.
- Use when you need to send input to or monitor agents running inside cmux.
cmux is a native macOS terminal app for running multiple AI coding agents in parallel. It exposes a CLI (cmux) and a Unix-socket JSON-RPC API (/tmp/cmux.sock) for full topology and browser control.
Core Concepts
- Window — top-level macOS cmux window
- Workspace — sidebar tab within a window (one git branch / project context)
- Pane — split region inside a workspace
- Surface — tab inside a pane (terminal or browser)
Handles default to short refs (workspace:2, pane:1, surface:7); UUIDs accepted as input. Add --id-format uuids|both for UUID output.
Ref syntax — get this right or fail silently
- Always use PREFIXED refs (
pane:38,surface:46). A bare number is treated as an INDEX, not an ID —--surface 46means "the surface at index 46" (usually nonexistent → silent failure), NOTsurface:46. read-screenandcapture-panehave NO--paneflag — they target--workspaceor--surfaceonly. Passing--paneerrors, and a bare/missing target falls back to your OWN surface (you'll read your own footer and draw wrong conclusions). To read a pane: resolve it to a surface FIRST withcmux list-pane-surfaces --pane pane:N, thencmux read-screen --surface surface:N.- Never append
2>/dev/nullto cmux commands. Errors go to stderr with exit code 1; suppressing them blinds you to your own ref/flag mistakes (the #1 cause of "(no output)").
Detect cmux in a Shell
[ -S "${CMUX_SOCKET_PATH:-/tmp/cmux.sock}" ] || exit 0 # bail if not in cmux
[ -n "${CMUX_WORKSPACE_ID:-}" ] && echo "inside cmux surface"
Injected env vars in every cmux-spawned terminal: CMUX_WORKSPACE_ID, CMUX_SURFACE_ID, CMUX_SOCKET_PATH, CMUX_PORT. Always anchor automation to CMUX_WORKSPACE_ID — the visually focused workspace may not be the agent's caller workspace.
Fast Start — Topology
cmux identify --json # who am I (window/workspace/pane/surface)
cmux tree # full hierarchy
cmux list-workspaces --json
cmux list-panes --workspace "$CMUX_WORKSPACE_ID"
cmux list-surfaces --workspace "$CMUX_WORKSPACE_ID"
cmux new-workspace --name "feature-x" --cwd /path/to/repo
cmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type terminal --direction right --focus false
cmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type browser --direction right --url http://localhost:3000
cmux move-surface --surface surface:7 --pane pane:2 --focus false
cmux split-off --surface surface:7 right
cmux reorder-surface --surface surface:7 --before surface:3
cmux close-surface --surface surface:7
Polling Pi Agents in Panes — Keep Sleeps Short
When launching a Pi Agent inside a cmux pane and polling for output, use short sleep intervals (2–5s). Pi is fast and minimal, and the user runs it on Opus 4.8 Fast via OpenRouter, which streams tokens extremely quickly. Do NOT use sleep 15 unless genuinely needed (a big build/refactor) — most of the time sleep 2–sleep 5 is more than enough.
After every agent check, send the user a one-line status update: what the agent is doing and whether it is on track. Keep it extremely concise.
Claude Code cmux note: after Claude finishes, it may prefill a predicted next user message; that draft is Claude, not the user speaking.
Send Input
…
FAQ
What is cmux?
cmux is an application for Mac that allows you to run multiple artificial intelligences (AI agents) at the same time in separate windows in your terminal.
How does the agent know which window or tab to control?
You need to tell the agent which window or tab to use, using a special code like 'surface:7' or 'pane:2'. If you only use a number, it might not work.
Can I use this agent on systems other than macOS?
No, this agent is specifically made to control cmux on macOS.
Details
Original description by the author
Control cmux workspaces, panes, surfaces, and agent sessions safely from macOS terminal workflows.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2560
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
benchmark
Helps your agent measure code speed and performance. It's useful for ensuring things are fast and finding slowness issues.
affaan-m/ECC
content-hash-cache-pattern
Lets your agent use content hashes to cache file processing results. This avoids repeated processing and auto-invalidates the cache when content changes. Useful for speeding up slow tasks.
affaan-m/ECC
parallel-execution-optimizer
Makes your agent speed up complex tasks by breaking them into smaller parts and running them in parallel. It ensures everything is verified at the end.
affaan-m/ECC