cmux

cmux is a skill for Claude Code, Codex from espennilsen/pi. It costs 59 tokens per session (763 once invoked), scanned A, original, MIT.

A tool for coordinating cmux terminal panes, which are separate areas for running commands and viewing output. It also includes a built-in browser for previewing web pages.

In plain words
What is it for?
Use it to split panes, start processes, read their output, send commands, close panes, launch sub-agents, and inspect browser pages.
Why use it?
It makes it easier to run development servers, tests, and helper processes at the same time without losing track of their output.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to split panes, start processes, read their output, send commands, close panes, launch sub-agents, and inspect browser pages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/espennilsen/pi/pi-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 espennilsen/pi --skill pi-cmux
Clone the repo
git clone --depth 1 https://github.com/espennilsen/pi

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/espennilsen/pi/pi-cmux.svg)](https://agentmods.dev/skills/espennilsen/pi/pi-cmux)
Your own site
<a href="https://agentmods.dev/skills/espennilsen/pi/pi-cmux"><img src="https://agentmods.dev/badge/skills/espennilsen/pi/pi-cmux.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00059 $0.00763
Opus 5 $0.00030 $0.00381
Sonnet 5 $0.00012 $0.00153
Haiku 4.5 $0.00006 $0.00076

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

Security

Grade A, and why

cmux scanned grade A with 0 findings 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 8d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (client.ts, index.ts, logger.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

extensions/pi-cmux/SKILL.md · 73 lines

How it starts

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

cmux Pane Orchestration

You have access to cmux tools for managing terminal panes. Use them to run parallel processes, monitor output, and interact with other terminals.

Available Tools

Tool Purpose
cmux_list List all surfaces (panes) and workspaces
cmux_split Split pane right or down, optionally run a command
cmux_read Read terminal output from another pane
cmux_send Send text or keystrokes to another pane
cmux_close Close a pane
cmux_notify Send desktop notification
cmux_browser Open/navigate/snapshot/click/fill/eval in built-in browser

Common Patterns

Dev server + coding workflow

1. cmux_split direction="down" command="npm run dev\n"
2. Note the surface ID from the result
3. Work on code in your main terminal (edit files, etc.)
4. cmux_read surface="surface:X" to check dev server output
5. cmux_close surface="surface:X" when done

Parallel test watching

1. cmux_split direction="right" command="npm test -- --watch\n"
2. Edit code in main pane
3. cmux_read surface="surface:X" to check test results
4. If tests fail, read the output and fix the code

Sub-agent spawning

1. cmux_split direction="right" command="pi \"Task description here\"\n"
2. Continue working on your own task
3. cmux_read surface="surface:X" to check sub-agent progress
4. cmux_close surface="surface:X" when sub-agent finishes

Web preview with browser

1. Start dev server: cmux_split direction="down" command="npm run dev\n"
2. Open browser: cmux_browser action="open" url="http://localhost:3000"
3. Get DOM: cmux_browser action="snapshot" surface="surface:X" compact=true
4. Interact: cmux_browser action="click" surface="surface:X" selector="button.submit"
5. Fill form: cmux_browser action="fill" surface="surface:X" selector="input[name=email]" value="[email protected]"

Stopping a process in another pane

1. cmux_send surface="surface:X" key="ctrl+c"
2. Wait a moment, then cmux_read to confirm it stopped

Read the full file on GitHub · 73 lines

Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 73 lines · 59 tokens per session scan A b2a434c07b1c

Subscribe to this mod's changes

cmux is a skill published in the GitHub repository espennilsen/pi (116 stars, last pushed 15d ago), licensed MIT. It adds 59 tokens to every session and 763 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.