[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DHCEYVBW4WCZ10Q20S137D":3,"skill-same:01M7DHCEYVBW4WCZ10Q20S137D":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M7DHCEYVBW4WCZ10Q20S137D","cmux",null,"Control cmux workspaces, panes, surfaces, and agent sessions safely from macOS terminal workflows.","Hazek-dc\u002FPresensiGuru_FaceNet_EMAR","Hazek-dc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F75208960?v=4","01M7DEQV5B4YGS86A81DYH81DR","Hazek","01M7DEQV5XP4TM0C6NTHXCXCHR",1,"MIT","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcmux\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cmux\ndescription: \"Control cmux workspaces, panes, surfaces, and agent sessions safely from macOS terminal workflows.\"\ncategory: development\nrisk: critical\nsource: community\nsource_repo: davidondrej\u002Fskills\nsource_type: community\ndate_added: \"2026-07-07\"\nauthor: davidondrej\ntags: [cmux, terminal, agents, macos]\ntools: [claude, codex]\nlicense: \"MIT\"\nlicense_source: \"https:\u002F\u002Fgithub.com\u002Fdavidondrej\u002Fskills\u002Fblob\u002Fmain\u002FLICENSE\"\n---\n\n# cmux Control\n\n## When to Use\n\n- Use when you need to inspect, create, close, or rearrange cmux panes, surfaces, or workspaces.\n- Use when you need to send input to or monitor agents running inside cmux.\n\ncmux is a native macOS terminal app for running multiple AI coding agents in parallel. It exposes a CLI (`cmux`) and a Unix-socket JSON-RPC API (`\u002Ftmp\u002Fcmux.sock`) for full topology and browser control.\n\n## Core Concepts\n\n- **Window** — top-level macOS cmux window\n- **Workspace** — sidebar tab within a window (one git branch \u002F project context)\n- **Pane** — split region inside a workspace\n- **Surface** — tab inside a pane (terminal or browser)\n\nHandles default to short refs (`workspace:2`, `pane:1`, `surface:7`); UUIDs accepted as input. Add `--id-format uuids|both` for UUID output.\n\n### Ref syntax — get this right or fail silently\n\n- **Always use PREFIXED refs** (`pane:38`, `surface:46`). A **bare number is treated as an INDEX, not an ID** — `--surface 46` means \"the surface at index 46\" (usually nonexistent → silent failure), NOT `surface:46`.\n- **`read-screen` and `capture-pane` have NO `--pane` flag** — they target `--workspace` or `--surface` only. Passing `--pane` errors, and a bare\u002Fmissing target falls back to your OWN surface (you'll read your own footer and draw wrong conclusions). To read a pane: resolve it to a surface FIRST with `cmux list-pane-surfaces --pane pane:N`, then `cmux read-screen --surface surface:N`.\n- **Never append `2>\u002Fdev\u002Fnull` to cmux commands.** Errors go to stderr with exit code 1; suppressing them blinds you to your own ref\u002Fflag mistakes (the #1 cause of \"(no output)\").\n\n## Detect cmux in a Shell\n\n```bash\n[ -S \"${CMUX_SOCKET_PATH:-\u002Ftmp\u002Fcmux.sock}\" ] || exit 0   # bail if not in cmux\n[ -n \"${CMUX_WORKSPACE_ID:-}\" ] && echo \"inside cmux surface\"\n```\n\nInjected env vars in every cmux-spawned terminal: `CMUX_WORKSPACE_ID`, `CMUX_SURFACE_ID`, `CMUX_SOCKET_PATH`, `CMUX_PORT`. **Always anchor automation to `CMUX_WORKSPACE_ID`** — the visually focused workspace may not be the agent's caller workspace.\n\n## Fast Start — Topology\n\n```bash\ncmux identify --json                              # who am I (window\u002Fworkspace\u002Fpane\u002Fsurface)\ncmux tree                                         # full hierarchy\ncmux list-workspaces --json\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"\ncmux list-surfaces --workspace \"$CMUX_WORKSPACE_ID\"\n\ncmux new-workspace --name \"feature-x\" --cwd \u002Fpath\u002Fto\u002Frepo\ncmux new-pane --workspace \"$CMUX_WORKSPACE_ID\" --type terminal --direction right --focus false\ncmux new-pane --workspace \"$CMUX_WORKSPACE_ID\" --type browser  --direction right --url http:\u002F\u002Flocalhost:3000\ncmux move-surface --surface surface:7 --pane pane:2 --focus false\ncmux split-off --surface surface:7 right\ncmux reorder-surface --surface surface:7 --before surface:3\ncmux close-surface --surface surface:7\n```\n\n## Polling Pi Agents in Panes — Keep Sleeps Short\n\nWhen launching a Pi Agent inside a cmux pane and polling for output, use **short `sleep` intervals (2–5s)**. Pi is fast and minimal, and the user runs it on Opus 4.8 Fast via OpenRouter, which streams tokens extremely quickly. Do NOT use `sleep 15` unless genuinely needed (a big build\u002Frefactor) — most of the time `sleep 2`–`sleep 5` is more than enough.\n\nAfter every agent check, send the user a one-line status update: what the agent is doing and whether it is on track. Keep it extremely concise.\n\nClaude Code cmux note: after Claude finishes, it may prefill a predicted next user message; that draft is Claude, not the user speaking.\n\n## Send Input\n\n**Command names:** there is NO `send-surface` \u002F `send-key-surface`. Target a specific surface with the `--surface` flag on `send` \u002F `send-key` (same commands as the focused terminal). `send-panel` \u002F `send-key-panel` exist ONLY for panels (`--panel`), not surfaces.\n\n```bash\ncmux send \"echo hi\\n\"                                       # focused terminal\ncmux send-key \"ctrl+c\"                                       # enter|tab|esc|backspace|arrows|ctrl+x|shift+tab\ncmux send --surface surface:7 \"npm run build\"               # specific surface (NOT send-surface)\ncmux send-key --surface surface:7 enter                     # specific surface (NOT send-key-surface)\n```\n\n## Notifications & Sidebar Metadata\n\n```bash\ncmux notify --title \"Done\" --body \"tests passed\"\ncmux set-status build \"compiling\" --icon hammer --color \"#ff9500\"\ncmux set-progress 0.5 --label \"Building...\"\ncmux log --level success \"All 42 tests passed\"               # info|progress|success|warning|error\ncmux trigger-flash --workspace \"$CMUX_WORKSPACE_ID\"          # blue-ring attention cue\ncmux sidebar-state --json                                    # dump all sidebar metadata\n```\n\n## Browser Automation (WKWebView)\n\nWorkflow: open → wait → snapshot → act → re-snapshot.\n\n```bash\nS=$(cmux --json browser open https:\u002F\u002Fexample.com | jq -r .result.surface_ref)\ncmux browser \"$S\" wait --load-state complete --timeout-ms 15000\ncmux browser \"$S\" snapshot --interactive                     # returns elements as e1, e2, ...\ncmux browser \"$S\" fill e1 \"\u003Cemail-address>\"\ncmux browser \"$S\" click e2 --snapshot-after\n\n# Navigation \u002F inspection\ncmux browser \"$S\" goto URL | back | forward | reload\ncmux browser \"$S\" get url | get title | get text body | get value \"#email\" | get count \".row\"\ncmux browser \"$S\" eval 'return document.title'\n\n# Waits\ncmux browser \"$S\" wait --selector \"#ready\" --timeout-ms 10000\ncmux browser \"$S\" wait --url-contains \"\u002Fdashboard\" --timeout-ms 10000\n\n# Session\ncmux browser \"$S\" cookies get | cookies set --name foo --value bar\ncmux browser \"$S\" state save \u002Ftmp\u002Fauth.json | state load \u002Ftmp\u002Fauth.json\n\n# Diagnostics\ncmux browser \"$S\" console list | errors list | screenshot\n```\n\n**Not supported by WKWebView** (return `not_supported`): viewport emulation, geolocation\u002Foffline emulation, trace recording, network route interception, raw input injection.\n\n## Markdown Viewer\n\n```bash\ncmux markdown open plan.md --direction right                 # live-watching renderer\ncmux open file.pdf                                           # auto-routes to right viewer\n```\n\n`cmux markdown open` flags: `--workspace`, `--surface`, `--window`, `--direction \u003Cright|down|left|up>`, `--focus \u003Ctrue|false>`. There is **NO `--pane` flag** — passing it errors. To target a pane, pass `--surface \u003Cexisting-md-surface-in-that-pane>`.\n\n### Reuse the existing right markdown pane (don't spawn strays)\n\nDefault behavior of `markdown open` is to **create a new pane** every time, even with `--direction right`. To keep all docs as tabs in ONE right pane, follow this exactly:\n\n```bash\n# 1. Find the right pane and its surfaces (anchor to THIS workspace)\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"\ncmux list-pane-surfaces --pane pane:10        # the right\u002Fhelper pane\n\n# 2. Open targeting an existing markdown surface IN that pane (reuses pane, adds tab)\ncmux markdown open \u002Fabs\u002Fpath\u002Ffile.md --surface surface:12 --focus false\n\n# 3. If it STILL spawned a new pane (it can), move the new surface in + verify\ncmux move-surface --surface surface:NEW --pane pane:10 --focus false\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"   # confirm stray pane is gone\n```\n\n### Swapping the file in the single right pane (close-FIRST, then open)\n\nTo replace the doc shown in your one right markdown pane, the ONLY reliable order is **close the previous surface FIRST, then `markdown open` the new file fresh** — never move an existing viewer, never open-then-close.\n\n```bash\n# 1. close the previous right markdown surface (right side goes empty)\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"\ncmux close-surface --surface surface:PREV\n# 2. THEN open the new file fresh\ncmux markdown open \u002Fabs\u002Fpath\u002Fnew.md --direction right --focus false\n```\n\nORDER MATTERS: close-previous BEFORE open-new. Opening first then closing the old one, or `move-surface`-ing an existing viewer, leaves the right pane BLANK.\n\n### Hard-won lessons (avoid the trial-and-error)\n\n- **Surface refs are global, not per-workspace.** A ref like `surface:126` from an earlier `markdown open` may live in a different window\u002Fworkspace. Always re-list (`list-panes` \u002F `list-pane-surfaces`) before reusing a ref — never assume a ref from a previous turn is still in the right pane.\n- **`move-surface`-ing a markdown viewer often leaves it BLANK.** The moved surface keeps `type=markdown` and `surface-health` looks fine, but renders nothing. Fix: `close-surface` it and `cmux markdown open \u003Cpath>` fresh, then move the *fresh* surface if needed. Don't waste time on `refresh-surfaces` — it usually won't fix a moved-then-blank viewer.\n- **You cannot screenshot or `read-screen` a markdown surface** (`Surface is not a terminal` \u002F browser screenshot is WKWebView-only). To verify a markdown viewer rendered, ask the user or open the file in a browser surface instead. Don't burn turns trying to capture it.\n- **`cmux list-surfaces` does not exist.** Use `cmux list-pane-surfaces [--pane ...]`.\n\n## Settings & Config\n\n```bash\ncmux docs settings        # prints paths, schema URL, reload cmd — read BEFORE editing\ncmux settings path        # path to cmux.json\ncmux settings cmux-json   # open in editor\ncmux reload-config        # hot-reload cmux.json + ~\u002F.config\u002Fghostty\u002Fconfig (Cmd+Shift+,)\n```\n\nLocations:\n- cmux settings: `~\u002F.config\u002Fcmux\u002Fcmux.json` (canonical). Project-local override: `.cmux\u002Fcmux.json` or `.\u002Fcmux.json`.\n- Terminal rendering (font, cursor, theme, scrollback, opacity, blur): `~\u002F.config\u002Fghostty\u002Fconfig` — NOT cmux.json.\n\nBefore editing `cmux.json`, copy it to a timestamped `.bak` next to it so the user can revert. Schema: `https:\u002F\u002Fraw.githubusercontent.com\u002Fmanaflow-ai\u002Fcmux\u002Fmain\u002Fweb\u002Fdata\u002Fcmux.schema.json`.\n\n## Agent Hooks & Install\n\n```bash\nbrew tap manaflow-ai\u002Fcmux && brew install --cask cmux\nsudo ln -sf \u002FApplications\u002Fcmux.app\u002FContents\u002FResources\u002Fbin\u002Fcmux \u002Fusr\u002Flocal\u002Fbin\u002Fcmux\ncmux hooks setup                                             # all detected agents\ncmux hooks setup codex|grok|antigravity|opencode             # specific agent\nnpx skills add manaflow-ai\u002Fcmux -g -y                        # install cmux skills for agents\n```\n\nNative session-resume supported for: Claude Code, Codex, Grok, OpenCode, Pi, Amp, Cursor CLI, Gemini, Antigravity, Rovo Dev, Hermes, Copilot, CodeBuddy, Factory, Qoder.\n\n## Socket API (advanced)\n\n`\u002Ftmp\u002Fcmux.sock` — Unix socket, JSON-RPC v2. Use for tight loops where subprocess spawn cost matters; otherwise prefer the CLI.\n\n```bash\necho '{\"id\":\"1\",\"method\":\"workspace.list\",\"params\":{}}' | nc -U \u002Ftmp\u002Fcmux.sock\n```\n\nMethod prefixes: `system.*`, `window.*`, `workspace.*`, `pane.*`, `surface.*`, `notification.*`, `browser.*`. Full list and Python client example in `references\u002Fsocket-api.md`.\n\nAccess modes: `cmuxOnly` (default — only cmux-spawned processes), `automation` (any local process), `password`, `allowAll` (unsafe). If you hit `Failed to connect to socket`, you're likely an external process under `cmuxOnly` — switch mode in Settings > Automation or run from inside a cmux terminal.\n\n## Critical Rules — Non-Disruptive Automation\n\nThese rules come from the `cmux-workspace` skill and prevent agents from yanking the user's focus:\n\n1. **Anchor to `CMUX_WORKSPACE_ID`.** Never assume the visually focused workspace is the target.\n2. **Never call focus-changing verbs speculatively.** `select-workspace`, `focus-pane`, `focus-panel`, `focus-surface` only on explicit user request. Pass `--focus false` whenever available.\n3. **Build layout additively in one call.** `cmux new-pane --type … --focus false` beats create-then-move-then-focus chains.\n4. **Right-side helper pane pattern.** Reuse an existing non-caller helper pane if present; otherwise create exactly one right-side pane.\n5. **Never send input to surfaces you don't own.** Only target surfaces in the caller's workspace unless the user explicitly asks for cross-workspace routing.\n6. **Check surface health before routing input** when UI state may be stale: `cmux surface-health`.\n\n## Common Pitfalls\n\n- **Pi\u002FPi-like socket connection failures from external processes** → default `cmuxOnly` mode; either run inside a cmux terminal or change socket mode.\n- **macOS only.** No Linux\u002FWindows port.\n- **WKWebView ≠ CDP.** Don't expect Playwright-equivalent network mocking or viewport emulation.\n- **Resume strips sensitive env vars.** Re-inject tokens at resume time if the agent needs them.\n- **Skills snapshot at app start.** Edits to skill files require a restart of the consuming agent.\n- **Legacy v1 socket payloads (`{\"command\":...}`) rejected.** Use v2 JSON-RPC only.\n- **Don't `cat ~\u002F.cmuxterm\u002F*-hook-sessions.json`** expecting secrets — they're scrubbed. Look there for session\u002Fsurface mappings only.\n\n## Reference: Full CLI Help\n\nFor any command, `cmux \u003Ccmd> --help` is authoritative. Use `cmux capabilities --json` to enumerate available socket methods in the current build.\n\n## Keyboard Shortcuts (most-used)\n\nWorkspaces: ⌘N new, ⌘1–8 jump, ⌃⌘[ \u002F ⌃⌘] prev\u002Fnext, ⌘⇧W close, ⌘B sidebar.\nSurfaces: ⌘T new, ⌘⇧[ \u002F ⌘⇧] prev\u002Fnext, ⌘W close, ⌃1–8 jump.\nSplits: ⌘D right, ⌘⇧D down, ⌥⌘D browser right, ⌥⌘←→↑↓ focus directional, ⌘⇧↵ zoom.\nBrowser: ⌘⇧L open, ⌘L address bar, ⌘[\u002F⌘] back\u002Fforward, ⌥⌘I devtools.\nApp: ⌘, settings, ⌘⇧, reload-config, ⌘⇧P palette, ⌘⇧O restore session, ⌃⌥⌘. system-wide show\u002Fhide.\n\n## Limitations\n\n- Adapted from `davidondrej\u002Fskills`; verify local paths, tools, credentials, and agent features before acting.\n- For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.\n","# cmux Control\n\n## When to Use\n\n- Use when you need to inspect, create, close, or rearrange cmux panes, surfaces, or workspaces.\n- Use when you need to send input to or monitor agents running inside cmux.\n\ncmux is a native macOS terminal app for running multiple AI coding agents in parallel. It exposes a CLI (`cmux`) and a Unix-socket JSON-RPC API (`\u002Ftmp\u002Fcmux.sock`) for full topology and browser control.\n\n## Core Concepts\n\n- **Window** — top-level macOS cmux window\n- **Workspace** — sidebar tab within a window (one git branch \u002F project context)\n- **Pane** — split region inside a workspace\n- **Surface** — tab inside a pane (terminal or browser)\n\nHandles default to short refs (`workspace:2`, `pane:1`, `surface:7`); UUIDs accepted as input. Add `--id-format uuids|both` for UUID output.\n\n### Ref syntax — get this right or fail silently\n\n- **Always use PREFIXED refs** (`pane:38`, `surface:46`). A **bare number is treated as an INDEX, not an ID** — `--surface 46` means \"the surface at index 46\" (usually nonexistent → silent failure), NOT `surface:46`.\n- **`read-screen` and `capture-pane` have NO `--pane` flag** — they target `--workspace` or `--surface` only. Passing `--pane` errors, and a bare\u002Fmissing target falls back to your OWN surface (you'll read your own footer and draw wrong conclusions). To read a pane: resolve it to a surface FIRST with `cmux list-pane-surfaces --pane pane:N`, then `cmux read-screen --surface surface:N`.\n- **Never append `2>\u002Fdev\u002Fnull` to cmux commands.** Errors go to stderr with exit code 1; suppressing them blinds you to your own ref\u002Fflag mistakes (the #1 cause of \"(no output)\").\n\n## Detect cmux in a Shell\n\n```bash\n[ -S \"${CMUX_SOCKET_PATH:-\u002Ftmp\u002Fcmux.sock}\" ] || exit 0   # bail if not in cmux\n[ -n \"${CMUX_WORKSPACE_ID:-}\" ] && echo \"inside cmux surface\"\n```\n\nInjected env vars in every cmux-spawned terminal: `CMUX_WORKSPACE_ID`, `CMUX_SURFACE_ID`, `CMUX_SOCKET_PATH`, `CMUX_PORT`. **Always anchor automation to `CMUX_WORKSPACE_ID`** — the visually focused workspace may not be the agent's caller workspace.\n\n## Fast Start — Topology\n\n```bash\ncmux identify --json                              # who am I (window\u002Fworkspace\u002Fpane\u002Fsurface)\ncmux tree                                         # full hierarchy\ncmux list-workspaces --json\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"\ncmux list-surfaces --workspace \"$CMUX_WORKSPACE_ID\"\n\ncmux new-workspace --name \"feature-x\" --cwd \u002Fpath\u002Fto\u002Frepo\ncmux new-pane --workspace \"$CMUX_WORKSPACE_ID\" --type terminal --direction right --focus false\ncmux new-pane --workspace \"$CMUX_WORKSPACE_ID\" --type browser  --direction right --url http:\u002F\u002Flocalhost:3000\ncmux move-surface --surface surface:7 --pane pane:2 --focus false\ncmux split-off --surface surface:7 right\ncmux reorder-surface --surface surface:7 --before surface:3\ncmux close-surface --surface surface:7\n```\n\n## Polling Pi Agents in Panes — Keep Sleeps Short\n\nWhen launching a Pi Agent inside a cmux pane and polling for output, use **short `sleep` intervals (2–5s)**. Pi is fast and minimal, and the user runs it on Opus 4.8 Fast via OpenRouter, which streams tokens extremely quickly. Do NOT use `sleep 15` unless genuinely needed (a big build\u002Frefactor) — most of the time `sleep 2`–`sleep 5` is more than enough.\n\nAfter every agent check, send the user a one-line status update: what the agent is doing and whether it is on track. Keep it extremely concise.\n\nClaude Code cmux note: after Claude finishes, it may prefill a predicted next user message; that draft is Claude, not the user speaking.\n\n## Send Input\n\n**Command names:** there is NO `send-surface` \u002F `send-key-surface`. Target a specific surface with the `--surface` flag on `send` \u002F `send-key` (same commands as the focused terminal). `send-panel` \u002F `send-key-panel` exist ONLY for panels (`--panel`), not surfaces.\n\n```bash\ncmux send \"echo hi\\n\"                                       # focused terminal\ncmux send-key \"ctrl+c\"                                       # enter|tab|esc|backspace|arrows|ctrl+x|shift+tab\ncmux send --surface surface:7 \"npm run build\"               # specific surface (NOT send-surface)\ncmux send-key --surface surface:7 enter                     # specific surface (NOT send-key-surface)\n```\n\n## Notifications & Sidebar Metadata\n\n```bash\ncmux notify --title \"Done\" --body \"tests passed\"\ncmux set-status build \"compiling\" --icon hammer --color \"#ff9500\"\ncmux set-progress 0.5 --label \"Building...\"\ncmux log --level success \"All 42 tests passed\"               # info|progress|success|warning|error\ncmux trigger-flash --workspace \"$CMUX_WORKSPACE_ID\"          # blue-ring attention cue\ncmux sidebar-state --json                                    # dump all sidebar metadata\n```\n\n## Browser Automation (WKWebView)\n\nWorkflow: open → wait → snapshot → act → re-snapshot.\n\n```bash\nS=$(cmux --json browser open https:\u002F\u002Fexample.com | jq -r .result.surface_ref)\ncmux browser \"$S\" wait --load-state complete --timeout-ms 15000\ncmux browser \"$S\" snapshot --interactive                     # returns elements as e1, e2, ...\ncmux browser \"$S\" fill e1 \"\u003Cemail-address>\"\ncmux browser \"$S\" click e2 --snapshot-after\n\n# Navigation \u002F inspection\ncmux browser \"$S\" goto URL | back | forward | reload\ncmux browser \"$S\" get url | get title | get text body | get value \"#email\" | get count \".row\"\ncmux browser \"$S\" eval 'return document.title'\n\n# Waits\ncmux browser \"$S\" wait --selector \"#ready\" --timeout-ms 10000\ncmux browser \"$S\" wait --url-contains \"\u002Fdashboard\" --timeout-ms 10000\n\n# Session\ncmux browser \"$S\" cookies get | cookies set --name foo --value bar\ncmux browser \"$S\" state save \u002Ftmp\u002Fauth.json | state load \u002Ftmp\u002Fauth.json\n\n# Diagnostics\ncmux browser \"$S\" console list | errors list | screenshot\n```\n\n**Not supported by WKWebView** (return `not_supported`): viewport emulation, geolocation\u002Foffline emulation, trace recording, network route interception, raw input injection.\n\n## Markdown Viewer\n\n```bash\ncmux markdown open plan.md --direction right                 # live-watching renderer\ncmux open file.pdf                                           # auto-routes to right viewer\n```\n\n`cmux markdown open` flags: `--workspace`, `--surface`, `--window`, `--direction \u003Cright|down|left|up>`, `--focus \u003Ctrue|false>`. There is **NO `--pane` flag** — passing it errors. To target a pane, pass `--surface \u003Cexisting-md-surface-in-that-pane>`.\n\n### Reuse the existing right markdown pane (don't spawn strays)\n\nDefault behavior of `markdown open` is to **create a new pane** every time, even with `--direction right`. To keep all docs as tabs in ONE right pane, follow this exactly:\n\n```bash\n# 1. Find the right pane and its surfaces (anchor to THIS workspace)\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"\ncmux list-pane-surfaces --pane pane:10        # the right\u002Fhelper pane\n\n# 2. Open targeting an existing markdown surface IN that pane (reuses pane, adds tab)\ncmux markdown open \u002Fabs\u002Fpath\u002Ffile.md --surface surface:12 --focus false\n\n# 3. If it STILL spawned a new pane (it can), move the new surface in + verify\ncmux move-surface --surface surface:NEW --pane pane:10 --focus false\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"   # confirm stray pane is gone\n```\n\n### Swapping the file in the single right pane (close-FIRST, then open)\n\nTo replace the doc shown in your one right markdown pane, the ONLY reliable order is **close the previous surface FIRST, then `markdown open` the new file fresh** — never move an existing viewer, never open-then-close.\n\n```bash\n# 1. close the previous right markdown surface (right side goes empty)\ncmux list-panes --workspace \"$CMUX_WORKSPACE_ID\"\ncmux close-surface --surface surface:PREV\n# 2. THEN open the new file fresh\ncmux markdown open \u002Fabs\u002Fpath\u002Fnew.md --direction right --focus false\n```\n\nORDER MATTERS: close-previous BEFORE open-new. Opening first then closing the old one, or `move-surface`-ing an existing viewer, leaves the right pane BLANK.\n\n### Hard-won lessons (avoid the trial-and-error)\n\n- **Surface refs are global, not per-workspace.** A ref like `surface:126` from an earlier `markdown open` may live in a different window\u002Fworkspace. Always re-list (`list-panes` \u002F `list-pane-surfaces`) before reusing a ref — never assume a ref from a previous turn is still in the right pane.\n- **`move-surface`-ing a markdown viewer often leaves it BLANK.** The moved surface keeps `type=markdown` and `surface-health` looks fine, but renders nothing. Fix: `close-surface` it and `cmux markdown open \u003Cpath>` fresh, then move the *fresh* surface if needed. Don't waste time on `refresh-surfaces` — it usually won't fix a moved-then-blank viewer.\n- **You cannot screenshot or `read-screen` a markdown surface** (`Surface is not a terminal` \u002F browser screenshot is WKWebView-only). To verify a markdown viewer rendered, ask the user or open the file in a browser surface instead. Don't burn turns trying to capture it.\n- **`cmux list-surfaces` does not exist.** Use `cmux list-pane-surfaces [--pane ...]`.\n\n## Settings & Config\n\n```bash\ncmux docs settings        # prints paths, schema URL, reload cmd — read BEFORE editing\ncmux settings path        # path to cmux.json\ncmux settings cmux-json   # open in editor\ncmux reload-config        # hot-reload cmux.json + ~\u002F.config\u002Fghostty\u002Fconfig (Cmd+Shift+,)\n```\n\nLocations:\n- cmux settings: `~\u002F.config\u002Fcmux\u002Fcmux.json` (canonical). Project-local override: `.cmux\u002Fcmux.json` or `.\u002Fcmux.json`.\n- Terminal rendering (font, cursor, theme, scrollback, opacity, blur): `~\u002F.config\u002Fghostty\u002Fconfig` — NOT cmux.json.\n\nBefore editing `cmux.json`, copy it to a timestamped `.bak` next to it so the user can revert. Schema: `https:\u002F\u002Fraw.githubusercontent.com\u002Fmanaflow-ai\u002Fcmux\u002Fmain\u002Fweb\u002Fdata\u002Fcmux.schema.json`.\n\n## Agent Hooks & Install\n\n```bash\nbrew tap manaflow-ai\u002Fcmux && brew install --cask cmux\nsudo ln -sf \u002FApplications\u002Fcmux.app\u002FContents\u002FResources\u002Fbin\u002Fcmux \u002Fusr\u002Flocal\u002Fbin\u002Fcmux\ncmux hooks setup                                             # all detected agents\ncmux hooks setup codex|grok|antigravity|opencode             # specific agent\nnpx skills add manaflow-ai\u002Fcmux -g -y                        # install cmux skills for agents\n```\n\nNative session-resume supported for: Claude Code, Codex, Grok, OpenCode, Pi, Amp, Cursor CLI, Gemini, Antigravity, Rovo Dev, Hermes, Copilot, CodeBuddy, Factory, Qoder.\n\n## Socket API (advanced)\n\n`\u002Ftmp\u002Fcmux.sock` — Unix socket, JSON-RPC v2. Use for tight loops where subprocess spawn cost matters; otherwise prefer the CLI.\n\n```bash\necho '{\"id\":\"1\",\"method\":\"workspace.list\",\"params\":{}}' | nc -U \u002Ftmp\u002Fcmux.sock\n```\n\nMethod prefixes: `system.*`, `window.*`, `workspace.*`, `pane.*`, `surface.*`, `notification.*`, `browser.*`. Full list and Python client example in `references\u002Fsocket-api.md`.\n\nAccess modes: `cmuxOnly` (default — only cmux-spawned processes), `automation` (any local process), `password`, `allowAll` (unsafe). If you hit `Failed to connect to socket`, you're likely an external process under `cmuxOnly` — switch mode in Settings > Automation or run from inside a cmux terminal.\n\n## Critical Rules — Non-Disruptive Automation\n\nThese rules come from the `cmux-workspace` skill and prevent agents from yanking the user's focus:\n\n1. **Anchor to `CMUX_WORKSPACE_ID`.** Never assume the visually focused workspace is the target.\n2. **Never call focus-changing verbs speculatively.** `select-workspace`, `focus-pane`, `focus-panel`, `focus-surface` only on explicit user request. Pass `--focus false` whenever available.\n3. **Build layout additively in one call.** `cmux new-pane --type … --focus false` beats create-then-move-then-focus chains.\n4. **Right-side helper pane pattern.** Reuse an existing non-caller helper pane if present; otherwise create exactly one right-side pane.\n5. **Never send input to surfaces you don't own.** Only target surfaces in the caller's workspace unless the user explicitly asks for cross-workspace routing.\n6. **Check surface health before routing input** when UI state may be stale: `cmux surface-health`.\n\n## Common Pitfalls\n\n- **Pi\u002FPi-like socket connection failures from external processes** → default `cmuxOnly` mode; either run inside a cmux terminal or change socket mode.\n- **macOS only.** No Linux\u002FWindows port.\n- **WKWebView ≠ CDP.** Don't expect Playwright-equivalent network mocking or viewport emulation.\n- **Resume strips sensitive env vars.** Re-inject tokens at resume time if the agent needs them.\n- **Skills snapshot at app start.** Edits to skill files require a restart of the consuming agent.\n- **Legacy v1 socket payloads (`{\"command\":...}`) rejected.** Use v2 JSON-RPC only.\n- **Don't `cat ~\u002F.cmuxterm\u002F*-hook-sessions.json`** expecting secrets — they're scrubbed. Look there for session\u002Fsurface mappings only.\n\n## Reference: Full CLI Help\n\nFor any command, `cmux \u003Ccmd> --help` is authoritative. Use `cmux capabilities --json` to enumerate available socket methods in the current build.\n\n## Keyboard Shortcuts (most-used)\n\nWorkspaces: ⌘N new, ⌘1–8 jump, ⌃⌘[ \u002F ⌃⌘] prev\u002Fnext, ⌘⇧W close, ⌘B sidebar.\nSurfaces: ⌘T new, ⌘⇧[ \u002F ⌘⇧] prev\u002Fnext, ⌘W close, ⌃1–8 jump.\nSplits: ⌘D right, ⌘⇧D down, ⌥⌘D browser right, ⌥⌘←→↑↓ focus directional, ⌘⇧↵ zoom.\nBrowser: ⌘⇧L open, ⌘L address bar, ⌘[\u002F⌘] back\u002Fforward, ⌥⌘I devtools.\nApp: ⌘, settings, ⌘⇧, reload-config, ⌘⇧P palette, ⌘⇧O restore session, ⌃⌥⌘. system-wide show\u002Fhide.\n\n## Limitations\n\n- Adapted from `davidondrej\u002Fskills`; verify local paths, tools, credentials, and agent features before acting.\n- For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.\n",{"name":5,"risk":24,"tags":25,"tools":29,"author":32,"source":33,"license":15,"category":34,"date_added":35,"description":7,"source_repo":36,"source_type":33,"license_source":37},"critical",[5,26,27,28],"terminal","agents","macos",[30,31],"claude","codex","davidondrej","community","development","2026-07-07","davidondrej\u002Fskills","https:\u002F\u002Fgithub.com\u002Fdavidondrej\u002Fskills\u002Fblob\u002Fmain\u002FLICENSE","main","b1e4ffadb4f933bbbcaa03a83f8b9929171ac28b",".agents\u002Fskills\u002Fcmux",0,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR","https:\u002F\u002Fgithub.com\u002FHazek-dc","2026-10-22 08:36:44",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill cmux",{"tool":51,"command":52},"bunx","bunx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill cmux",{"tool":54,"command":55},"pnpm","pnpm dlx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill cmux","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcmux\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7DS6GGYRZAYD33PFPS8Z2T3","testing-best-practices","Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftesting-best-practices\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7DS6BC3AW7HTPRHE2TTVKWM","tailwindcss-development","Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex\u002Fgrid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3\u002Fv4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML\u002FCSS component, CSS file audits, build tool configuration, and vanilla CSS.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftailwindcss-development\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7DS66GE6B11MYJDVC74HXM4","laravel-best-practices","Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Flaravel-best-practices\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7DS5ZW717DMS6P1E90AQCKV","infer-conventions","Use this skill to analyze how a Laravel application is actually written and record its conventions as shared rules. Trigger when the user wants to detect, infer, document, or standardize project conventions or coding style, set up or grow `.ai\u002Frules`, resolve mixed or conflicting patterns (e.g. \"are we using Form Requests or inline validation?\"), or onboard agents and teammates to \"how we do things here\". Covers: a systematic sweep of ~49 Laravel convention dimensions (validation, models, architecture, testing, frontend, database, console), open-ended house-pattern discovery, conflict reporting, and recording rules scoped to the right paths via the Boost `record-rule` MCP tool. Only run this skill when the user explicitly asks for it; never start a sweep as part of another task. Do not use for one-off code review, enforcing formatting a linter already handles, or editing `.ai\u002Frules` files by hand.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finfer-conventions\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7DS5W12RGCVJTFQJ1N0GB8E","inertia-react-development","Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using \u003CLink>, \u003CForm>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finertia-react-development\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7DS5PVDPMPCWSK2RXPDC9BB","deploying-to-cloud","Deploys and manages Laravel applications on Laravel Cloud using the `cloud` CLI. Use when the user wants to deploy an app, ship to Cloud, create or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Fdeploying-to-cloud\u002FSKILL.md",[],[]]