Aller au contenu
Skillpedia
Automatisations29k · #9803

cmux-workspace

Ce qu’il fait

Ce skill maintient le travail d'un agent à l'intérieur de l'espace de travail cmux où il a été lancé. Il s'adresse aux personnes qui font tourner plusieurs agents ou tâches dans cmux en même temps.

Quand l’utiliser

  • ✓Quand un agent doit ouvrir ou modifier des volets uniquement dans son propre espace de travail cmux.
  • ✓Quand vous voulez automatiser cmux sans changer la vue que vous regardez.
  • ✓Quand vous faites tourner plusieurs agents dans cmux et ne voulez pas qu'ils interfèrent entre eux.

Lien du skill

https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-workspace/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-workspace/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Lance cette tâche dans mon espace de travail cmux actuel et ne change pas ce que je regarde.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent lit les identifiants de l'espace de travail et de la surface qui lui ont été donnés, n'agit que sur ceux-ci et évite les actions qui modifieraient l'espace de travail que vous voyez.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

cmux Workspace

Scope work to the cmux workspace that invoked the agent.

  • Window: a macOS cmux window.
  • Workspace: a sidebar entry. The UI calls it a tab; CLI/socket APIs call it a workspace.
  • Pane: a split region inside a workspace.
  • Surface: a tab inside a pane, terminal or browser.
  • Panel: internal content type inside a surface. Prefer CLI surface commands over panel internals.

Default rule

Scope actions to the current caller workspace unless the user explicitly asks for another workspace, another window, or global state. Do not assume the visually focused workspace is the right target: an agent can run in one workspace while the user looks at another.

printf 'workspace=%s\nsurface=%s\nsocket=%s\n' \
  "${CMUX_WORKSPACE_ID:-}" "${CMUX_SURFACE_ID:-}" "${CMUX_SOCKET_PATH:-}"
cmux identify --json

CMUX_WORKSPACE_ID is the default workspace anchor and CMUX_SURFACE_ID the default caller terminal anchor. If they are missing, fall back to cmux identify --json and say explicitly that you are using the currently focused context.

Non-disruptive automation

Treat layout and focus as separate concerns. select-workspace, focus-pane, focus-panel, and focus-changing tab-action verbs are user-affecting actions, like clicks. Never call them speculatively, even inside the caller's own workspace, since the user may be looking elsewhere.

Build layout additively in one shot, using commands that create a pane already populated with the right surface:

cmux new-pane --workspace "${CMUX_WORKSPACE_ID}" --type browser --direction right --url "http://127.0.0.1:8765"
cmux new-pane --workspace "${CMUX_WORKSPACE_ID}" --type terminal --direction down
cmux new-pane --workspace "${CMUX_WORKSPACE_ID}" --type terminal --direction down --command "npm run dev"

When the first command for a new terminal is known, pass --command <text> so it starts at spawn instead of a later send. Avoid create-then-move-then-focus chains. Pass --focus false wherever the verb supports it (move-surface --focus false preserves the user's attention; more commands may grow the flag, see https://github.com/manaflow-ai/cmux/issues/1418 and https://github.com/manaflow-ai/cmux/issues/2820). If a layout command rejects a valid surface: or pane: ref, report the bug and stop rather than working around it by focusing.

Right-side helper pane

For auxiliary output (preview apps, TUIs, logs, one-off shells, browser checks), reuse one helper pane to the right of the caller terminal. Inspect first with cmux identify --json, cmux list-panes, and cmux list-pane-surfaces, then:

  • Helper pane exists: add a surface to it.
    cmux new-surface --workspace "${CMUX_WORKSPACE_ID:-}" --pane pane:<helper> --type terminal --focus false
    
  • No helper pane: create exactly one.
    cmux new-pane --workspace "${CMUX_WORKSPACE_ID:-}" --type terminal --direction right --focus false
    
  • Multiple obvious stale helper panes from this same automation, and the user asked to tidy: keep one and clean up duplicates. Never close a pane you cannot confidently identify as stale helper output.

Send commands to the new or reused surface by explicit surface ref, or pass --command <text> at creation when the first command is already known. Repeated "open it" requests create tabs inside the existing right helper pane, not more splits.

Caller terminal

The surface that invoked the agent is the safest anchor for relative operations.

cmux send "npm test\n"                                    # focused terminal in caller workspace
cmux send --surface "${CMUX_SURFACE_ID:-}" "git status\n"  # exact caller surface
cmux send-key --surface "${CMUX_SURFACE_ID:-}" enter

Do not send keystrokes, close surfaces, or change focus in another workspace unless the user named that target.

Messaging another agent

To tell another agent something, use cmux agent message, never cmux send or tmux send-keys into its terminal. Typing into an agent's terminal lands in whatever the human there is typing and can submit their half-written prompt.

cmux agent message cmux-remote-status "The relay fix is on main; rebase when free."   # by workspace title
cmux agent message workspace:4 --from reviewer "Review posted on #123."
cmux agent message --reply-to <message-id> "Done."                                    # answer a message you received
cmux agent inbox --surface "${CMUX_SURFACE_ID:-}"  
Questions fréquentes

L'agent va-t-il déplacer mon focus vers un autre espace de travail ?

Pas sauf si vous le demandez explicitement. Les changements de focus sont traités comme des clics et sont évités par défaut.

Que se passe-t-il si l'agent ne trouve pas son espace de travail ?

Il se replie sur le contexte actuellement actif et vous indique qu'il le fait.

Fonctionne-t-il uniquement dans l'application cmux ?

Oui. Il couvre les espaces de travail, les volets et les surfaces de cmux, ainsi que les outils en ligne de commande qui les contrôlent.

Détails

Description originale de l’auteur

Work inside the current cmux workspace and terminal. Use for cmux workspace, current workspace, caller surface, panes, surfaces, socket targeting, and non-interfering cmux automation.

repo: manaflow-ai/cmux

Popularité

Étoiles GitHub
29k
Position au classement
#9803
Licence
—
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires