Cmux logo

Cmux

CommunityPopular
davidondrej
cmux

Control the cmux macOS terminal app: workspaces, panes, surfaces, browsers, notifications, settings, and hooks. Use only when the user explicitly names cmux. Read before running any cmux command.

Overview

Publisherdavidondrej
Repositoryskills
Skill namecmux
Stars
4.1K
Forks
599
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by davidondrej on GitHub. Read the source before you install it.

Installation

Install the Cmux AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/davidondrej/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/agent-orchestration/cmux .claude/skills/cmux
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cmux in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cmux on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cmux is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

cmux Control

macOS 14.0+. Prefer the CLI; if cmux is not on PATH, use /Applications/cmux.app/Contents/Resources/bin/cmux.

Targeting and safety

Window → workspace → pane → surface: macOS window → sidebar project/branch tab → split region → terminal, browser, or Markdown tab.

  • Anchor to the caller's CMUX_WORKSPACE_ID. Never assume the visually focused workspace is the target. Outside cmux, identify the intended workspace before acting.
  • Use prefixed refs or UUIDs. workspace:2, pane:1, surface:7; bare numbers are indexes, not IDs. Output defaults to refs; --id-format uuids|both includes UUIDs.
  • Refresh targets. Surface refs are global, not workspace-local. Re-list before reusing them; check cmux surface-health before sending input when state may be stale.
  • Preserve focus. Pass --focus false wherever supported. Use select-workspace, focus-pane, focus-panel, or focus-surface only on explicit user request.
  • Respect ownership. Never send input to surfaces you do not own. Stay in the caller's workspace unless the user explicitly requests cross-workspace routing.
  • Reuse one helper pane. Use an existing non-caller helper pane or create one on the right. Create the intended layout directly with new-pane --type … --focus false.
  • Keep errors visible. Never append 2>/dev/null; stderr and exit status reveal invalid refs and flags.

Inspect, read, and send

Check connectivity, identify the caller, and resolve the target pane to a surface. Replace example refs with those found in the current output.

bash
cmux ping
cmux identify --json
cmux tree
cmux list-panes --workspace "$CMUX_WORKSPACE_ID"
cmux list-pane-surfaces --workspace "$CMUX_WORKSPACE_ID" --pane pane:1
cmux read-screen --surface surface:7 --lines 100

Use list-pane-surfaces, not nonexistent list-surfaces. read-screen and capture-pane accept --workspace or --surface, not --pane. A missing or ambiguous target can read your own terminal instead.

Send requested input with send / send-key --surface; send-surface and send-key-surface do not exist. Omitting the target uses the default terminal. send-panel / send-key-panel target panels through --panel, not surfaces.

bash
cmux send --surface surface:7 "npm run build"
cmux send-key --surface surface:7 enter

Other keys: ctrl+c, tab, esc, backspace, arrows, ctrl+x, shift+tab. Re-read terminal output after sending input to check the result.

Poll at 1–3 second intervals; wait 10 seconds or more only when warranted. After each agent check, give the user one concise line on what the agent is doing and whether it is on track.

Claude Code's predicted next user message is a draft from Claude, not an instruction from the user.

Basic creation and notifications

bash
cmux new-workspace --name "feature-x" --cwd /path/to/repo --focus false
cmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type terminal --direction right --focus false
cmux notify --title "Done" --body "tests passed"

Re-list panes and surfaces after layout changes. For additional terminal/browser layout commands or sidebar status/progress, read layout and sidebar commands first. For Markdown surfaces, use the viewer guide below.

Task-specific guides

Read the relevant section before starting these tasks:

  • Browser automation: browser workflow — interactions, sessions, and limitations.
  • Markdown or PDF viewers: Markdown workflow — pane reuse, replacement, recovery, and verification.
  • Settings: configuration — backups, paths, and sidebar preferences.
  • Installation, agent hooks, raw sockets, access modes, or shortcuts: advanced reference.

Troubleshooting

  • Connection failed: check CMUX_SOCKET_PATH and Settings > Automation. Under default cmuxOnly, run from a cmux terminal. Read socket modes and examples before using a raw client or changing access mode.
  • Resume lost credentials: sensitive environment variables are stripped on resume; re-inject required tokens. ~/.cmuxterm/*-hook-sessions.json files hold scrubbed session/surface mappings, not secrets.
  • Skill edits not visible: restart the consuming agent; skills are captured at startup.
  • Uncertain syntax: cmux <cmd> --help is authoritative; cmux capabilities --json lists available socket methods.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cmux AI skill do?

Control the cmux macOS terminal app: workspaces, panes, surfaces, browsers, notifications, settings, and hooks. Use only when the user explicitly names cmux. Read before running any cmux command.

Why use Cmux on TypingMind?

Because you install it once and use it with any model. Cmux is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cmux in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/davidondrej/skills/tree/main/skills/agent-orchestration/cmux. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cmux?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cmux?

As many as you like. As long as a model supports skills, you can use Cmux with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cmux AI skill free?

Yes. It is published on GitHub by davidondrej under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