← Back to Skills Marketplace
cnwangjie

Cmux

by WangJie · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
247
Downloads
1
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install cmux
Description
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...
README (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"
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cmux
  3. After installation, invoke the skill by name or use /cmux
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug cmux
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 247 downloads so far.

How do I install Cmux?

Run "/install cmux" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cmux free?

Yes, Cmux is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cmux support?

Cmux is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cmux?

It is built and maintained by WangJie (@cnwangjie); the current version is v1.0.0.

💬 Comments