cmux
Skill13 starsChanged 13 days agoMITView on GitHub
Optional, only for cmux users: tabs, splits, parallel agents, workplace driver, restoring lost workspaces from layout snapshots. Trigger: "new tab", "split pane", "parallel agent", "workspaces lost", "restore cmux layout". Trap: "tab" = surface, not workspace.
27 other projects use a version of this.
Adopted by
Most recently taken up by
- fsmiamoto/skillstheir own version, first seen Nov 1, 2026
- kellykampen/agent-skillstheir own version, first seen Nov 1, 2026
- davidondrej/skillstheir own version, first seen Oct 29, 2026
- EtanHey/golemstheir own version, first seen Oct 28, 2026
- jonmumm/skillstheir own version, first seen Oct 21, 2026
- ph3on1x/agent-plugins-skillstheir own version, first seen Oct 20, 2026
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-aiSkillcmux-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-coSkillcmux-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-coSkillcmux-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
matyasstochSkilldistribute-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-aiSkillcmux-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
matyasstochSkilleffective-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
Other versions27 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 27
- manaflow-ai/cmux★ 29ksame name
- basicmachines-co/basic-memory★ 4.5ksame name
- davidondrej/skills★ 4.3ksame name
- manaflow-ai/manaflow★ 1.1ksame name
- glebis/claude-skills★ 410same name
- will-ness-ai/skills★ 170same name
- matyasstoch/david-skills★ 59same name
- nikships/skills-registry★ 25same name
- attentiondotnet/davidondrej-skills★ 11same name
- matyasstoch/cmux-skill★ 10same name
17 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/board-pilot/references/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- a2aSkill
- archiveSkill
- board-pilotSkill
- bridge-auditSkill
- bridge-contributeSkill
- bridge-curatorSkill
- bridge-explorerSkill
- bridge-greetingSkill
- bridge-leak-checkSkill
- bridge-learnSkill
- bridge-onboardSkill
- bridge-overlaySkill
- bridge-promoteSkill
- bridge-statusSkill
- bridge-syncSkill
- briefingSkill
- calendarSkill
- capability-brokerSkill
- channelSkill
- cockpitSkill
- dashboardSkill
- debriefSkill
- doc-systemSkill
- github-projects-managerSkill
- html-canvasSkill
- html-slidesSkill
- knowledge-repo-initSkill
- mail-draftSkill
- mandantsSkill
- meeting-transcriptionSkill
- object-storeSkill
- onboard-simSkill
- remoteSkill
- scheduleSkill
- secretsSkill
- spec-kickoffSkill
- task-close-postmortemSkill
- tmuxSkill
- tracker-syncSkill
- workloadSkill
- workspaceSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 25 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 77
When cmux does not answer, tabs is an error, not the stale session file.
- Distinctive: line 146
Keep related work in ONE workspace and organize it with tabs and splits.
“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.
Files
cmux
Manage cmux workspaces, tabs and the agent sessions inside them from one terminal, and bring them back when cmux loses them.
Optional. Everything here needs the cmux CLI, found as $CMUX_BIN, else
cmux on PATH, else the CLI inside the macOS app bundle (not on PATH under a
service manager). Without it the skill does
nothing: the scripts exit with a clear message and the workplace driver answers an
error, which scripts/workplace.py reads as "tab view unknown", never as "no tabs
open". Nothing else in the Bridge depends on cmux.
Decision tree
User wants to...
├── open a tab / split / workspace, spawn or watch an agent, sidebar, wait-for
│ → vocabulary table below, then references/local.md
├── "workspaces lost", "which sessions were running", cmux crashed or relaunched
│ → references/sessions.md: cmux_layout.py list → show → restore
├── one tab per task, "status of all tabs", "send <tab>: ..."
│ → scripts/workplace.py (CORE plan, docs/workplace.md) with this skill as driver
├── which session runs where, or what an agent is doing right now
│ → references/sessions.md: cmux sessions --json, vault search, agent journal
├── restart the agent in every tab (after an update)
│ → references/sessions.md § Restart
└── watch or answer agents on another machine, from a laptop or phone
→ references/remote.mdThe workplace driver
scripts/workplace.py plans the day as workspaces with one agent tab per task
and knows no terminal. This skill ships the cmux side of it. Wire it in
bridge-config.yaml:
workplace:
driver: {command: ["python3", "${root}/skills/cmux/scripts/cmux_driver.py"]}Then python3 scripts/workplace.py open --yes [--here "$CMUX_SURFACE_ID"] opens
the plan in cmux, and status, send, adopt steer the tabs.
python3 scripts/workplace.py launch --items A,B --yes [--here "$CMUX_SURFACE_ID"]
[--target tab|workspace|area|auto] opens one tab per chosen task or inbox item
(docs/workplace.md § Launching chosen items). What the driver guarantees:
- It never closes a tab or a workspace on its own, only
closeandclose_workspaceon a person's request, and never moves the last tab out of a workspace (cmux drops an emptied workspace); such a tab is renamed where it is and the report says so. new_tabandnew_workspaceopen a tab or a workspace without taking the focus and answer the new refs (ref,ws_ref) for a page that wants to open them. No command is a plain shell; a command goes the waylaunchsends it, with the start marker awaited.close_workspacenever closes the last workspace of a window.- It sees every window (
tree --all), so a workspace in a second window is reused, not created twice. launchopens in the calling tab's workspace (here, else the tree's caller) and refuses when neither is known; it never falls back to the selected workspace. Withtarget: areait finds the area's workspace by name or alias across windows and creates a missing one once.- The tree is read with
--id-format both(refs and UUIDs), sotabscan mark the tab the caller runs in (is_self, fromCMUX_SURFACE_ID). Verified on cmux 0.65.0. - A call cmux refuses (exit 1,
Error: ...) is an ERROR line or a driver error, never a success line. When the workspaces cannot be read,opendoes nothing. closepassesclose-surface --force, since cmux refuses a tab with a live process otherwise and a waiting agent is one. The flag needs cmux 0.65 or later.- When cmux does not answer,
tabsis an error, not the stale session file. - A tab's state comes from cmux's hook file first (any tab it lists runs an agent); the title glyph is only a fallback, since a renamed tab loses it.
--here "$CMUX_SURFACE_ID"works: the UUID is mapped to the tree'ssurface:Nthrough the tree's caller. A tab that cannot be found is reported and not moved.- A workspace created only to receive moved tabs keeps its starting shell tab: cmux cannot create a workspace around an existing tab, and the driver never closes one.
- Live socket refs (
surface:91) and session-file ids (UUIDs) never match, so tabs are joined by workspace and title without its status glyph. - A newly created control workspace starts
workplace.control.commandwhen set (for example{name: Control, command: "claude -n control"}) and not opened with--here; otherwise it is a plain shell.
First move after a loss
python3 skills/cmux/scripts/cmux_layout.py list. A drop in the workspace or
agent count between two lines is the loss; restore <n> shows what is missing,
--apply (from a cmux tab) rebuilds it. Snapshots exist only if something takes
them: declare a workload (workflow/workloads/) that runs
cmux_layout.py snapshot every few minutes. Snapshots keep each workspace's
color and description.
Rule: agent sessions start in the Bridge root
A tab that starts an agent opens in the Bridge repo root, the only place where it
loads AGENTS.md, the registries and the skills. spawn-workspace.sh and
cmux_layout.py default to it. Raw cmux new-surface / new-split inherit the
pane's directory, so prefix the command with cd <bridge root> && .... Pass
another --cwd only when the work deliberately lives in a foreign repo (its own
agent instructions then apply).
Rule: resolve the target workspace first, then open
cmux new-surface, cmux browser open and new-split without --workspace fall
back to $CMUX_WORKSPACE_ID, which can be stale after a restore or a moved
session, or to the selected workspace. The MCP browser (browser_open) has no
target parameter at all. Go through the wrapper:
skills/cmux/scripts/cmux-open.sh where # target, caller, selected workspace
skills/cmux/scripts/cmux-open.sh tab --name helper -- "cd <bridge root> && claude ..."
skills/cmux/scripts/cmux-open.sh browser https://example.com
skills/cmux/scripts/cmux-open.sh tab --workspace Platform # a name or workspace:NThe wrapper takes the caller's workspace (live from cmux identify, not the
selected one), passes it explicitly, verifies with list-pane-surfaces that the
surface landed there and moves it otherwise. A long, multi-line or non-ASCII command (a
claude prompt) is never typed raw: a shell that is still starting keeps only 1024
bytes of a line and drops the rest with the Enter, so the wrapper writes it to a
private launcher file and types /bin/sh '<file>'. Use --workspace only when the user
names another destination. For browser work via MCP, call cmux-open.sh browser
<url> first and continue with the returned surface.
User vocabulary → cmux primitives (read this first)
| User says | cmux primitive | Command |
| "tab", "new tab", "tab next to it" | Surface (tab in the current pane) | cmux new-surface |
| "workspace", "new window", "own window" | Workspace (top-level, sidebar entry) | cmux new-workspace or spawn-workspace.sh |
| "split", "pane", "side by side" | Pane (split inside a workspace) | cmux new-split <direction> or cmux new-pane |
Default: "tab" almost always means a surface in the current workspace, not a new workspace. A workspace where a tab was asked for is an extra window the user has to manage. If the request is ambiguous, ask once: tab in this workspace, or its own workspace?
Keep related work in ONE workspace and organize it with tabs and splits; open a new workspace only when the user says so or the work is unrelated to the current workspace's topic.
Starting an agent in a new tab (the common case):
NEW_SURFACE=$(skills/cmux/scripts/cmux-open.sh tab | grep -oE 'surface:[0-9]+')
cat > "$TMPDIR/agent-prompt.txt" <<'PROMPT'
... the full prompt ...
PROMPT
cmux send --surface "$NEW_SURFACE" "cd <bridge root> && claude \"\$(cat $TMPDIR/agent-prompt.txt)\""
cmux send-key --surface "$NEW_SURFACE" enter
cmux rename-tab --surface "$NEW_SURFACE" "agent-name"Where the rest lives
| File | Contents |
references/local.md | quick reference, spawning agents, splits, sidebar, notifications, wait-for, observe protocol, tab management, settings, browser limits, environment, socket API, traps |
references/sessions.md | layout snapshots and restore, loss alarm, what cmux and Claude Code already do natively, restart across all tabs |
references/remote.md | socket modes, steering agents on another machine |
scripts/cmux_driver.py | the workplace driver (JSON protocol: tabs, sessions, open, launch, send, rename, and the optional verbs in its caps: rename_workspace, move_tab, set_color, set_description among them) |
scripts/cmux_layout.py | snapshot / list / show / restore |
scripts/cmux-open.sh | tab / browser / split in a verified target workspace |
scripts/spawn-workspace.sh | named workspace with an agent, prompt via file, verified start |
scripts/cmux-claude-restart.sh | stop / start the agent across all tabs |
tests/ | run against a fake cmux, never the real one |
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
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.

