[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2KXCCKGWV0GKBD35WMYHF":3,"skill-same:01M6C2KXCCKGWV0GKBD35WMYHF":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":13,"ownerHtmlUrl":58,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":59,"install":60,"resources":73},"01M6C2KXCCKGWV0GKBD35WMYHF","cmux-socket-control","cmux 终端窗格控制","Control cmux tabs, workspaces, and terminal panes via Unix socket. Use when reading terminal output, sending commands to another agent's pane, switching tabs, or monitoring coder progress.","通过 Unix socket 控制 cmux 的标签页（tabs）、工作区（workspaces）和终端窗格（panes）。适用于读取终端输出、向其他智能体（agent）的窗格发送命令、切换标签页或监控编码进度。","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX",null,"01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-08-27-historical-zero-use\u002Fcmux-socket-control\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQJH2SFTXSGVVGVBMDTMWK","桌面自动化与界面操作","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"socket","cmux socket control","cmux","control","switching","when","reading","output","via","progress","unix","terminal","commands","workspaces","use","coder","panes","monitoring","2026-11-10 10:12:30",false,"---\nname: cmux-socket-control\ndescription: Control cmux tabs, workspaces, and terminal panes via Unix socket. Use when reading terminal output, sending commands to another agent's pane, switching tabs, or monitoring coder progress.\n---\n\n## ⚠️ Submit Discipline (MANDATORY — read this before every cmux steer)\n\n`cmux send` does **NOT** press Enter. This is the #1 recurring cmux failure mode\n(verified 2026-07-16: user explicitly flagged \"you always forget to send\" after the\nfable iOS pivot bootstrap). The **4-step ritual** below is a hard contract for every\nsend to a cmux surface. Skip ANY step and the message sits in the input buffer\nwithout ever reaching the agent.\n\n## ⚠️ SUPERSEDED — Use `cmux` CLI, not raw socket protocol (for name → surface resolution)\n\nThe raw `nc -U $SOCK` examples further down still work for low-level access,\nbut they have a **name → surface resolution gap** that has caused repeated\nfailures (\"why do you always get confused when I name a surface\"). The\ncanonical recipe is the `cmux` CLI, which exposes workspace\u002Fsurface\u002Ftab refs\ndirectly.\n\n**Always start here when the user names a surface, tab, or workspace:**\n\n```bash\n# 1. MY workspace = caller.workspace_ref, falling back to focused.\n#    `caller` is populated only when this command runs inside cmux itself;\n#    from a standalone terminal (and from most skill invocations) it is null,\n#    so the defensive form below falls back to the focused workspace.\nWS=$(cmux identify --json | python3 -c '\nimport sys, json\nd = json.load(sys.stdin)\nc = d.get(\"caller\") or {}\nprint(c.get(\"workspace_ref\") or d.get(\"focused\", {}).get(\"workspace_ref\"))\n')\n\n# 2. Every pane + tab by name; ◀ here = caller surface, ◀ active = focus.\n#    Do NOT filter the output — sibling tabs and the ◀ markers are the signal.\ncmux tree --all --workspace \"$WS\"\n\n# 3. Read the target. ⚠ Cross-workspace `cmux read-screen --workspace X\n#    --surface Y` is NOT reliable in current cmux (see\n#    ~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Fsurface-read-routing-bug.md): it can\n#    silently return the focused surface's content. For non-focused surfaces,\n#    use focus-then-read: `cmux focus-surface --workspace \"$WS\" --surface\n#    surface:N` then `cmux read-screen --lines 80` (no --workspace\u002F--surface).\n```\n\n### Three anti-patterns this skill now warns against\n\n- **Global name search** — `cmux list-pane-surfaces | grep \u003Cname>` matches a\n  same-named tab in another workspace and you steer the wrong agent.\n- **grep-filtering the tree** — `cmux tree --all | grep \u003Cname>` hides sibling\n  tabs and the `◀ here` \u002F `◀ active` markers you need to disambiguate.\n- **`list-pane-surfaces` defaults** — defaults to ONE pane and omits tabs in\n  other panes; use `cmux tree --all --workspace \"$WS\"` for the full picture.\n\nThe raw `nc -U $SOCK` blocks below remain useful for low-level debugging\n(`system.tree`, `system.identify`, custom JSON-RPC methods).\n\n### The 4-step ritual\n\n```bash\n# STEP 1 — Type the text. OK response only proves socket acceptance, NOT submission.\ncmux send --workspace workspace:N --surface surface:M \"your message\"\n\n# STEP 2 — Press Enter. send does NOT auto-press Enter.\ncmux send-key --workspace workspace:N --surface surface:M enter\n\n# STEP 3 — Wait 5-15 seconds for the agent to start processing.\nsleep 8\n\n# STEP 4 — Verify with churning label (THE ONLY definitive proof).\ncmux capture-pane --workspace workspace:N --surface surface:M --lines 25\n# Look for one of:\n#   - \"Working (Xs • esc to interrupt)\"\n#   - \"Forming… (Xs · thinking)\"\n#   - \"Precipitating… (Xs · ↓ tokens)\"\n#   - \"Brewed \u002F Churned \u002F Cooked for Xm\"\n# If you see ANY active churning label → SUBMITTED.\n# If the text is still sitting at the ❯ prompt → NOT submitted, repeat step 2.\n# If \"Stopped\" \u002F \"Done\" \u002F nothing → no churn, investigate.\n```\n\n### ⚠️ Output Contract — typed text + terminal response (MANDATORY)\n\nEvery reply that reports a `cmux send` action MUST include, in the same reply:\n\n1. **The exact text that was typed** — verbatim copy of the string passed to `cmux send`.\n2. **The cmux terminal response** — verbatim transcript of what `cmux capture-pane` \u002F\n   `cmux read-screen` returned AFTER the `cmux send-key enter` settle window\n   (typically 5-15s). Specifically, the agent's first action after absorption.\n3. **Submission status** — explicit verdict: \"submitted (churning label X)\",\n   \"not submitted (text still at ❯ prompt)\", or \"blocked (no churn, retried N times)\".\n\n**Treat as not working until we see a response.** A reply that does NOT include\nboth the typed text AND a terminal response is invalid evidence that the\nsteer landed. The operator cannot distinguish a successful send from a failed\nsend that left text in the input buffer.\n\nCanonical contract + echo-back template: `~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Foutput-contract-mandatory.md`.\n\n### ⚠️ LLM-Provenance Caveat (MANDATORY footer)\n\nEvery reply that quotes cmux output, terminal text, or agent actions produced\nby another LLM (the worker agent OR the assistant's own synthesis of agent\noutput) MUST end with this verbatim footer:\n\n> *This was generated from another LLM and not the actual user, so feel free\n> to push back if you disagree and we can discuss.*\n\nFull caveat rules + scope: `~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Foutput-contract-mandatory.md` § \"LLM-Provenance Caveat\".\n\n### Echo-back proof (MANDATORY)\n\nEvery cmux steering action MUST be followed by an **echo-back proof** in the same\nturn or the immediate next turn to your operator (Slack thread, terminal reply,\nor whichever channel triggered the steer). The proof MUST follow the template\nin `~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Foutput-contract-mandatory.md` and include\nthe typed text + terminal response + submission status, not just the\nchurning label.\n\n> ◀ sent to surface:55 (LEFT\u002Fclaudec) at \u003CHH:MM:SS PT> — typed: \"\u003Cfirst 80 chars>\";\n> response: \"\u003Cfirst 80 chars of the churning label or first agent line>\"; status:\n> submitted (churning label \"Forming… 9s · ↓ 4.9k tokens\").\n\n**Banned** (these are the failure modes the user keeps flagging):\n- \"I sent the message\" (no Enter proof)\n- \"The agent should have received it\" (no churning label)\n- `cmux send` with no follow-up `cmux send-key enter`\n- Sending to a surface that hasn't been focused (the global focus may be on a\n  different workspace; use the raw RPC `surface.focus` if needed)\n\n### Worktree-pointer strategy for long briefs\n\nFor task briefs >200 chars (e.g. orchestrating iOS app pivot, multi-PR review),\ndo NOT paste the full text into the input. Write the brief to a file in the\nagent's cwd (e.g. `.cmux-\u003Ctask>-brief.md`) and send a 1-2 line pointer. This\navoids the autocompleter contamination pitfall where shell-style tokens inside\nlong text trigger tab completion mid-stream.\n\n### Canonical reference\n\nFull recipe + edge cases + the 2026-06-25 worked example live at:\n`~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Fsend-submit-proof-2026-06-25.md`\n\nThis rule was added 2026-07-16 after the fable iOS pivot bootstrap surfaced\n\"you always forget to send\" \u002F \"make sure you press submit and the work starts\non the cmux input\" (Slack ts 1784185650.528089). Apply it uniformly to every\ncmux-touching skill.\n\n# cmux Socket Control\n\n## Find the socket\n\n```bash\nSOCK=$(ls \u002Ftmp\u002Fcmux-debug-*.sock \u002Ftmp\u002Fcmux-debug.sock \u002Ftmp\u002Fcmux.sock 2>\u002Fdev\u002Fnull | head -1)\necho \"Using: $SOCK\"\n```\n\nCommon paths:\n- Tagged debug build: `\u002Ftmp\u002Fcmux-debug-\u003Ctag>.sock`\n- Untagged debug: `\u002Ftmp\u002Fcmux-debug.sock`\n- Release: `\u002Ftmp\u002Fcmux.sock`\n\n---\n\n## Rule 1: ALWAYS look up workspace by NAME, never by index\n\nThe user can switch workspaces at any time — indices shift. UUID stays stable.\n\n```bash\nSOCK=\"\u002Ftmp\u002Fcmux-debug-appclick.sock\"\n\n# 1. Find workspace UUID by name\nWS_UUID=$(printf \"list_workspaces\\n\" | nc -U $SOCK | grep \"cmux: ubuntu\" | grep -oE '[A-F0-9-]{36}')\n\n# 2. List surfaces in that workspace\nprintf \"list_surfaces $WS_UUID\\n\" | nc -U $SOCK\n# Output:\n#   * 0: 87DB76A9-...   supervisor (cmux)\n#     1: F05FCE84-...   coder (cmux_coder)\n\n# 3. Extract coder UUID\nCODER_UUID=$(printf \"list_surfaces $WS_UUID\\n\" | nc -U $SOCK | grep \"cmux_coder\\|1:\" | grep -oE '[A-F0-9-]{36}' | head -1)\n```\n\n**Known stable UUIDs (cmux: ubuntu workspace, current session):**\n\n| Surface | UUID | Role |\n|---|---|---|\n| 0 | `87DB76A9-60A8-43FC-BFC2-51A5DECEA9B8` | supervisor (cmux) |\n| 1 | `F05FCE84-ECA7-4944-BCAA-7DFFC105D0D9` | coder (cmux_coder) |\n\nRe-run `list_surfaces` if you get unexpected errors — UUIDs reset on app restart.\n\n---\n\n## Sending to a pane (cross-workspace safe)\n\n`send_surface` works regardless of which workspace the user has focused.\n`send_key_surface` sends key chords.\n\n```bash\nSOCK=\"\u002Ftmp\u002Fcmux-debug-appclick.sock\"\nUUID=\"F05FCE84-ECA7-4944-BCAA-7DFFC105D0D9\"   # cmux_coder\n\n# Human-simulation pattern: clear → type → submit\nprintf \"send_key_surface $UUID ctrl-a\\n\" | nc -U $SOCK\nprintf \"send_key_surface $UUID ctrl-k\\n\" | nc -U $SOCK\nprintf \"send_surface $UUID your message here\\n\" | nc -U $SOCK\nsleep 0.2\nprintf \"send_key_surface $UUID enter\\n\" | nc -U $SOCK\n```\n\n---\n\n## Reading a pane\n\n`read_screen` only works in the **current** workspace (where user is focused).\nUUID-based reads fail cross-workspace. Use git log as fallback.\n\n```bash\n# Read pane (only if user is in the same workspace)\nprintf \"read_screen 1 --lines 40\\n\" | nc -U $SOCK\nprintf \"read_screen 1 --lines 60 --scrollback\\n\" | nc -U $SOCK\n\n# Fallback when cross-workspace: check git for coder progress\ngit -C $HOME\u002Fprojects_reference\u002Fcmux_ubuntu log --oneline -5\n```\n\n---\n\n## Checking if a pane is busy before sending\n\n```bash\nresult=$(printf \"send_surface $UUID probe\\n\" | nc -U $SOCK)\n# \"OK\"                        → idle at prompt, safe to send\n# \"ERROR: Failed to send input\" → running a command, wait and retry\n```\n\n**Wait-until-idle loop:**\n\n```bash\nwhile true; do\n  result=$(printf \"send_surface $UUID probe\\n\" | nc -U $SOCK)\n  if [ \"$result\" = \"OK\" ]; then\n    # Clear the probe text, then send the real message\n    printf \"send_key_surface $UUID ctrl-a\\n\" | nc -U $SOCK\n    printf \"send_key_surface $UUID ctrl-k\\n\" | nc -U $SOCK\n    break\n  fi\n  sleep 2\ndone\n```\n\n---\n\n## Full pattern: find coder + check busy + send task\n\n```bash\nSOCK=\"\u002Ftmp\u002Fcmux-debug-appclick.sock\"\n\n# 1. Find coder by workspace name (index-safe)\nWS_UUID=$(printf \"list_workspaces\\n\" | nc -U $SOCK | grep \"cmux: ubuntu\" | grep -oE '[A-F0-9-]{36}')\nCODER_UUID=$(printf \"list_surfaces $WS_UUID\\n\" | nc -U $SOCK | grep \"1:\" | grep -oE '[A-F0-9-]{36}')\n\n# 2. Check busy\nresult=$(printf \"send_surface $CODER_UUID probe\\n\" | nc -U $SOCK)\nif [ \"$result\" = \"OK\" ]; then\n  # 3. Clear probe, send task\n  printf \"send_key_surface $CODER_UUID ctrl-a\\n\" | nc -U $SOCK\n  printf \"send_key_surface $CODER_UUID ctrl-k\\n\" | nc -U $SOCK\n  printf \"send_surface $CODER_UUID \u003Cyour task here>\\n\" | nc -U $SOCK\n  sleep 0.2\n  printf \"send_key_surface $CODER_UUID enter\\n\" | nc -U $SOCK\nelse\n  echo \"Coder busy — checking git for progress\"\n  git -C $HOME\u002Fprojects_reference\u002Fcmux_ubuntu log --oneline -3\nfi\n```\n\n---\n\n## Common commands reference\n\n```bash\n# Discovery\nprintf \"list_workspaces\\n\"                    | nc -U $SOCK\nprintf \"list_surfaces \u003Cws-uuid>\\n\"            | nc -U $SOCK\n\n# Full hierarchy (v2 protocol — windows, workspaces, panes, surfaces in one call)\nprintf '{\"method\":\"system.tree\"}\\n'           | nc -U $SOCK\nprintf '{\"method\":\"system.identify\"}\\n'       | nc -U $SOCK   # self-location: which pane am I in?\n\n# Read (current workspace only)\nprintf \"read_screen 0 --lines 30\\n\"           | nc -U $SOCK\nprintf \"read_screen 1 --lines 60 --scrollback\\n\" | nc -U $SOCK\n\n# Send (cross-workspace, by UUID)\nprintf \"send_surface \u003Cuuid> \u003Ctext>\\n\"         | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> ctrl-c\\n\"     | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> enter\\n\"      | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> ctrl-a\\n\"     | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> ctrl-k\\n\"     | nc -U $SOCK\n```\n\n---\n\n## Future: MCP server (PR #3, jleechanorg\u002Fcmux)\n\n`scripts\u002Fcmux_mcp_server.py` (Python) and `scripts\u002Fcmux-mcp-server.mjs` (JS) are thin\nMCP adapters over the same socket API. Tool names map to our nc patterns:\n\n| MCP tool | Equivalent nc command |\n|---|---|\n| `cmux_socket_discover` | `ls \u002Ftmp\u002Fcmux*.sock` |\n| `cmux_system_tree` | `{\"method\":\"system.tree\"}` |\n| `cmux_list_workspaces` | `list_workspaces` |\n| `cmux_list_surfaces` | `list_surfaces \u003Cuuid>` |\n| `cmux_send_text` | `send_surface \u003Cuuid> \u003Ctext>` + `send_key_surface enter` |\n| `cmux_read_text` | `read_screen \u003Cindex> --lines N` |\n| `cmux_socket_call` | raw nc pass-through escape hatch |\n| `cmux_select_workspace` | ⚠ maps to `select_workspace` — check focus rules first |\n\nRun: `python scripts\u002Fcmux_mcp_server.py --socket \u002Ftmp\u002Fcmux-debug-appclick.sock`\n\n**Known issues in PR (not yet fixed):** credential leak in error log (mjs:156),\nnon-loopback HTTP binding (mjs:865). Do not expose HTTP port on non-loopback hosts.\n\n---\n\n## Rules (non-negotiable)\n\n1. **Never `select_workspace`** — it visibly switches the user's active workspace\n2. **Always find by workspace NAME** — never hardcode index\n3. **Use UUID for sends** — works cross-workspace without focus change\n4. **UUID reads fail cross-workspace** — use `read_screen \u003Cindex>` only when in the right workspace; otherwise use git log \u002F filesystem\n5. **send_surface types only** — always follow with `send_key_surface enter` to submit\n6. **Clear first** — `ctrl-a` + `ctrl-k` before typing a new message\n7. **Check busy before sending** — probe first, clear probe text on OK\n","## ⚠️ Submit Discipline (MANDATORY — read this before every cmux steer)\n\n`cmux send` does **NOT** press Enter. This is the #1 recurring cmux failure mode\n(verified 2026-07-16: user explicitly flagged \"you always forget to send\" after the\nfable iOS pivot bootstrap). The **4-step ritual** below is a hard contract for every\nsend to a cmux surface. Skip ANY step and the message sits in the input buffer\nwithout ever reaching the agent.\n\n## ⚠️ SUPERSEDED — Use `cmux` CLI, not raw socket protocol (for name → surface resolution)\n\nThe raw `nc -U $SOCK` examples further down still work for low-level access,\nbut they have a **name → surface resolution gap** that has caused repeated\nfailures (\"why do you always get confused when I name a surface\"). The\ncanonical recipe is the `cmux` CLI, which exposes workspace\u002Fsurface\u002Ftab refs\ndirectly.\n\n**Always start here when the user names a surface, tab, or workspace:**\n\n```bash\n# 1. MY workspace = caller.workspace_ref, falling back to focused.\n#    `caller` is populated only when this command runs inside cmux itself;\n#    from a standalone terminal (and from most skill invocations) it is null,\n#    so the defensive form below falls back to the focused workspace.\nWS=$(cmux identify --json | python3 -c '\nimport sys, json\nd = json.load(sys.stdin)\nc = d.get(\"caller\") or {}\nprint(c.get(\"workspace_ref\") or d.get(\"focused\", {}).get(\"workspace_ref\"))\n')\n\n# 2. Every pane + tab by name; ◀ here = caller surface, ◀ active = focus.\n#    Do NOT filter the output — sibling tabs and the ◀ markers are the signal.\ncmux tree --all --workspace \"$WS\"\n\n# 3. Read the target. ⚠ Cross-workspace `cmux read-screen --workspace X\n#    --surface Y` is NOT reliable in current cmux (see\n#    ~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Fsurface-read-routing-bug.md): it can\n#    silently return the focused surface's content. For non-focused surfaces,\n#    use focus-then-read: `cmux focus-surface --workspace \"$WS\" --surface\n#    surface:N` then `cmux read-screen --lines 80` (no --workspace\u002F--surface).\n```\n\n### Three anti-patterns this skill now warns against\n\n- **Global name search** — `cmux list-pane-surfaces | grep \u003Cname>` matches a\n  same-named tab in another workspace and you steer the wrong agent.\n- **grep-filtering the tree** — `cmux tree --all | grep \u003Cname>` hides sibling\n  tabs and the `◀ here` \u002F `◀ active` markers you need to disambiguate.\n- **`list-pane-surfaces` defaults** — defaults to ONE pane and omits tabs in\n  other panes; use `cmux tree --all --workspace \"$WS\"` for the full picture.\n\nThe raw `nc -U $SOCK` blocks below remain useful for low-level debugging\n(`system.tree`, `system.identify`, custom JSON-RPC methods).\n\n### The 4-step ritual\n\n```bash\n# STEP 1 — Type the text. OK response only proves socket acceptance, NOT submission.\ncmux send --workspace workspace:N --surface surface:M \"your message\"\n\n# STEP 2 — Press Enter. send does NOT auto-press Enter.\ncmux send-key --workspace workspace:N --surface surface:M enter\n\n# STEP 3 — Wait 5-15 seconds for the agent to start processing.\nsleep 8\n\n# STEP 4 — Verify with churning label (THE ONLY definitive proof).\ncmux capture-pane --workspace workspace:N --surface surface:M --lines 25\n# Look for one of:\n#   - \"Working (Xs • esc to interrupt)\"\n#   - \"Forming… (Xs · thinking)\"\n#   - \"Precipitating… (Xs · ↓ tokens)\"\n#   - \"Brewed \u002F Churned \u002F Cooked for Xm\"\n# If you see ANY active churning label → SUBMITTED.\n# If the text is still sitting at the ❯ prompt → NOT submitted, repeat step 2.\n# If \"Stopped\" \u002F \"Done\" \u002F nothing → no churn, investigate.\n```\n\n### ⚠️ Output Contract — typed text + terminal response (MANDATORY)\n\nEvery reply that reports a `cmux send` action MUST include, in the same reply:\n\n1. **The exact text that was typed** — verbatim copy of the string passed to `cmux send`.\n2. **The cmux terminal response** — verbatim transcript of what `cmux capture-pane` \u002F\n   `cmux read-screen` returned AFTER the `cmux send-key enter` settle window\n   (typically 5-15s). Specifically, the agent's first action after absorption.\n3. **Submission status** — explicit verdict: \"submitted (churning label X)\",\n   \"not submitted (text still at ❯ prompt)\", or \"blocked (no churn, retried N times)\".\n\n**Treat as not working until we see a response.** A reply that does NOT include\nboth the typed text AND a terminal response is invalid evidence that the\nsteer landed. The operator cannot distinguish a successful send from a failed\nsend that left text in the input buffer.\n\nCanonical contract + echo-back template: `~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Foutput-contract-mandatory.md`.\n\n### ⚠️ LLM-Provenance Caveat (MANDATORY footer)\n\nEvery reply that quotes cmux output, terminal text, or agent actions produced\nby another LLM (the worker agent OR the assistant's own synthesis of agent\noutput) MUST end with this verbatim footer:\n\n> *This was generated from another LLM and not the actual user, so feel free\n> to push back if you disagree and we can discuss.*\n\nFull caveat rules + scope: `~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Foutput-contract-mandatory.md` § \"LLM-Provenance Caveat\".\n\n### Echo-back proof (MANDATORY)\n\nEvery cmux steering action MUST be followed by an **echo-back proof** in the same\nturn or the immediate next turn to your operator (Slack thread, terminal reply,\nor whichever channel triggered the steer). The proof MUST follow the template\nin `~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Foutput-contract-mandatory.md` and include\nthe typed text + terminal response + submission status, not just the\nchurning label.\n\n> ◀ sent to surface:55 (LEFT\u002Fclaudec) at \u003CHH:MM:SS PT> — typed: \"\u003Cfirst 80 chars>\";\n> response: \"\u003Cfirst 80 chars of the churning label or first agent line>\"; status:\n> submitted (churning label \"Forming… 9s · ↓ 4.9k tokens\").\n\n**Banned** (these are the failure modes the user keeps flagging):\n- \"I sent the message\" (no Enter proof)\n- \"The agent should have received it\" (no churning label)\n- `cmux send` with no follow-up `cmux send-key enter`\n- Sending to a surface that hasn't been focused (the global focus may be on a\n  different workspace; use the raw RPC `surface.focus` if needed)\n\n### Worktree-pointer strategy for long briefs\n\nFor task briefs >200 chars (e.g. orchestrating iOS app pivot, multi-PR review),\ndo NOT paste the full text into the input. Write the brief to a file in the\nagent's cwd (e.g. `.cmux-\u003Ctask>-brief.md`) and send a 1-2 line pointer. This\navoids the autocompleter contamination pitfall where shell-style tokens inside\nlong text trigger tab completion mid-stream.\n\n### Canonical reference\n\nFull recipe + edge cases + the 2026-06-25 worked example live at:\n`~\u002F.hermes\u002Fskills\u002Fcmux\u002Freferences\u002Fsend-submit-proof-2026-06-25.md`\n\nThis rule was added 2026-07-16 after the fable iOS pivot bootstrap surfaced\n\"you always forget to send\" \u002F \"make sure you press submit and the work starts\non the cmux input\" (Slack ts 1784185650.528089). Apply it uniformly to every\ncmux-touching skill.\n\n# cmux Socket Control\n\n## Find the socket\n\n```bash\nSOCK=$(ls \u002Ftmp\u002Fcmux-debug-*.sock \u002Ftmp\u002Fcmux-debug.sock \u002Ftmp\u002Fcmux.sock 2>\u002Fdev\u002Fnull | head -1)\necho \"Using: $SOCK\"\n```\n\nCommon paths:\n- Tagged debug build: `\u002Ftmp\u002Fcmux-debug-\u003Ctag>.sock`\n- Untagged debug: `\u002Ftmp\u002Fcmux-debug.sock`\n- Release: `\u002Ftmp\u002Fcmux.sock`\n\n---\n\n## Rule 1: ALWAYS look up workspace by NAME, never by index\n\nThe user can switch workspaces at any time — indices shift. UUID stays stable.\n\n```bash\nSOCK=\"\u002Ftmp\u002Fcmux-debug-appclick.sock\"\n\n# 1. Find workspace UUID by name\nWS_UUID=$(printf \"list_workspaces\\n\" | nc -U $SOCK | grep \"cmux: ubuntu\" | grep -oE '[A-F0-9-]{36}')\n\n# 2. List surfaces in that workspace\nprintf \"list_surfaces $WS_UUID\\n\" | nc -U $SOCK\n# Output:\n#   * 0: 87DB76A9-...   supervisor (cmux)\n#     1: F05FCE84-...   coder (cmux_coder)\n\n# 3. Extract coder UUID\nCODER_UUID=$(printf \"list_surfaces $WS_UUID\\n\" | nc -U $SOCK | grep \"cmux_coder\\|1:\" | grep -oE '[A-F0-9-]{36}' | head -1)\n```\n\n**Known stable UUIDs (cmux: ubuntu workspace, current session):**\n\n| Surface | UUID | Role |\n|---|---|---|\n| 0 | `87DB76A9-60A8-43FC-BFC2-51A5DECEA9B8` | supervisor (cmux) |\n| 1 | `F05FCE84-ECA7-4944-BCAA-7DFFC105D0D9` | coder (cmux_coder) |\n\nRe-run `list_surfaces` if you get unexpected errors — UUIDs reset on app restart.\n\n---\n\n## Sending to a pane (cross-workspace safe)\n\n`send_surface` works regardless of which workspace the user has focused.\n`send_key_surface` sends key chords.\n\n```bash\nSOCK=\"\u002Ftmp\u002Fcmux-debug-appclick.sock\"\nUUID=\"F05FCE84-ECA7-4944-BCAA-7DFFC105D0D9\"   # cmux_coder\n\n# Human-simulation pattern: clear → type → submit\nprintf \"send_key_surface $UUID ctrl-a\\n\" | nc -U $SOCK\nprintf \"send_key_surface $UUID ctrl-k\\n\" | nc -U $SOCK\nprintf \"send_surface $UUID your message here\\n\" | nc -U $SOCK\nsleep 0.2\nprintf \"send_key_surface $UUID enter\\n\" | nc -U $SOCK\n```\n\n---\n\n## Reading a pane\n\n`read_screen` only works in the **current** workspace (where user is focused).\nUUID-based reads fail cross-workspace. Use git log as fallback.\n\n```bash\n# Read pane (only if user is in the same workspace)\nprintf \"read_screen 1 --lines 40\\n\" | nc -U $SOCK\nprintf \"read_screen 1 --lines 60 --scrollback\\n\" | nc -U $SOCK\n\n# Fallback when cross-workspace: check git for coder progress\ngit -C $HOME\u002Fprojects_reference\u002Fcmux_ubuntu log --oneline -5\n```\n\n---\n\n## Checking if a pane is busy before sending\n\n```bash\nresult=$(printf \"send_surface $UUID probe\\n\" | nc -U $SOCK)\n# \"OK\"                        → idle at prompt, safe to send\n# \"ERROR: Failed to send input\" → running a command, wait and retry\n```\n\n**Wait-until-idle loop:**\n\n```bash\nwhile true; do\n  result=$(printf \"send_surface $UUID probe\\n\" | nc -U $SOCK)\n  if [ \"$result\" = \"OK\" ]; then\n    # Clear the probe text, then send the real message\n    printf \"send_key_surface $UUID ctrl-a\\n\" | nc -U $SOCK\n    printf \"send_key_surface $UUID ctrl-k\\n\" | nc -U $SOCK\n    break\n  fi\n  sleep 2\ndone\n```\n\n---\n\n## Full pattern: find coder + check busy + send task\n\n```bash\nSOCK=\"\u002Ftmp\u002Fcmux-debug-appclick.sock\"\n\n# 1. Find coder by workspace name (index-safe)\nWS_UUID=$(printf \"list_workspaces\\n\" | nc -U $SOCK | grep \"cmux: ubuntu\" | grep -oE '[A-F0-9-]{36}')\nCODER_UUID=$(printf \"list_surfaces $WS_UUID\\n\" | nc -U $SOCK | grep \"1:\" | grep -oE '[A-F0-9-]{36}')\n\n# 2. Check busy\nresult=$(printf \"send_surface $CODER_UUID probe\\n\" | nc -U $SOCK)\nif [ \"$result\" = \"OK\" ]; then\n  # 3. Clear probe, send task\n  printf \"send_key_surface $CODER_UUID ctrl-a\\n\" | nc -U $SOCK\n  printf \"send_key_surface $CODER_UUID ctrl-k\\n\" | nc -U $SOCK\n  printf \"send_surface $CODER_UUID \u003Cyour task here>\\n\" | nc -U $SOCK\n  sleep 0.2\n  printf \"send_key_surface $CODER_UUID enter\\n\" | nc -U $SOCK\nelse\n  echo \"Coder busy — checking git for progress\"\n  git -C $HOME\u002Fprojects_reference\u002Fcmux_ubuntu log --oneline -3\nfi\n```\n\n---\n\n## Common commands reference\n\n```bash\n# Discovery\nprintf \"list_workspaces\\n\"                    | nc -U $SOCK\nprintf \"list_surfaces \u003Cws-uuid>\\n\"            | nc -U $SOCK\n\n# Full hierarchy (v2 protocol — windows, workspaces, panes, surfaces in one call)\nprintf '{\"method\":\"system.tree\"}\\n'           | nc -U $SOCK\nprintf '{\"method\":\"system.identify\"}\\n'       | nc -U $SOCK   # self-location: which pane am I in?\n\n# Read (current workspace only)\nprintf \"read_screen 0 --lines 30\\n\"           | nc -U $SOCK\nprintf \"read_screen 1 --lines 60 --scrollback\\n\" | nc -U $SOCK\n\n# Send (cross-workspace, by UUID)\nprintf \"send_surface \u003Cuuid> \u003Ctext>\\n\"         | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> ctrl-c\\n\"     | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> enter\\n\"      | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> ctrl-a\\n\"     | nc -U $SOCK\nprintf \"send_key_surface \u003Cuuid> ctrl-k\\n\"     | nc -U $SOCK\n```\n\n---\n\n## Future: MCP server (PR #3, jleechanorg\u002Fcmux)\n\n`scripts\u002Fcmux_mcp_server.py` (Python) and `scripts\u002Fcmux-mcp-server.mjs` (JS) are thin\nMCP adapters over the same socket API. Tool names map to our nc patterns:\n\n| MCP tool | Equivalent nc command |\n|---|---|\n| `cmux_socket_discover` | `ls \u002Ftmp\u002Fcmux*.sock` |\n| `cmux_system_tree` | `{\"method\":\"system.tree\"}` |\n| `cmux_list_workspaces` | `list_workspaces` |\n| `cmux_list_surfaces` | `list_surfaces \u003Cuuid>` |\n| `cmux_send_text` | `send_surface \u003Cuuid> \u003Ctext>` + `send_key_surface enter` |\n| `cmux_read_text` | `read_screen \u003Cindex> --lines N` |\n| `cmux_socket_call` | raw nc pass-through escape hatch |\n| `cmux_select_workspace` | ⚠ maps to `select_workspace` — check focus rules first |\n\nRun: `python scripts\u002Fcmux_mcp_server.py --socket \u002Ftmp\u002Fcmux-debug-appclick.sock`\n\n**Known issues in PR (not yet fixed):** credential leak in error log (mjs:156),\nnon-loopback HTTP binding (mjs:865). Do not expose HTTP port on non-loopback hosts.\n\n---\n\n## Rules (non-negotiable)\n\n1. **Never `select_workspace`** — it visibly switches the user's active workspace\n2. **Always find by workspace NAME** — never hardcode index\n3. **Use UUID for sends** — works cross-workspace without focus change\n4. **UUID reads fail cross-workspace** — use `read_screen \u003Cindex>` only when in the right workspace; otherwise use git log \u002F filesystem\n5. **send_surface types only** — always follow with `send_key_surface enter` to submit\n6. **Clear first** — `ctrl-a` + `ctrl-k` before typing a new message\n7. **Check busy before sending** — probe first, clear probe text on OK\n",{"name":5,"description":7},"main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf",".claude\u002Fskills_archive\u002F2026-08-27-historical-zero-use\u002Fcmux-socket-control",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill cmux-socket-control",{"tool":66,"command":67},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill cmux-socket-control",{"tool":69,"command":70},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill cmux-socket-control","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-08-27-historical-zero-use\u002Fcmux-socket-control\u002FSKILL.md",true,[],[75,83,90,98,106,115],{"skillNo":76,"name":77,"nameZh":13,"description":78,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":82},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":84,"name":85,"nameZh":13,"description":86,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":82},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":13,"description":93,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":97},"01M7622KQJ32AV4K5BXEMVSSEB","pr","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":99,"name":100,"nameZh":13,"description":101,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":105},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":107,"name":108,"nameZh":13,"description":109,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":110,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":105},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":13,"description":118,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":105},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]