agentleFS
auth-02auth-02/skills/cmux/SKILL.md

cmux

Skill1 starsChanged 5 months agoMITView on GitHub

Control the cmux terminal multiplexer via its CLI. Use when the user wants to manage cmux workspaces, windows, panes, or surfaces; send input to terminals; read terminal screens; drive the built-in browser (navigate, click, fill, snapshot, screenshot); or script any cmux automation. Trigger on mentions of cmux, or when the user asks to open a workspace, split a pane, read a terminal, automate a browser tab inside cmux, or send keys/text to another pane.

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cmux-browser, cmux-markdown and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • manaflow-aiSkill

    cmux-browser

    Automate the browser inside cmux. Use for cmux browser, browser surface, webview, current workspace browser, snapshot refs, DOM actions, waits, screenshots, cookies, storage, tabs, downloads, console, errors, and browser session state.

    Also in 4 projects that use this

  • basicmachines-coSkill

    cmux-markdown

    Open markdown files in a formatted viewer panel with live reload. Use when you need to display plans, documentation, or notes alongside the terminal with rich rendering (headings, code blocks, tables, lists).

    Also in 3 projects that use this

  • basicmachines-coSkill

    cmux-settings

    View and edit cmux settings in ~/.config/cmux/cmux.json. Use when the user wants to change cmux preferences (appearance, sidebar, notifications, automation, browser, shortcuts), set a value by JSON path, validate the file, open it in an editor, or look up which keys cmux recognizes. Triggers on '/cmux-settings', 'change cmux setting', 'set <something> in cmux', 'cmux config', 'cmux.json', or 'rebind a cmux shortcut'.

    Also in 3 projects that use this

  • matyasstochSkill

    distribute-skill-to-all-agents

    Distribute a newly-created agent skill across all 4 canonical skill folders on a local machine so Claude Code, Codex/OpenAI Agents, Pi Agent, and Hermes all see it. Use whenever the user says "give this skill to all agents", "distribute this skill", "sync skills across agents", or after creating a new skill that should be globally available. Covers the .claude/skills symlink and the ~/.pi/agent/skills (NOT ~/.pi/skills) trap.

    Also in 3 projects that use this

  • manaflow-aiSkill

    cmux-workspace

    Work inside the current cmux workspace and terminal. Use for cmux workspace, current workspace, caller surface, panes, surfaces, tagged reloads, socket targeting, and non-interfering cmux automation.

    Also in 3 projects that use this

  • matyasstochSkill

    effective-agent-skills

    How to write effective agent skills — what to do, what not to do, anatomy, progressive disclosure, design patterns, anti-patterns, testing, security. Read this whenever a skill (Claude Skill, Agent Skill, SKILL.md) is being created, edited, reviewed, or debugged. Use when the user says "create a skill", "new skill", "update this skill", "improve a skill", "why isn't my skill triggering", or anything else involving authoring or editing SKILL.md files.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run cmux ping first if unsure the app is running.

    line 22
  2. Very specific:

    Use --snapshot-after on actions to get the updated page snapshot in one round-trip.

    line 90
  3. Very specific:

    Debug a flaky UI: after an action, use cmux browser console list and cmux browser errors list.

    line 120

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

cmux

cmux is a terminal multiplexer with workspaces, windows, panes, surfaces (tabs), and an integrated Playwright-style browser. You control it via the cmux CLI, which talks to a running cmux app over a Unix socket.

Binary: /Applications/cmux.app/Contents/Resources/bin/cmux (already on PATH as cmux).

Context autodiscovery

Inside a cmux-spawned terminal, these env vars are set and used as defaults:

  • CMUX_WORKSPACE_ID → default --workspace
  • CMUX_SURFACE_ID → default --surface
  • CMUX_TAB_ID → default --tab

So cmux send "ls" sends to the current surface. Pass --workspace/--surface with a UUID, short ref (workspace:2, surface:4, pane:3, window:1), or index to target elsewhere.

Run cmux ping first if unsure the app is running. Run cmux tree --all to inspect the full hierarchy.

