cmux

cmux is a skill for Claude Code, Codex from attentiondotnet/davidondrej-skills. It costs 183 tokens per session (3,625 once invoked), scanned B, a copy of cmux, MIT.

A control guide for cmux, a macOS terminal app that lets you run several coding agents in parallel. It covers windows, workspaces, panes, terminal tabs, and browser tabs through cmux's command line and local API.

In plain words
What is it for?
Use it to list, inspect, create, close, or control cmux workspaces, panes, and surfaces, and to read terminal or browser output.
Why use it?
It helps an agent address the correct terminal area and avoid silently reading or controlling the wrong one. It also explains cmux's identifiers and layout so parallel work can be monitored safely.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions Codex; mentions OpenCode.

Good fit Use it to list, inspect, create, close, or control cmux workspaces, panes, and surfaces, and to read terminal or browser output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/attentiondotnet/davidondrej-skills/cmux
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add attentiondotnet/davidondrej-skills --skill cmux
Clone the repo
git clone --depth 1 https://github.com/attentiondotnet/davidondrej-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cmux

README.md
[![agentmods](https://agentmods.dev/badge/skills/attentiondotnet/davidondrej-skills/cmux/github.svg)](https://agentmods.dev/skills/attentiondotnet/davidondrej-skills/cmux)
Your own site
<a href="https://agentmods.dev/skills/attentiondotnet/davidondrej-skills/cmux"><img src="https://agentmods.dev/badge/skills/attentiondotnet/davidondrej-skills/cmux/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cmux

Your own site · 80×15
<a href="https://agentmods.dev/skills/attentiondotnet/davidondrej-skills/cmux"><img src="https://agentmods.dev/badge/skills/attentiondotnet/davidondrej-skills/cmux.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,625 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00183 $0.03625
Opus 5 $0.00092 $0.01813
Sonnet 5 $0.00037 $0.00725
Haiku 4.5 $0.00018 $0.00363

Measured 11d ago against content hash a9da635dd08f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

cmux scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo ln -sf /Applications/cmux.app/Contents/Resources/bin/cmux /usr/local/bin/cmux
Origin

This is a copy

86% identical to cmux — 21 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/agent-orchestration/cmux/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cmux Control

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 46 means "the surface at index 46" (usually nonexistent → silent failure), NOT surface:46.
  • read-screen and capture-pane have NO --pane flag — they target --workspace or --surface only. Passing --pane errors, 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 with cmux list-pane-surfaces --pane pane:N, then cmux read-screen --surface surface:N.
  • Never append 2>/dev/null to 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

Read the full file on GitHub · 230 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 230 lines · 183 tokens per session scan B a9da635dd08f

Subscribe to this mod's changes

cmux is a skill published in the GitHub repository attentiondotnet/davidondrej-skills (11 stars, last pushed 2mo ago), licensed MIT. It adds 183 tokens to every session and 3,625 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). It is 86% identical to cmux, differing in 21 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens