Agent skill

Cmux

by will-ness-ai in will-ness-ai/skills

Drive the local cmux app — workspaces, panes, surfaces, terminal input, agent sessions, and browser surfaces.

MITAuto-check passed

Install Cmux

skills CLI
$ npx skills add will-ness-ai/skills --skill cmux -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install will-ness-ai/skills cmux --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/will-ness-ai/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cmux .claude/skills/cmux && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cmux
GitHub stars
168
Token cost
~2.3k tokens
SKILL.md length
961 words
Files
3 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Drive the local cmux app — workspaces, panes, surfaces, terminal input, agent sessions, and browser surfaces.

  • SKILL.md covers The four nouns, You are the caller, Handles and Orient first, plus 8 more sections
  • Calls jq

What it does

Cmux is an agent skill from will-ness-ai/skills. Drive the local cmux app — workspaces, panes, surfaces, terminal input, agent sessions, and browser surfaces.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `agents/openai.yaml` and `references/automation-patterns.md`).

The repository describes itself as: Skills for building high quality software. The licence is MIT.

Example prompts

  • “/cmux”

What it can do on your machine

Read from SKILL.md and the folder at commit 71d8909. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cmux loads about 2.3k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 961 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from will-ness-ai/skills at commit 71d8909, republished under its MIT licence (© will-ness-ai). 961 words, ~2,264 tokens.

Download SKILL.mdSave it as .claude/skills/cmux/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
cmux
description
Drive the local cmux app — workspaces, panes, surfaces, terminal input, agent sessions, and browser surfaces.
disable-model-invocation
true

cmux

cmux is a command-line client for the cmux.app on this machine. Each command opens the app's Unix socket and changes the live window. There is no dry-run mode. Written against cmux 0.64.22; run cmux version to compare.

The four nouns

NounWhat it is
windowA macOS window. Holds workspaces.
workspaceA tab-like group in a window. Holds panes.
paneA split area in a workspace. Holds surfaces.
surfaceOne tab in a pane. A terminal, a browser, a simulator, or an agent session.

The surface is where text goes in and out. Almost every command needs one, and takes it from a flag or from the environment.

You are the caller

You run inside a cmux surface. Your environment has CMUX_WORKSPACE_ID and CMUX_SURFACE_ID, and every targeting flag defaults to them. So cmux send "ls" with no --surface types into your own terminal.

Start with:

bash
cmux identify --json

caller.surface_ref in the output is you. focused.surface_ref is what the user looks at. Send text to your own surface only when the user asks for that.

Handles

A window, workspace, pane, or surface flag accepts three forms:

  • ref — workspace:30, surface:217. Printed by every list command.
  • uuid — A1B2C3D4-E5F6-4789-ABCD-0123456789AB. Stable and global.
  • index — 0, 1, 2. The position in the list.

A ref and an index both look like a number, and they point at different things: the first workspace can print as workspace:1 at index 0. Use refs, and copy them from a listing you just ran. Add --id-format uuids or --id-format both when you need UUIDs.

Orient first

bash
cmux tree            # this window: workspaces, panes, surfaces, titles, ttys
cmux tree --all      # every window
cmux identify --json # who you are

cmux tree shows the whole app in one screen. Read it before you target anything.

Two ways in

CLI verbs — cmux new-workspace, cmux send, cmux browser click. Use these to create things. A CLI verb is the only path that honours creation options.

cmux rpc <method> '<json>' — the raw socket. Use it to read and change things that already exist. It returns JSON on stdout, so it parses cleanly.

bash
cmux rpc workspace.list
cmux rpc surface.list '{"workspace_id":"<uuid>"}'
cmux rpc surface.read_text '{"surface_id":"<uuid>"}'
cmux rpc workspace.rename '{"workspace_id":"<uuid>","title":"Done"}'

Creation is the split that matters. surface.create over rpc takes no url, and workspace creation over rpc drops the title, cwd, description, and group. So:

bash
cmux new-workspace --name "Tests" --cwd . --description "owner/repo#1" --focus false
cmux new-surface --type browser --url "file:///tmp/board.html" --workspace <uuid> --focus false

Errors arrive on stderr with a non-zero exit, not as a JSON error object:

Error: invalid_params: Surface is not a terminal
method_not_found: Unknown method

Look it up

The binary is the source of truth, and it ships its own docs.

bash
cmux --help              # every command
cmux <command> --help    # exact flags and examples for one command
cmux docs                # doc topics
cmux docs api            # CLI contract and socket API URLs
cmux capabilities        # every v2 socket method, as JSON

cmux --help lists more than 200 commands. Do not guess a flag. Read cmux <command> --help first. To find an rpc method:

bash
cmux capabilities | jq -r '.methods[]' | grep workspace

Most commands take --json for machine-readable output.

Stay out of the user's way

The user is sitting in this app while you work. Pass --focus false on creation so their selection stays put. Focus something only when the user asks to see it.

Recipes

Run a command in a new workspace
bash
cmux new-workspace --name "Tests" --cwd . --command "npm test" --focus false

--command sends the text and Enter.

