cmux-workspace
Skill này làm gì
Skill này giữ công việc của agent bên trong không gian làm việc cmux nơi nó được khởi chạy. Nó dành cho người chạy nhiều agent hoặc nhiều tác vụ trong cmux cùng lúc và không muốn chúng can thiệp lẫn nhau.
Khi nào nên dùng
- ✓Khi một agent chỉ nên mở hoặc thay đổi các bảng trong không gian làm việc cmux của chính nó.
- ✓Khi bạn muốn tự động hóa cmux mà không chuyển khỏi màn hình bạn đang xem.
- ✓Khi bạn chạy nhiều hơn một agent trong cmux và không muốn chúng can thiệp lẫn nhau.
Liên kết skill
https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-workspace/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy chạy tác vụ này trong không gian làm việc cmux hiện tại của tôi và đừng chuyển khỏi nội dung tôi đang xem.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc mã không gian làm việc và mã bề mặt mà nó được cấp, chỉ nhắm đến các mã đó, và tránh các hành động làm thay đổi không gian làm việc bạn đang xem.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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:-}"
Câu hỏi thường gặp
Agent có tự chuyển tiêu điểm sang không gian làm việc khác không?
Không, trừ khi bạn yêu cầu rõ ràng. Thay đổi tiêu điểm được coi như một cú nhấp chuột và mặc định bị tránh.
Điều gì xảy ra nếu agent không tìm thấy không gian làm việc của nó?
Nó quay về bối cảnh đang có tiêu điểm và cho bạn biết rằng nó đang làm vậy.
Điều này chỉ hoạt động bên trong ứng dụng cmux à?
Đúng. Nó bao quát các không gian làm việc, ngăn và bề mặt của cmux, cùng các công cụ dòng lệnh điều khiển chúng.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9803
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
cmux-browser
29kCho phép agent của bạn mở website trong cmux, đọc, nhấp và trích xuất thông tin từ khung trình duyệt mà không chiếm tiêu điểm của bạn.
cmux-capture
29kCho phép agent của bạn chụp ảnh màn hình hoặc ghi lại ngắn một cửa sổ cmux, để bạn có bằng chứng thực tế khi cho thấy một thay đổi trực quan hoặc một lỗi.
cmux-cloud-vm
29kCho phép agent của bạn chạy lệnh, khởi động agent lập trình và hiển thị workspace trên các máy cmux Cloud, giữ công việc chạy tiếp sau khi pane đóng.
cmux-cua
29kCho phép agent của bạn thao tác ứng dụng macOS thật qua engine Computer Use của cmux, đọc cây accessibility và nhấp, gõ, cuộn thay bạn.
Skill tương tự
knowledge-automation
394kGiúp agent của bạn thiết lập tác vụ định kỳ đưa nội dung mới vào kho Knowledge theo lịch, rồi kiểm tra tác vụ có chạy không.
knowledge-source-ingest
394kGiúp agent của bạn cập nhật Knowledge vault với các mục mới từ kênh chat, nguồn tin hoặc hộp thư, mà không thêm lại những gì đã có.
benchmark
280kGiúp agent của bạn đo tốc độ và hiệu suất của code, hữu ích để đảm bảo mọi thứ nhanh và tìm ra những chỗ chậm.