Logo: Claw Mux

Claw Mux

Communautéit
LeeJuOh
claw-mux

Control cmux terminal topology and I/O — send commands to panes, read output, split layouts, monitor logs, orchestrate multi-pane workflows. Requires cmux environment.

Iwwersiicht

EditeurLeeJuOh
Repositoryclaude-code-zero
Skill-Nummclaw-mux
Stären
53
Forks
4
Matgeliwwert Dateien
8
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 8 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    LeeJuOh huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Claw Mux an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/LeeJuOh/claude-code-zero/tree/main/plugins/claw-mux/skills/claw-mux
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LeeJuOh/claude-code-zero.git /tmp/claude-code-zero
mkdir -p .claude/skills
cp -r /tmp/claude-code-zero/plugins/claw-mux/skills/claw-mux .claude/skills/claw-mux
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Claw Mux an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Claw Mux automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Claw Mux net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

cmux Core Control

Use this skill to control cmux topology, terminal I/O (send commands to other panes and read output), notifications, and sidebar metadata.

Environment Detection

cmux sets $CMUX_WORKSPACE_ID and $CMUX_SURFACE_ID in every terminal it spawns. Check before using cmux commands:

bash
if [ -z "$CMUX_WORKSPACE_ID" ]; then
  echo "Not running inside cmux — cmux commands unavailable"
fi

If not in cmux, fall back to standard tools (no pane splitting, no cmux notifications).

Core Concepts

  • Window: Top-level macOS cmux window.
  • Workspace: Tab-like group within a window (sidebar entry).
  • Pane: Split container in a workspace.
  • Surface: A tab within a pane (terminal or browser panel).

Hierarchy: Window > Workspace > Pane > Surface

Default output uses short refs: window:N, workspace:N, pane:N, surface:N. UUIDs are still accepted as inputs. Request UUID output only when needed: --id-format uuids|both.

Fast Start

Topology

bash
# Always identify first — short refs (pane:1, surface:N) are session-scoped
cmux identify --json                                          # current caller context
cmux list-workspaces                                          # list workspaces
cmux list-panes                                               # list panes in workspace
cmux list-pane-surfaces --pane pane:1                          # list surfaces in pane
cmux new-workspace                                            # create workspace
cmux new-split right                                           # split current surface to the right
cmux move-surface --surface surface:7 --pane pane:2            # move surface between panes
cmux trigger-flash --surface surface:7                         # visual flash

Terminal I/O (send commands to other panes, read output)

bash
cmux send --surface surface:N "echo hello\n"                   # send text + Enter (\n = Enter)
cmux send --surface surface:N "npm start\n"                    # run a command in another pane
cmux send-key --surface surface:N enter                        # send Enter key separately
cmux send-key --surface surface:N ctrl+c                       # send Ctrl+C (stop a process)
cmux read-screen --surface surface:N                           # read visible terminal text
cmux read-screen --surface surface:N --scrollback              # include scrollback history
cmux read-screen --surface surface:N --scrollback --lines 200  # last 200 lines only

Notifications & Sidebar

bash
cmux notify --title "Build Complete" --body "All tests passed"
cmux set-status build "Ready" --icon checkmark --color "#34c759"
cmux set-progress 0.75 --label "Running tests"
cmux log --level info --source claude-code "Starting build..."

Terminal I/O Patterns

The core workflow: split a pane, send a command, detect completion, read the output.

Before sending any command, decide how you'll know when it finishes. Claude Code blocks foreground sleep over 2 seconds — pick a completion strategy based on what you're running:

Command typeExampleStrategy
Batch (start→finish)npm run build, pytestwait-for signal
Long-running servicenpm run dev, docker compose upContent poll for "ready" text
Interactive programclaude, node, psqlContent poll for prompt marker
Instantecho, ls, catImmediate read-screen

Batch commands → wait-for

Chain cmux wait-for -S <signal> to the command. Run the wait with run_in_background: true.

bash
cmux new-split right  # → surface:9
cmux send --surface surface:9 "npm run build && cmux wait-for -S build-done\n"

# run_in_background: true — notified on completion
cmux wait-for build-done --timeout 120 && cmux read-screen --surface surface:9 --scrollback --lines 50

Services / interactive programs → content poll

Poll read-screen for expected text. Use the bundled helper ${CLAUDE_SKILL_DIR}/scripts/poll-screen.sh with run_in_background: true (references shorten it to poll-screen.sh):

bash
# run_in_background: true
${CLAUDE_SKILL_DIR}/scripts/poll-screen.sh surface:9 "ready|listening|Claude Code" --timeout 60