Send input to another surface
bash
cmux send --surface surface:78 "npm run build\n"
cmux send-key --surface surface:78 ctrl+c

send types the text and stops. End the string with \n to submit it.

Read what a surface shows
bash
cmux read-screen --surface surface:78
cmux read-screen --surface surface:78 --scrollback --lines 200

read-screen returns a snapshot of this moment. It does not wait. It fails on a browser surface with invalid_params: Surface is not a terminal.

Boot an agent in another surface

An agent TUI batches an incoming paste. An Enter that races the paste gets swallowed, and the prompt sits typed but unsent. So type, confirm on screen, then press Enter as a separate call.

bash
S=surface:78
cmux send --surface $S "claude\n"

# 1. Wait for the TUI. Poll for its prompt marker: ⏵⏵ ❯ "for shortcuts"
until cmux read-screen --surface $S | grep -qE '⏵⏵|❯|for shortcuts'; do sleep 0.2; done

# 2. Type the prompt with no Enter.
cmux send --surface $S "Fix the failing test in src/auth.ts"

# 3. Confirm it landed. Match a short head slice — the input box wraps the rest.
until cmux read-screen --surface $S | grep -qF "Fix the failing test"; do sleep 0.1; done

# 4. Now submit.
cmux send-key --surface $S enter

Budgets that hold in practice: the TUI is ready in about 2 seconds, so time out at 20. The typed text appears in well under a second, so time out at 5. Submit anyway on timeout, and tell the user it was not confirmed.

A dedicated agent surface is the other option, with its own UI instead of a TUI:

bash
cmux new-surface --type agent-session --provider claude --working-directory . --focus false

--provider accepts codex, claude, or opencode, and defaults to codex.

Show full SKILL.md (346 more words)Show less
Change the layout
bash
cmux new-split right --surface surface:78
cmux move-surface --surface surface:217 --pane pane:38 --focus true
cmux split-off --surface surface:217 right
cmux rename-tab --surface surface:217 "Build"
Wait for a signal
bash
cmux events --category agent --name agent.hook.Stop --limit 1

cmux events prints newline-delimited JSON and blocks. The first frame is an ack with resume data. Use --limit <n> to exit after n frames, --no-heartbeat to drop the 15-second keepalive, and --cursor-file <path> with --reconnect to resume after a restart. agent.hook.Stop arrives only after cmux hooks setup installs the agent hooks.

To hand off between two of your own commands:

bash
cmux wait-for build-done --timeout 120   # blocks
cmux wait-for -S build-done              # releases it
Report progress to the user
bash
cmux notify --title "Tests passed" --body "412 tests, 0 failures"
cmux set-status build ok --icon checkmark --color '#22c55e'
cmux set-progress 0.6 --label "Migrating"
cmux log --level info "Step 3 of 5 complete"

Browser surfaces

A cmux surface can be a real browser that you drive like Playwright:

bash
cmux browser open https://example.com
cmux browser snapshot --interactive
cmux browser click "button.submit"
cmux browser screenshot --out /tmp/shot.png

Run cmux browser --help for the full set, and cmux docs browser for the upstream reference.

Guardrails

  • The checklist belongs to the user. Leave cmux todo items and cmux workspace status alone. Change them only when the user asks you to manage that surface. Keep your own plan in your own task tracking.
  • Back up the config before you edit it. Copy ~/.config/cmux/cmux.json to a timestamped .bak file first. Then run cmux config doctor and cmux reload-config.
  • Terminal look belongs to Ghostty. Font, theme, cursor, scrollback, opacity, and blur live in ~/.config/ghostty/config. App behaviour, sidebar, notifications, and browser settings live in cmux.json. cmux reload-config reloads both with no restart.
  • Ask before you close. close-workspace, close-surface, and close-window destroy running work, and there is no undo.

When a command fails

cmux ping prints PONG when the app is up. Anything else means the app is down, or CMUX_SOCKET_PATH points at the wrong socket. cmux --help, cmux version, and cmux docs work with no socket.

The socket also gates who may connect. cmux capabilities reports the mode as access_mode. The default is cmuxOnly, which accepts only processes that cmux itself spawned — so the same script that works in a cmux terminal is refused from an outside shell, a cron job, or a detached daemon. automation.socketControlMode in cmux.json changes this.

Writing a script that drives cmux

Read references/automation-patterns.md before you write a loop, a watcher, or anything that creates surfaces in bulk. It covers settling after a mutation, identifying what you just created, browser tabs that go stale, and the workspace-group trap.

© will-ness-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/cmux of will-ness-ai/skills.

  • SKILL.md
  • agents/openai.yaml
  • references/automation-patterns.md

Open the folder on GitHubat commit 71d8909

Compare with similar skills

Cmux next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cmux compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cmux this skillwill-ness-ai/skills168—~2.3kAutomated safety check: PassMIT
Cmuxsickn33/agentic-awesome-skills47k1 repos~3.5kAutomated safety check: NotesMIT
Workspace Surface Auditaffaan-m/ECC276k3 repos~1.3kAutomated safety check: NotesMIT
Workspace Surface Auditaffaan-m/ECC276k—~761Automated safety check: NotesMIT
Workspace Surface Auditaffaan-m/ECC276k—~558Automated safety check: NotesMIT
cmux Workspace Scopingbasicmachines-co/basic-memory4.1k2 repos~1.7kAutomated safety check: PassAGPL-3.0

Similar skills

  • Cmux

    sickn33/agentic-awesome-skills

    Control cmux workspaces, panes, surfaces, and agent sessions safely from macOS terminal workflows.

    47k GitHub starsUsed in 1 repo~3.5k tokens
    Productivity & AutomationAuto-check: notes
  • Audit the active repo, MCP servers, plugins, connectors, env surfaces, and harness setup, then recommend the highest-value ECC-native skills, hooks, agents, and operator workflows.

    276k GitHub starsUsed in 3 repos~1.3k tokens
    Agent WorkflowsAuto-check: notes
  • アクティブなリポジトリ、MCPサーバー、プラグイン、コネクター、環境サーフェス、ツールのセットアップを監査し、最も価値の高いECCネイティブスキル、フック、エージェント、オペレーターワークフローを推奨する。ユーザーがClaude Codeのセットアップを支援してほしい場合や、環境で実際に何が使えるかを理解したい場合に使用する。

    276k GitHub stars~761 tokensUpdated 4 days ago
    Agent WorkflowsAuto-check: notes
  • 审计活跃仓库、MCP服务器、插件、连接器、环境表面和工具设置,然后推荐最高价值的ECC原生技能、钩子、代理和操作员工作流。当用户希望帮助设置Claude Code或了解其环境中实际可用的功能时使用。

    276k GitHub stars~558 tokensUpdated 4 days ago
    Agent WorkflowsAuto-check: notes
  • cmux Workspace Scoping

    basicmachines-co/basic-memory

    Keeps agent actions scoped to the cmux workspace and terminal that invoked it, and lays out pane and surface commands that avoid disrupting the user's own focus.

    4.1k GitHub starsUsed in 2 repos~1.7k tokens
    Productivity & AutomationAuto-check passed
  • Opens, inspects, and drives a browser surface through the cmux CLI without stealing the user's focus, always targeting an explicit surface handle.

    28k GitHub stars~2.7k tokensUpdated today
    Productivity & AutomationAuto-check passed

More from will-ness-ai/skills

  • Sandcastle

    will-ness-ai/skills

    Run a Sandcastle lane — a sandboxed implement→review loop over a fixed batch of work in its own worktree, ended by an agent-authored PR.

    168 GitHub stars~1.4k tokensUpdated today
    Auto-check: notes
  • Code Story

    will-ness-ai/skills

    Build a wizard-style HTML page that teaches how and why a change works.

    168 GitHub stars~828 tokensUpdated today
    Auto-check passed
  • Flashlight

    will-ness-ai/skills

    Shine a light into a wayfinder map's fog — work one direction now, out of frontier order, or redraw the map itself.

    168 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Test A Skill

    will-ness-ai/skills

    Field-test a skill by running it cold in parallel agent sessions, then turn what they hit into edits.

    168 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Grill Design

    will-ness-ai/skills

    Converge on a frontend look through rounds of prototypes and grilling verdicts.

    168 GitHub stars~254 tokensUpdated today
    Auto-check passed
  • Find Standards

    will-ness-ai/skills

    Find how this problem is already solved: standards we could adopt, and the industry's best practices.

    168 GitHub stars~585 tokensUpdated today
    Auto-check passed

Questions about Cmux

What does Cmux do?

Drive the local cmux app — workspaces, panes, surfaces, terminal input, agent sessions, and browser surfaces. Cmux is an agent skill from will-ness-ai/skills. Drive the local cmux app — workspaces, panes, surfaces, terminal input, agent sessions, and browser surfaces.

How do I install Cmux in Claude Code?

Run `npx skills add will-ness-ai/skills --skill cmux -a claude-code`. Or copy the skill folder (skills/cmux in will-ness-ai/skills) into .claude/skills/cmux in your project. Claude Code loads it when a task matches its description.

How do I install Cmux in Codex?

Run `npx skills add will-ness-ai/skills --skill cmux -a codex`. Or copy the skill folder (skills/cmux in will-ness-ai/skills) into .agents/skills/cmux in your project. Codex loads it when a task matches its description.

Can I use Cmux in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add will-ness-ai/skills --skill cmux -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cmux, .gemini/skills/cmux, .github/skills/cmux and .opencode/skills/cmux in your project.

What does Cmux need to run?

Going by SKILL.md and its folder, Cmux needs the command-line tools its instructions call (jq).

Does Cmux access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cmux safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cmux use?

Cmux is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cmux use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Cmux?

Skills that share tags, products or a category with Cmux: Cmux (sickn33/agentic-awesome-skills, 47k stars), Workspace Surface Audit (affaan-m/ECC, 276k stars), Workspace Surface Audit (affaan-m/ECC, 276k stars) and Workspace Surface Audit (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cmux?

will-ness-ai (a GitHub user) maintains it in will-ness-ai/skills, which has 168 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 9, 2026.

Source: will-ness-ai/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.