Token导航 LogoToken导航

Agent Skill · 前端设计

cmux(cmux 控制)

cmux 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cmux 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 9,526。

总安装 212周安装 9GitHub Stars 81下载 74核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cmux(cmux 控制)
来源仓库:https://github.com/dagster-io/erk
仓库路径:skills/cmux
安装命令:
npx skills add https://github.com/dagster-io/erk --skill cmux
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dagster-io/erk --skill cmux

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

cmux 是一个原生 macOS 终端多路复用器应用,支持工作区、面板分割及 GPU 加速渲染。适用于需要在终端内管理多个会话、窗口或浏览器实例的场景,尤其适合开发调试环境。通过 Unix 域套接字 /tmp/cmux.sock 与 CLI 通信,提供类似 tmux 但更现代化的交互体验。

安装前请确认是否为 macOS 环境,并检查是否有权限访问临时目录及运行 Swift 应用。该技能主要面向本地终端使用,不涉及远程 API 调用或网络请求。

来源仓库内路径:skills/cmux

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dagster-io/erk --skill cmux;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cmux 怎么安装?

在终端执行 npx skills add https://github.com/dagster-io/erk --skill cmux。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cmux 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cmux 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

cmux 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cmux 用的人多吗?

公开数据是累计安装 212 次,近一周安装 9 次,下载 74 次,GitHub 81 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cmux 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
cmux

cmux 控制 · 本页

21281接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

cmux - Terminal Multiplexer

Overview

cmux is a native macOS terminal application (Swift/AppKit) that provides terminal multiplexing with workspaces, panes, and splits. It uses Ghostty's rendering engine (libghostty) for GPU-accelerated terminal output. The CLI communicates with the running app via a Unix domain socket at /tmp/cmux.sock.

Think of cmux as "tmux reimagined as a native macOS app" -- it has workspaces (like tmux windows), panes (like tmux panes), and surfaces (individual terminal or browser instances within panes), all controllable via a rich CLI.

When to Load the Reference

This skill covers the mental model, common commands, gotchas, and erk integration. Load references/cmux-reference.md when you need:

  • Browser automation syntax (40+ subcommands: navigation, forms, cookies, storage, console, waiting, dialogs, downloads, state)
  • Window management (list-windows, new-window, focus-window, close-window, move-workspace-to-window)
  • Surface management (move-surface, reorder-surface, drag-surface-to-split, surface-health)
  • Panel/Tab commands (list-panels, focus-panel, tab-action, rename-tab)
  • Sidebar metadata (clear-status, list-status, clear-progress, clear-log, list-log, sidebar-state)
  • Full tmux compat (20+ commands: pipe-pane, wait-for, copy-mode, set-hook, bind-key, popup, etc.)
  • Utility/diagnostic (ping, capabilities, claude-hook, set-app-focus)
  • Workflow recipes (browser automation, layout scripting, notification workflows)

Core Concepts

Object Hierarchy

Window (top-level OS window)
  +-- Workspace (vertical tab, like a tmux window)
        +-- Pane (a split region)
              +-- Surface (terminal or browser instance)
  • Window: macOS application window. Multiple windows supported.
  • Workspace: A tab in the sidebar. Contains one or more panes.
  • Pane: A split region within a workspace. Can be split left/right/up/down.
  • Surface: An actual terminal or browser instance inside a pane.

Addressing / Refs

Objects are referenced by UUID (A1B2C3D4-...), short ref (workspace:1, pane:2, surface:3), or numeric index (0, 1). Use --id-format refs|uuids|both to control output format.

Environment Variables

cmux sets these inside managed terminals: CMUX_WORKSPACE_ID (current workspace UUID, used as default for --workspace), CMUX_SURFACE_ID, CMUX_TAB_ID, CMUX_SOCKET_PATH (default: /tmp/cmux.sock).

Socket Communication

Unix domain socket at /tmp/cmux.sock. V2 API uses newline-delimited JSON. CLI wraps socket calls into user-friendly commands.

Quick Command Reference

Global Flags

--socket PATH              Override socket path (default: /tmp/cmux.sock)
--window WINDOW            Target specific window
--password PASSWORD        Socket auth password
--json                     Output as JSON
--id-format refs|uuids|both  Control ID format
--version, -v              Show version
--help, -h                 Show help

Workspace Commands

CommandDescription
new-workspace [--command <text>]Create workspace (auto-appends \n). Returns OK <uuid>
list-workspacesList all workspaces
select-workspace --workspace <ref>Switch to workspace
rename-workspace [--workspace <ref>] <title>Rename workspace
close-workspace --workspace <ref>Close workspace
current-workspacePrint current workspace ID

Pane and Input Commands

CommandDescription
`new-split <left\right\up\down> [--workspace <ref>]`Split pane
`new-surface [--type <terminal\browser>] [--pane <ref>]`Add surface
list-panes [--workspace <ref>]List panes
focus-pane --pane <ref>Focus pane
close-surface [--surface <ref>]Close surface
send [--workspace <ref>] [--surface <ref>] <text>Send text (must include \n)
send-key [--workspace <ref>] [--surface <ref>] <key>Send keystroke
read-screen [--workspace <ref>] [--surface <ref>] [--scrollback] [--lines <n>]Read terminal content

Notification / Status Commands

