cmux-workspace
できること
このスキルは、エージェントの作業を、起動されたcmuxのワークスペースの中に保ちます。cmuxで複数のエージェントやタスクを同時に動かす人向けです。
使う場面
- ✓エージェントが、自分のcmuxのワークスペースの中だけで、ペインを開いたり変えたりすべきとき。
- ✓見ている画面を切り替えずに、cmuxを自動化したいとき。
- ✓cmuxで複数のエージェントを動かし、互いに干渉させたくないとき。
スキルのリンク
https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-workspace/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“今のcmuxのワークスペースでこのタスクを実行してください。私が見ている画面から切り替えないでください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、渡されたワークスペースとサーフェスのIDを読み、そのIDだけを対象にします。また、あなたが見ているワークスペースが変わるような操作は避けます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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:-}"
よくある質問
エージェントは私のフォーカスを別のワークスペースに移しますか?
あなたが明示的に頼まない限り移しません。フォーカスの変更はクリックと同じ扱いで、初期設定では避けられます。
エージェントが自分のワークスペースを見つけられないとどうなりますか?
現在フォーカスされている文脈に切り替え、そうしていることをあなたに伝えます。
cmuxアプリの中でしか動きませんか?
はい、cmuxのワークスペース、ペイン、サーフェス、およびそれらを操作するコマンドラインツールを扱います。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 29k
- ランキング
- #9803
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
cmux-browser
29kエージェントが、cmuxでWebサイトを開き、作業のフォーカスを奪わずに、ブラウザのペインを読み取り、クリックし、情報を取り出せるよう支援します。
cmux-capture
29kエージェントが、cmuxのウィンドウのスクリーンショットや短い録画を撮れるようにし、視覚的な変化やバグを実際の証拠として示せるよう支援します。
cmux-cloud-vm
29kエージェントが、cmux Cloudのマシン上でコマンドを実行し、コーディングエージェントを起動し、ワークスペースを表示できるよう支援します。ペインを閉じても作業は続きます。
cmux-cua
29kエージェントが、cmux Computer Useエンジンを通じて、実際のmacOSアプリを操作できるよう支援します。アクセシビリティツリーを読み取り、あなたの代わりにクリック、入力、スクロールを行います。