Common match patterns:

  • Server ready: ready|listening on|started
  • Claude Code ready: Claude Code|tips:|❯
  • Task complete: ╭─|❯|\\$\\s*$
  • Build result: ✓|passed|error|failed

Hybrid example

Server start → wait for ready → then batch work:

bash
cmux send --surface surface:9 "npm run dev\n"
# run_in_background: true — poll for server ready
${CLAUDE_SKILL_DIR}/scripts/poll-screen.sh surface:9 "ready on" --timeout 30

# (after background notification confirms ready)
cmux send --surface surface:9 "curl localhost:3000/health && cmux wait-for -S health-ok\n"
cmux wait-for health-ok --timeout 10

For detailed patterns (server monitoring, E2E testing, build pipelines, remote Claude Code), read the terminal-io reference.

Sidebar Metadata

bash
# status pill: set-status <key> <value> [--icon name] [--color #hex]
cmux set-status build "Ready" --icon checkmark --color "#34c759"
cmux set-status build "Failed" --icon xmark --color "#ff3b30"
cmux clear-status build

# progress bar (0.0 to 1.0, optional --label)
cmux set-progress 0.75 --label "Running tests"
cmux clear-progress

# log messages (leveled, optional --source)
cmux log --level info --source claude-code "Starting build..."
cmux log --level success "Build complete"
cmux log --level warning "3 deprecation warnings"
cmux log --level error "Test suite failed"

Coexistence

  • In cmux: Use cmux new-split for panes, cmux send/cmux read-screen for terminal I/O, cmux notify for notifications.
  • Outside cmux: These features are unavailable. Use standard terminal workflows.
  • Browser automation in cmux: Use the cmux-browser skill for embedded webview automation.
  • Markdown viewing in cmux: Use cmux markdown open <path> directly to open a live-reloading panel.
  • With cmux claude-teams: Teams uses its own tmux-shim layer for topology — do not mix direct cmux topology commands with Teams orchestration.

Gotchas

  • cmux commands fail silently outside cmux — always check $CMUX_WORKSPACE_ID before using any cmux command.
  • Short refs (surface:7) are session-scoped and may change between sessions — always cmux identify --json at the start of automation to discover current topology.
  • send includes \n for Enter — cmux send "command\n" sends the command and presses Enter in one call. No need for a separate send-key enter unless you want explicit timing control.
  • send-keys does not exist — the command is send (text) and send-key (key event). This is different from tmux's send-keys.
  • press does not exist — to send Ctrl+C, use cmux send-key --surface surface:N ctrl+c.
  • read-screen returns the current screen state — if a command is still running, the output may be incomplete. Use --scrollback --lines N for history, or use a completion strategy (see Terminal I/O Patterns above).
  • In Claude Code, sleep over 2 seconds is blocked in foreground — use wait-for for batch commands, content polling for interactive programs. Both require run_in_background: true. Avoid sleep N && read-screen — it reads too early or too late.
  • Always plan completion detection before sending a command — decide upfront: is this batch (wait-for), service/interactive (content poll), or instant (immediate read)? Sending without a plan leads to blind retries.
  • set-status --color requires hex values ("#34c759") — named colors like green are not supported.
  • set-status requires a key (e.g., build) as the first argument — the key allows multiple independent status pills per workspace.
  • If cmux claude-teams is active, it manages topology through a tmux-compat shim. Direct topology commands (new-split, move-surface) may conflict with Teams orchestration.
  • Desktop alerts are suppressed when the cmux window is focused and the workspace is active — use cmux log for always-visible status updates.

Deep-Dive References

ReferenceWhen to Use
Terminal I/OSend commands, read output, server monitoring, E2E testing, build pipelines
Sync and Automationwait-for synchronization, buffers, cmux.json custom workspace commands
Handles and IdentifyHandle syntax, self-identify, caller targeting
Windows and WorkspacesWindow/workspace lifecycle and reorder/move
Panes and SurfacesSplits, surfaces, move/reorder, focus routing
Trigger Flash and HealthVisual flash confirmation and surface health checks
NotificationsNotification CLI, sidebar metadata API, hook patterns

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Claw Mux?

Control cmux terminal topology and I/O — send commands to panes, read output, split layouts, monitor logs, orchestrate multi-pane workflows. Requires cmux environment.

Firwat Claw Mux op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Claw Mux besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Claw Mux an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/LeeJuOh/claude-code-zero/tree/main/plugins/claw-mux/skills/claw-mux an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Claw Mux benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Claw Mux benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Claw Mux domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Claw Mux gratis?

Jo. LeeJuOh huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