CommandDescription
notify --title <text> [--subtitle <text>] [--body <text>]Send notification
set-status <key> <value> [--icon <name>] [--color <hex>]Set sidebar status
set-progress <0.0-1.0> [--label <text>]Set progress bar
log [--level <level>] [--source <name>] <message>Add log entry

Browser Subsystem (Summary)

The browser subsystem has 40+ commands for full web automation. Key categories:

  • Navigation: browser open, browser navigate/goto, browser back/forward/reload
  • Interaction: browser click, browser fill, browser type, browser select, browser press
  • Inspection: browser snapshot [--interactive], browser eval <js>, browser get, browser is
  • Waiting: browser wait --selector|--text|--url-contains|--function [--timeout-ms]
  • --snapshot-after flag: Most interaction commands accept this flag to automatically capture a snapshot after the action

Load references/cmux-reference.md for full browser command syntax.

Key Commands Not in Quick Reference

These are documented in the reference file:

  • wait-for <channel> -- Inter-process synchronization (tmux compat)
  • claude-hook <event> -- Claude Code integration hook
  • pipe-pane -- Pipe pane output to external command
  • popup -- Show popup overlay
  • set-hook / bind-key / unbind-key -- Hook and key binding management

Critical Gotchas

--command auto-appends newline

cmux new-workspace --command 'echo hello' automatically appends \n, so the command executes immediately. Do NOT add your own \n.

send requires explicit \n

Unlike --command, cmux send does NOT auto-append a newline. You must include it:

# WRONG - text is typed but not executed
cmux send --workspace "$WS" "echo hello"

# CORRECT - command executes
cmux send --workspace "$WS" $'echo hello\n'

Output format: OK <uuid>

cmux new-workspace returns OK <uuid>. Extract the workspace ID:

WS=$(cmux new-workspace | awk '{print $2}')

Shell quoting with --command

Use single quotes to prevent outer shell expansion of $():

# CORRECT - subshell runs inside workspace
cmux new-workspace --command 'source <(erk slot teleport 456 --new-slot --script --sync)'

# WRONG - subshell expands in current shell
cmux new-workspace --command "source <(erk slot teleport 456 --new-slot --script --sync)"

No --working-directory CLI flag

The CLI does not expose a working directory flag. Workaround:

cmux new-workspace --command 'cd /path/to/project'

Startup delay

There is a ~0.5s internal delay after workspace creation before commands are sent, to allow the shell to initialize. Keep this in mind when chaining commands.

Workspace names are just labels

cmux knows nothing about git branches. Branch names used as workspace titles via rename-workspace are purely cosmetic labels for human navigation.

Erk Integration

Configuration

cmux integration is gated on a global config flag:

# ~/.erk/config.toml
cmux_integration = true

Check/set via CLI:

erk config get cmux_integration
erk config set cmux_integration true

erk exec cmux-open-pr

Creates a cmux workspace that opens a PR with checkout or teleport mode:

erk exec cmux-open-pr --pr 8152
erk exec cmux-open-pr --pr 8152 --branch "my-branch"
erk exec cmux-open-pr --pr 8152 --mode teleport

What it does:

  1. Auto-detects PR head branch via gh pr view --json headRefName (if --branch omitted)
  2. Creates workspace with:

- checkout mode (default): source <(erk pr checkout <pr> --script) - teleport mode: source <(erk slot teleport <pr> --new-slot --script --sync)

  1. Renames workspace to the branch name
  2. Outputs JSON: {"success": true, "pr_number": N, "branch": "...", "workspace_name": "..."}

TUI Dashboard Commands

When cmux_integration is enabled, the erk dash TUI command palette exposes:

  • cmux checkout (action) -- Creates a cmux workspace for the selected plan's PR
  • copy cmux checkout (copy) -- Copies the cmux open command to clipboard

Both require a plan with pr_number and pr_head_branch.

Common Scripting Patterns

# Create workspace and run command
WS=$(cmux new-workspace --command 'cd ~/code/myproject && make build' | awk '{print $2}')
cmux rename-workspace --workspace "$WS" "build"

# Create workspace, then send commands separately
WS=$(cmux new-workspace | awk '{print $2}')
cmux send --workspace "$WS" $'cd ~/code/myproject\n'
cmux send --workspace "$WS" $'make test\n'

# Read terminal output
cmux read-screen --workspace "$WS" --lines 50
cmux read-screen --workspace "$WS" --scrollback

# Split workspace layout
WS=$(cmux new-workspace --command 'cd ~/code/project' | awk '{print $2}')
cmux new-split right --workspace "$WS"

# JSON output for scripting
cmux --json list-workspaces
cmux select-workspace --workspace workspace:0

Troubleshooting

IssueCauseFix
Connection refusedcmux app not runningLaunch cmux.app
Socket not foundWrong socket pathCheck /tmp/cmux.sock exists
Command typed but not executedMissing \n in sendUse $'command\n'
Wrong workspace targetedNo --workspace flagUse $CMUX_WORKSPACE_ID or explicit ref
--command text expanded too earlyDouble quotes around $()Use single quotes

平台分布

Codex

37.22%
按下载量换算28

Claude

30.09%
按下载量换算22

Cursor

20.15%
按下载量换算15

Gemini CLI

10.12%
按下载量换算7

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills