cmux

cmux is a command for Claude Code from bvdr/claude-plugins. It costs 70 tokens per session (2,781 once invoked), scanned A, original, MIT.

A command tool for the cmux macOS terminal app, using its command-line interface to manage workspaces.

In plain words
What is it for?
Saving and restoring workspace sessions, listing workspaces, renaming or closing them, reviewing cleanup choices, and applying colors from a local rule file.
Why use it?
It avoids repeating workspace setup and makes it easier to keep terminal sessions organized. It can also save a workspace layout so it can be restored later.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the bvdr plugin — 13 commands shipped together

Good fit Saving and restoring workspace sessions, listing workspaces, renaming or closing them, reviewing cleanup choices, and applying colors from a local rule file.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/bvdr/claude-plugins/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.

Clone the repo
git clone --depth 1 https://github.com/bvdr/claude-plugins

Made for: Claude Code.

Or install bvdr, the plugin that ships this one along with the rest of its 13 commands.

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/commands/bvdr/claude-plugins/cmux/github.svg)](https://agentmods.dev/commands/bvdr/claude-plugins/cmux)
Your own site
<a href="https://agentmods.dev/commands/bvdr/claude-plugins/cmux"><img src="https://agentmods.dev/badge/commands/bvdr/claude-plugins/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/commands/bvdr/claude-plugins/cmux"><img src="https://agentmods.dev/badge/commands/bvdr/claude-plugins/cmux.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,781 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00070 $0.02781
Opus 5.5 $0.00028 $0.01112
Sonnet 5.5 $0.00014 $0.00556
Haiku 4.5 $0.00007 $0.00278

Measured 1mo ago against content hash 4c7e8c96befb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cmux scanned grade A 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

out = subprocess.run([cmux] + args, capture_output=True, text=True)
plugins/bvdr/commands/cmux.md · 219 lines

How it starts

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

cmux

Drives the cmux macOS terminal (cmux.app) over its Unix-socket CLI to save / restore / clean / recolor workspaces.

Usage

Subcommands (parse from user's message):

Subcommand What it does
save [path] Dump every workspace in the current cmux window to a portable JSON. Default path: ~/cmux-sessions/<UTC timestamp>.json.
restore <path> Recreate workspaces from a JSON saved by save. Skips ones already present (matched by name).
apply-colors Color every workspace based on the user's local rule file (~/.config/cmux-skill/colors.json). Idempotent. No-op (with hint) if the file is missing.
rename <ws> <new-name> Rename a single workspace (workspace ref like workspace:5 or current name).
cleanup Walk every workspace and ask the user (one prompt per workspace) whether to keep / rename / close.
list Pretty-print current workspaces with their colors and CWD.

If the user just says "cmux" with no subcommand, ask which one. Don't guess.

Pre-flight (run once per session, not per subcommand)

  1. Locate the binary. Try command -v cmux; if missing, fall back to /Applications/cmux.app/Contents/Resources/bin/cmux. Cache this in a shell var CMUX=. If neither exists, tell the user cmux isn't installed and stop.
  2. Verify daemon. Run "$CMUX" ping. If it returns "Broken pipe (errno 32)", the cmux app's socketControlMode is cmuxOnly — external CLI control is blocked. Tell the user:

    Add "automation": { "socketControlMode": "automation" } to ~/.config/cmux/cmux.json (back the file up first), then restart cmux. (Reload via cmux reload-config doesn't help here because reload itself goes through the same socket.) Then stop. Don't auto-edit the config without explicit consent — it relaxes a security boundary.

Color mapping

Color rules live outside this repo in ~/.config/cmux-skill/colors.json. The file is intentionally not shipped — project names are personal context. Format:

Read the full file on GitHub · 219 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. 1mo ago First seen · 219 lines · 70 tokens per session scan A 4c7e8c96befb

Subscribe to this mod's changes

cmux is a command published in the GitHub repository bvdr/claude-plugins (4 stars, last pushed 4mo ago), licensed MIT. It adds 70 tokens to every session and 2,781 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.