Object model

  • window → OS window. Contains workspaces.
  • workspace → a tabbed session. Contains panes and panels.
  • pane → a split region inside a workspace. Contains surfaces.
  • surface → a single terminal or browser tab inside a pane.

Common workflows

Inspect state

cmux tree --all              # full hierarchy, all windows
cmux list-workspaces
cmux list-panes --workspace workspace:1
cmux list-pane-surfaces
cmux current-workspace

Create / open

cmux /path/to/dir                                 # open dir in new workspace
cmux new-workspace --name "api" --cwd ~/code/api --command "make start-server"
cmux new-window
cmux new-split right --workspace workspace:1      # split pane to the right
cmux new-surface --type terminal                  # new tab in current pane
cmux new-surface --type browser --url https://...

Send input & read output

cmux send "poetry install"                 # types text into current surface (no Enter)
cmux send-key Enter                        # send a specific key
cmux send --surface surface:3 "clear"
cmux read-screen                           # current visible screen
cmux read-screen --scrollback --lines 500  # include scrollback

To run a command: cmux send "…" && cmux send-key Enter.

Focus / navigation

cmux focus-pane --pane pane:2
cmux select-workspace --workspace workspace:3
cmux next-window / previous-window / last-window

Browser automation (Playwright-like)

Operates on a browser surface. If --surface is omitted, cmux targets the active browser surface in the caller's workspace.

cmux browser open https://example.com            # open browser split
cmux browser goto https://example.com --snapshot-after
cmux browser snapshot --compact                  # accessibility snapshot
cmux browser click "button#submit" --snapshot-after
cmux browser fill "input[name=q]" "hello"
cmux browser type "textarea" "some text"
cmux browser press Enter
cmux browser wait --selector ".result" --timeout-ms 5000
cmux browser get url | title | text <sel> | html <sel> | value <sel> | attr <sel> <name>
cmux browser eval "document.title"
cmux browser screenshot --out /tmp/page.png
cmux browser find role button "Submit"           # query by role/text/label/etc
cmux browser console list                        # captured console logs
cmux browser errors list
cmux browser cookies get | set | clear
cmux browser tab new | list | switch <n> | close

Use --snapshot-after on actions to get the updated page snapshot in one round-trip.

Notifications & misc

cmux notify --title "Build done" --body "OK"
cmux markdown open /path/to/file.md        # live-reload markdown viewer
cmux rename-tab "tests"
cmux close-surface --surface surface:4
cmux rpc <method> '<json-params>'          # low-level RPC; see `cmux capabilities`

Identifiers

Commands accept three forms for any window/workspace/pane/surface arg:

  1. UUID (e.g. a1b2c3…)
  2. Short ref: workspace:2, surface:4, pane:3, window:1, or tab:<n> for tab-action/rename-tab
  3. Index (integer; position in parent)

Pass --id-format uuids or --id-format both to include UUIDs in outputs when you need stable handles.

Patterns

  • Run a command in another workspace and capture output:
    cmux send --workspace workspace:2 "pytest -x" && cmux send-key --workspace workspace:2 Enter
    sleep 3
    cmux read-screen --workspace workspace:2 --scrollback --lines 200
  • Spin up a dev env: cmux new-workspace --name dev --cwd ~/proj --command "npm run dev", then cmux new-split right + cmux send "npm test -- --watch".
  • Drive a webpage: cmux browser open <url> → cmux browser snapshot --compact to see structure → interact with click/fill using selectors from the snapshot.
  • Debug a flaky UI: after an action, use cmux browser console list and cmux browser errors list.

Discovery

  • cmux help → full command list
  • cmux capabilities → JSON list of all RPC methods (for advanced cmux rpc)
  • cmux shortcuts → keyboard shortcuts reference

Gotchas

  • cmux send does NOT press Enter. Follow with cmux send-key Enter (or include \n via send-key).
  • Without CMUX_WORKSPACE_ID (i.e. not running inside cmux), you must pass --workspace explicitly.
  • Socket auth: set CMUX_SOCKET_PASSWORD or use --password if the app has a password configured.
  • Override socket path with CMUX_SOCKET_PATH if connecting to a non-default instance.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.