← 返回 Skills 市场
247
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install cmux
功能描述
Control cmux terminal multiplexer via its Unix socket API. Use when needing to: (1) List, create, select, or close workspaces; (2) Split panes and manage sur...
使用说明 (SKILL.md)
cmux
Control cmux terminal multiplexer programmatically via its Unix socket API or CLI.
Socket Connection
SOCKET_PATH="${CMUX_SOCKET_PATH:-/tmp/cmux.sock}"
Send JSON-RPC requests:
{"id":"req-1","method":"workspace.list","params":{}}
CLI Quick Reference
# Output as JSON
cmux --json \x3Ccommand>
# Target specific workspace/surface
cmux --workspace \x3Cid> --surface \x3Cid> \x3Ccommand>
Workspace
| Action | CLI | Socket Method |
|---|---|---|
| List all | cmux list-workspaces |
workspace.list |
| Create new | cmux new-workspace |
workspace.create |
| Select | cmux select-workspace --workspace \x3Cid> |
workspace.select |
| Get current | cmux current-workspace |
workspace.current |
| Close | cmux close-workspace --workspace \x3Cid> |
workspace.close |
Splits & Surfaces
| Action | CLI | Socket Method |
|---|---|---|
| New split | cmux new-split \x3Cdirection> |
surface.split (direction: left/right/up/down) |
| List surfaces | cmux list-surfaces |
surface.list |
| Focus surface | cmux focus-surface --surface \x3Cid> |
surface.focus |
Input
| Action | CLI | Socket Method |
|---|---|---|
| Send text | cmux send "echo hello" |
surface.send_text |
| Send key | cmux send-key enter |
surface.send_key |
| Send to surface | cmux send-surface --surface \x3Cid> "cmd" |
surface.send_text (with surface_id) |
Keys: enter, tab, escape, backspace, delete, up, down, left, right
Notifications
cmux notify --title "Title" --body "Body"
# Socket: notification.create
Sidebar Metadata
| Action | CLI | Socket Method |
|---|---|---|
| Set status | cmux set-status \x3Ckey> \x3Cvalue> |
(socket only) |
| Clear status | cmux clear-status \x3Ckey> |
(socket only) |
| Set progress | cmux set-progress 0.5 --label "Building..." |
(socket only) |
| Clear progress | cmux clear-progress |
(socket only) |
| Log entry | cmux log "message" --level error |
(socket only) |
| Clear log | cmux clear-log |
(socket only) |
System
| Action | CLI | Socket Method |
|---|---|---|
| Ping | cmux ping |
system.ping |
| Capabilities | cmux capabilities |
system.capabilities |
| Identify context | cmux identify |
system.identify |
Python Client
import json
import os
import socket
SOCKET_PATH = os.environ.get("CMUX_SOCKET_PATH", "/tmp/cmux.sock")
def rpc(method, params=None, req_id=1):
payload = {"id": req_id, "method": method, "params": params or {}}
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock:
sock.connect(SOCKET_PATH)
sock.sendall(json.dumps(payload).encode("utf-8") + b"\
")
return json.loads(sock.recv(65536).decode("utf-8"))
# List workspaces
print(rpc("workspace.list", req_id="ws"))
# Send notification
print(rpc("notification.create", {"title": "Hello", "body": "From Python!"}))
Shell Helper
cmux_cmd() {
SOCK="${CMUX_SOCKET_PATH:-/tmp/cmux.sock}"
printf "%s\
" "$1" | nc -U "$SOCK"
}
cmux_cmd '{"id":"ws","method":"workspace.list","params":{}}'
Check if cmux is Available
[ -S "${CMUX_SOCKET_PATH:-/tmp/cmux.sock}" ] && echo "cmux socket available"
command -v cmux &>/dev/null && echo "cmux CLI available"
安全使用建议
This skill is coherent and does what it claims: it connects to a local cmux Unix socket or invokes the cmux CLI to list workspaces, split panes, and send text/keys. Important considerations before installing: (1) This gives the agent the ability to inject keystrokes and text into terminal sessions—treat that as equivalent to the ability to run shell commands in those terminals. (2) Only install on machines and accounts you trust; ensure the cmux socket has appropriate filesystem permissions and that CMUX_SOCKET_PATH points to the intended socket. (3) If you want to prevent accidental command execution, require manual confirmation before the agent issues surface.send_text or send_key calls, or disable autonomous invocation for this skill. (4) Review the small included script (scripts/cmux_client.py) if you have local security policies — it simply wraps the socket JSON-RPC calls described in SKILL.md.
功能分析
Type: OpenClaw Skill
Name: cmux
Version: 1.0.0
The cmux skill bundle provides a standard interface for controlling a terminal multiplexer via a Unix socket (/tmp/cmux.sock) or CLI. The SKILL.md and scripts/cmux_client.py files contain legitimate logic for managing workspaces, panes, and terminal input without any signs of data exfiltration, malicious execution, or prompt injection. The capabilities are consistent with the stated purpose of terminal multiplexing.
能力评估
Purpose & Capability
Name/description match the actions in SKILL.md and the included Python helper: all operations target the cmux Unix socket (/tmp/cmux.sock) or the cmux CLI. No unrelated binaries, services, or credentials are required.
Instruction Scope
Instructions are narrowly scoped to sending JSON-RPC to the cmux socket or calling the cmux CLI. Be aware that the skill explicitly lets the agent send arbitrary text and key presses to terminal surfaces (i.e., it can inject commands into shells). This is expected for a terminal multiplexer controller but is powerful—use caution with untrusted inputs or autonomous agent actions.
Install Mechanism
No install spec — instruction-only plus a small helper script. Nothing is downloaded or written by an installer, and the included Python code is straightforward and matches the documented behavior.
Credentials
No required environment variables or credentials beyond an optional CMUX_SOCKET_PATH (default /tmp/cmux.sock). The env var is appropriate for the stated purpose and nothing else is accessed.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system config. However, it permits the agent to send input to local terminal sessions; since model invocation is allowed (the platform default), consider whether you want the agent to be able to autonomously send commands to terminals without explicit user confirmation.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cmux - 安装完成后,直接呼叫该 Skill 的名称或使用
/cmux触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of cmux skill.
- Control cmux terminal multiplexer via Unix socket API or CLI.
- Manage workspaces: list, create, select, close, and query.
- Split panes, list and focus surfaces, and send input (text or keys).
- Create notifications and update sidebar metadata (status, progress, logs).
- Query system state and capabilities.
- Includes usage examples for CLI, Python, and shell scripting.
元数据
常见问题
Cmux 是什么?
Control cmux terminal multiplexer via its Unix socket API. Use when needing to: (1) List, create, select, or close workspaces; (2) Split panes and manage sur... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 247 次。
如何安装 Cmux?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cmux」即可一键安装,无需额外配置。
Cmux 是免费的吗?
是的,Cmux 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Cmux 支持哪些平台?
Cmux 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Cmux?
由 WangJie(@cnwangjie)开发并维护,当前版本 v1.0.0。
推荐 Skills