[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C21FXF01KNEBCF0FZTZKAH":3,"skill-same:01M6C21FXF01KNEBCF0FZTZKAH":80},{"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":54,"linkOnly":55,"markdownContent":56,"markdownBody":57,"frontMatter":58,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":13,"ownerHtmlUrl":64,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":65,"install":66,"resources":79},"01M6C21FXF01KNEBCF0FZTZKAH","cross-machine-ssh-tier","跨机器 SSH\u002FTailscale 连接阶梯","Reusable SSH-first-then-Tailscale transport ladder for reaching peer machines. Tier 1 is LAN SSH via a `~\u002F.ssh\u002Fconfig` alias; Tier 2 is Tailscale SSH with explicit `-i ~\u002F.ssh\u002Fid_\u003Cpeer>` key, looked up live (never hardcoded); Tier 3 is a Slack channel watched by a reactive messaging-gateway agent, for when both are down. Used by `mac-remote`, `linux-remote`, `mac-mirror`, `linux-mirror`.","用于连接对等机器的可复用传输阶梯，优先使用 SSH，其次是 Tailscale。第 1 层是通过 `~\u002F.ssh\u002Fconfig` 别名进行的局域网 SSH；第 2 层是 Tailscale SSH，使用显式的 `-i ~\u002F.ssh\u002Fid_\u003Cpeer>` 密钥，且该密钥实时查找（绝不硬编码）；第 3 层是一个由响应式消息网关智能体监听的 Slack 频道，用于前两层均不可用时的兜底。由 `mac-remote`、`linux-remote`、`mac-mirror`、`linux-mirror` 使用。","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\u002Fcross-machine-ssh-tier\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],"ssh","machine","cross machine ssh tier","mac","when","down","for","mirror","with","remote","id","alias","peer","reusable","slack","up","never","channel","first","tailscale","gateway","messaging","config","linux","2026-11-10 10:12:30",false,"---\nname: cross-machine-ssh-tier\ndescription: \"Reusable SSH-first-then-Tailscale transport ladder for reaching peer machines. Tier 1 is LAN SSH via a `~\u002F.ssh\u002Fconfig` alias; Tier 2 is Tailscale SSH with explicit `-i ~\u002F.ssh\u002Fid_\u003Cpeer>` key, looked up live (never hardcoded); Tier 3 is a Slack channel watched by a reactive messaging-gateway agent, for when both are down. Used by `mac-remote`, `linux-remote`, `mac-mirror`, `linux-mirror`.\"\n---\n\n# Cross-machine SSH tier ladder\n\nSingle source of truth for the \"try LAN, then Tailscale, then Slack\" transport escalation. Re-used verbatim by:\n\n- [`mac-remote`](..\u002Fmac-remote\u002FSKILL.md) and [`linux-remote`](..\u002Flinux-remote\u002FSKILL.md) — ad hoc SSH steering\n- Locally retained `mac-mirror` and `linux-mirror` integrations — hand off a committed branch + tmux resume when available\n\nThe two mirror integrations are excluded from a fresh shared-catalog install.\nFor a requested mirror handoff, resolve `..\u002Fmac-mirror\u002FSKILL.md` or\n`..\u002Flinux-mirror\u002FSKILL.md` relative to this package and read the named integration\nonly when its SKILL.md already exists. If it is absent, that mirror handoff is unavailable:\nreport the missing host integration, preserve local state, and do not invent\nbranch-transfer\u002Ftmux-resume actions or install a replacement workflow. Ad hoc\nSSH steering through mac-remote\u002Flinux-remote is independent of mirror availability;\nuse the existing authorized host configuration for that separately requested task.\n\nKeep this ladder in sync across all four consumers. If you change the tier definitions or the fallback policy, update the four consumers in the same commit.\n\nSubstitute your own host alias \u002F IP \u002F key path \u002F username \u002F channel everywhere a placeholder (`mylinux`, `mymac`, `myusername`, `#my-fallback-channel`) appears below.\n\n## Tier definitions\n\n| Tier | Transport | When it applies | Failure mode |\n|---|---|---|---|\n| **1** | LAN SSH via `~\u002F.ssh\u002Fconfig` alias (e.g. `mymac` \u002F `mylinux`) | Both machines on the same home LAN | `Connection refused` when off-LAN or peer's `sshd` is down |\n| **2** | Tailscale SSH, explicit `-i ~\u002F.ssh\u002Fid_\u003Cpeer>` key, target IP looked up live via `tailscale status` | Tier 1 refused (off-LAN) and Tailscale mesh is healthy | `tailscaled` not running on either side, peer offline, or the explicit key is missing\u002Fhas the wrong mode |\n| **3** | A Slack channel (or similar) watched by a reactive messaging-gateway agent on the peer | Tier 1 and Tier 2 both unreachable | Only human-typed posts trigger it; bot\u002Fapp-attributed messages are silently dropped by design on most gateways. OAuth token must include the relevant history\u002Fmention read scopes (reinstall the app to the workspace after manifest changes — see Tier 3 caveat below). |\n\n## Why a `~\u002F.ssh\u002Fconfig` alias does NOT fail over to Tier 2 automatically\n\n`Host mymac` in `~\u002F.ssh\u002Fconfig` resolves a single `HostName` (e.g. a LAN IP). SSH has no concept of \"try LAN first, fall back to Tailscale\"; when the LAN IP is unreachable, you get `Connection refused` and the connection ends. You cannot set two `HostName` entries and have SSH retry them — you must do the tier selection in your own script (see ladder below) and **then** call `ssh` with the resolved target + key.\n\n## The ladder\n\nParameterize by peer:\n\n- `mymac` → LAN alias `mymac`, Tailscale peer name pattern `mymac`, key `~\u002F.ssh\u002Fid_mymac`\n- `mylinux` → LAN alias `mylinux`, Tailscale peer name pattern matching your Linux box's hostname, key `~\u002F.ssh\u002Fid_mylinux`\n\nAfter this block runs, `$SSH_TARGET` holds either the LAN alias (Tier 1) or `myusername@\u003Ctailscale-ip>` (Tier 2), or is empty (Tier 3 — fall through to your surrounding code's `if [ -n \"$SSH_TARGET\" ]` guard).\n\nIf your caller runs under `set -u` (nounset), expanding `\"${SSH_ARGS[@]}\"` while `SSH_ARGS=()` is still empty (the Tier 1 success path) throws `unbound variable` on macOS's stock bash 3.2 — bash's own array-expansion-under-nounset bug, fixed in 4.4+. Use `\"${SSH_ARGS[@]+\"${SSH_ARGS[@]}\"}\"` in a `set -u` context, or just don't set `-u` around this block.\n\n```bash\n# Inputs:\n#   PEER_LAN_ALIAS   — e.g. \"mymac\" or \"mylinux\"\n#   PEER_TS_PATTERN  — awk pattern for `tailscale status`, e.g. \"mymac\" or \"mylinux\"\n#   PEER_KEY         — absolute key path, e.g. \"$HOME\u002F.ssh\u002Fid_mymac\"\n#   PEER_USER        — remote login user, e.g. \"myusername\"\n# Outputs:\n#   SSH_ARGS   — extra args for `ssh` (Tier 2 sets `-i \u003Ckey>`; Tier 1 leaves empty)\n#   SSH_TARGET — destination string, or empty if both Tier 1 and Tier 2 failed\nSSH_ARGS=()\nSSH_TARGET=\"$PEER_LAN_ALIAS\"   # Tier 1 default: the LAN alias\n\nif ssh -o ConnectTimeout=5 -o BatchMode=yes \"$SSH_TARGET\" true 2>\u002Fdev\u002Fnull; then\n  echo \"SSH_OK via Tier 1 (LAN alias)\"\nelse\n  # Tier 2 — Tailscale SSH (off-LAN fallback). Re-verify the IP every call;\n  # never hardcode it — Tailscale IPs are stable per-device but can change\n  # on key rotations or mesh reconfiguration. Match against the hostname\n  # column ($2) only, not the whole line ($0, awk's default) — matching\n  # the whole line lets a pattern like \"mac\" match an unrelated peer's OS\n  # column (\"macOS\") instead of the intended hostname. `-v pat=` avoids\n  # interpolating $PEER_TS_PATTERN straight into the awk program text.\n  # `exit` after the first hit makes \"first match wins\" actually true —\n  # without it, multiple matching peers concatenate into one multi-line\n  # $TS_IP and silently produce a garbage $SSH_TARGET.\n  TS_IP=$(tailscale status | awk -v pat=\"$PEER_TS_PATTERN\" '$2 ~ pat {print $1; exit}')\n  SSH_ARGS=(-i \"$PEER_KEY\")\n  SSH_TARGET=\"${PEER_USER}@${TS_IP}\"\n  if ssh \"${SSH_ARGS[@]}\" -o ConnectTimeout=5 -o BatchMode=yes \"$SSH_TARGET\" true 2>\u002Fdev\u002Fnull; then\n    echo \"SSH_OK via Tier 2 (Tailscale)\"\n  else\n    SSH_TARGET=\"\"   # both Tier 1 and Tier 2 failed — caller must handle Tier 3\n  fi\nfi\n```\n\nConcrete invocations:\n\n```bash\n# Reaches mymac — note the key is `id_mymac`, NOT the Linux peer's key\nPEER_LAN_ALIAS=\"mymac\"\nPEER_TS_PATTERN=\"mymac\"     # matches your Mac's Tailscale hostname\nPEER_KEY=\"$HOME\u002F.ssh\u002Fid_mymac\"\nPEER_USER=\"myusername\"\n\n# Reaches mylinux — key is `id_mylinux`\nPEER_LAN_ALIAS=\"mylinux\"\nPEER_TS_PATTERN=\"mylinux\"   # matches your Linux box's Tailscale hostname\nPEER_KEY=\"$HOME\u002F.ssh\u002Fid_mylinux\"\nPEER_USER=\"myusername\"\n```\n\n## Tier 3 — messaging-gateway fallback\n\nWhen `$SSH_TARGET` is empty after the Tier 1\u002F2 ladder, both LAN and Tailscale SSH are unreachable. Post the full hand-off context (repo path, branch, commit SHA, exact next-command) to a channel a reactive gateway agent on the peer machine is watching (e.g. a Hermes-style gateway, or anything that runs commands on your behalf). It has no shared context with your current session — give complete, explicit instructions, don't assume it can infer intent from prior conversation turns.\n\n### Tier 3 caveats\n\n- **Only human-typed messages trigger a response, on most gateways.** Messages posted via a bot-associated token (including API calls using an OAuth-app-issued user token) commonly get silently dropped by design. If this tier ever goes quiet, check OAuth scopes-vs-reinstall status before assuming a connection\u002Fsocket problem — see the discriminating check below, it's usually the faster diagnosis.\n- **OAuth scope mismatches after a manifest edit are a common, easy-to-miss root cause.** A connection can report fully healthy — process alive, socket\u002Fsession established, ping\u002Fpong succeeding — while a specific required permission was declared in the integration's manifest but never actually granted to the live credential (e.g. added to a Slack app's manifest after the app was already installed — the scope isn't live until the app is reinstalled\u002Freauthorized). **Discriminating check:** call the platform's own auth-introspection endpoint with the gateway's actual live credential (for Slack: `auth.test`, or attempt the specific scoped call you need and read the error — `missing_scope` names the gap directly) rather than trusting the integration's own settings UI, which can show a scope as \"configured\" when it was never granted. **Remedy:** reinstall\u002Freauthorize the app so the currently-declared scopes actually take effect — a bare process\u002Fservice restart does not do this.\n- **A message-filtering rule you're tripping as a test artifact, not a real failure.** Many gateways correctly drop messages attributed to a bot\u002Fapp identity by default (including messages posted via some *other* app's OAuth-issued token, which platforms often tag with that app's identity even when the underlying account is a real human). Verify with a message you know is genuinely human-originated — typed directly in the client, not posted via any API token — before concluding the gateway itself is broken.\n- **No shared context with your current session.** The receiving gateway has no idea what you've already tried or what state you're in. Post a complete, self-contained message — repo + branch + commit + exact next-command — addressed generally (most gateways need no special mention syntax; a plain human-typed message in the channel is sufficient, and mention syntax can even be filtered out by the same bot-detection rule if it originates from an API token).\n- Only after ruling both scope-mismatch and message-filtering out is it worth suspecting the connection layer itself — enable debug-level logging on the gateway process and check its actual log destination, which for a systemd-managed service is the journal (e.g. `journalctl --user -u \u003Cservice>`), or the equivalent launchd log for a macOS service — not necessarily its own app log file, which may not show this level of detail.\n\n## Key selection — name keys after the peer they connect to, not the local machine\n\nThe SSH key used on machine A to reach machine B should be named for B (the peer), not for A. This lets each machine's `authorized_keys` be read by file name to see which direction\u002Fpeer each key belongs to:\n\n- Connecting mymac ← mylinux: key on mylinux is `~\u002F.ssh\u002Fid_mymac` (named for the peer it talks to), authorized in mymac's `~\u002F.ssh\u002Fauthorized_keys`.\n- Connecting mylinux ← mymac: key on mymac is `~\u002F.ssh\u002Fid_mylinux` (named for the peer it talks to), authorized in mylinux's `~\u002F.ssh\u002Fauthorized_keys`.\n\nThe ladder above encodes the right key by peer — do not swap them.\n\n## IP re-verification pattern\n\nNever hardcode a Tailscale IP in committed code. Even \"last known\" values go stale on tailscale key rotations or mesh reconfiguration. Use:\n\n```bash\n# All live Tailscale peers (one IP per line) — plain `tailscale status`\n# output has no literal \"peer\" token per line, so match everything:\ntailscale status | awk '{print $1}'\n\n# A specific peer — match column 2 (hostname) only, not the whole line, and\n# stop at the first hit (see the Tier 2 ladder block above for why both\n# matter: matching $0 can hit an unrelated peer's OS column, and omitting\n# `exit` can produce a multi-line result instead of one IP).\ntailscale status | awk -v pat=\"$PEER_TS_PATTERN\" '$2 ~ pat {print $1; exit}'\n```\n\nA single peer usually has exactly one IP; if a peer rotates keys, both the old and new IPs may show briefly — the `exit` after the first match is what actually makes \"first match wins\" true here (a plain `awk '\u002Fpat\u002F{print $1}'` with no `exit` prints every matching line, not just the first). If the pattern matches zero peers, `TS_IP` is empty and the Tier 2 ssh call fails fast with a hostname-resolution error, which is the correct outcome (caller falls through to Tier 3).\n","# Cross-machine SSH tier ladder\n\nSingle source of truth for the \"try LAN, then Tailscale, then Slack\" transport escalation. Re-used verbatim by:\n\n- [`mac-remote`](..\u002Fmac-remote\u002FSKILL.md) and [`linux-remote`](..\u002Flinux-remote\u002FSKILL.md) — ad hoc SSH steering\n- Locally retained `mac-mirror` and `linux-mirror` integrations — hand off a committed branch + tmux resume when available\n\nThe two mirror integrations are excluded from a fresh shared-catalog install.\nFor a requested mirror handoff, resolve `..\u002Fmac-mirror\u002FSKILL.md` or\n`..\u002Flinux-mirror\u002FSKILL.md` relative to this package and read the named integration\nonly when its SKILL.md already exists. If it is absent, that mirror handoff is unavailable:\nreport the missing host integration, preserve local state, and do not invent\nbranch-transfer\u002Ftmux-resume actions or install a replacement workflow. Ad hoc\nSSH steering through mac-remote\u002Flinux-remote is independent of mirror availability;\nuse the existing authorized host configuration for that separately requested task.\n\nKeep this ladder in sync across all four consumers. If you change the tier definitions or the fallback policy, update the four consumers in the same commit.\n\nSubstitute your own host alias \u002F IP \u002F key path \u002F username \u002F channel everywhere a placeholder (`mylinux`, `mymac`, `myusername`, `#my-fallback-channel`) appears below.\n\n## Tier definitions\n\n| Tier | Transport | When it applies | Failure mode |\n|---|---|---|---|\n| **1** | LAN SSH via `~\u002F.ssh\u002Fconfig` alias (e.g. `mymac` \u002F `mylinux`) | Both machines on the same home LAN | `Connection refused` when off-LAN or peer's `sshd` is down |\n| **2** | Tailscale SSH, explicit `-i ~\u002F.ssh\u002Fid_\u003Cpeer>` key, target IP looked up live via `tailscale status` | Tier 1 refused (off-LAN) and Tailscale mesh is healthy | `tailscaled` not running on either side, peer offline, or the explicit key is missing\u002Fhas the wrong mode |\n| **3** | A Slack channel (or similar) watched by a reactive messaging-gateway agent on the peer | Tier 1 and Tier 2 both unreachable | Only human-typed posts trigger it; bot\u002Fapp-attributed messages are silently dropped by design on most gateways. OAuth token must include the relevant history\u002Fmention read scopes (reinstall the app to the workspace after manifest changes — see Tier 3 caveat below). |\n\n## Why a `~\u002F.ssh\u002Fconfig` alias does NOT fail over to Tier 2 automatically\n\n`Host mymac` in `~\u002F.ssh\u002Fconfig` resolves a single `HostName` (e.g. a LAN IP). SSH has no concept of \"try LAN first, fall back to Tailscale\"; when the LAN IP is unreachable, you get `Connection refused` and the connection ends. You cannot set two `HostName` entries and have SSH retry them — you must do the tier selection in your own script (see ladder below) and **then** call `ssh` with the resolved target + key.\n\n## The ladder\n\nParameterize by peer:\n\n- `mymac` → LAN alias `mymac`, Tailscale peer name pattern `mymac`, key `~\u002F.ssh\u002Fid_mymac`\n- `mylinux` → LAN alias `mylinux`, Tailscale peer name pattern matching your Linux box's hostname, key `~\u002F.ssh\u002Fid_mylinux`\n\nAfter this block runs, `$SSH_TARGET` holds either the LAN alias (Tier 1) or `myusername@\u003Ctailscale-ip>` (Tier 2), or is empty (Tier 3 — fall through to your surrounding code's `if [ -n \"$SSH_TARGET\" ]` guard).\n\nIf your caller runs under `set -u` (nounset), expanding `\"${SSH_ARGS[@]}\"` while `SSH_ARGS=()` is still empty (the Tier 1 success path) throws `unbound variable` on macOS's stock bash 3.2 — bash's own array-expansion-under-nounset bug, fixed in 4.4+. Use `\"${SSH_ARGS[@]+\"${SSH_ARGS[@]}\"}\"` in a `set -u` context, or just don't set `-u` around this block.\n\n```bash\n# Inputs:\n#   PEER_LAN_ALIAS   — e.g. \"mymac\" or \"mylinux\"\n#   PEER_TS_PATTERN  — awk pattern for `tailscale status`, e.g. \"mymac\" or \"mylinux\"\n#   PEER_KEY         — absolute key path, e.g. \"$HOME\u002F.ssh\u002Fid_mymac\"\n#   PEER_USER        — remote login user, e.g. \"myusername\"\n# Outputs:\n#   SSH_ARGS   — extra args for `ssh` (Tier 2 sets `-i \u003Ckey>`; Tier 1 leaves empty)\n#   SSH_TARGET — destination string, or empty if both Tier 1 and Tier 2 failed\nSSH_ARGS=()\nSSH_TARGET=\"$PEER_LAN_ALIAS\"   # Tier 1 default: the LAN alias\n\nif ssh -o ConnectTimeout=5 -o BatchMode=yes \"$SSH_TARGET\" true 2>\u002Fdev\u002Fnull; then\n  echo \"SSH_OK via Tier 1 (LAN alias)\"\nelse\n  # Tier 2 — Tailscale SSH (off-LAN fallback). Re-verify the IP every call;\n  # never hardcode it — Tailscale IPs are stable per-device but can change\n  # on key rotations or mesh reconfiguration. Match against the hostname\n  # column ($2) only, not the whole line ($0, awk's default) — matching\n  # the whole line lets a pattern like \"mac\" match an unrelated peer's OS\n  # column (\"macOS\") instead of the intended hostname. `-v pat=` avoids\n  # interpolating $PEER_TS_PATTERN straight into the awk program text.\n  # `exit` after the first hit makes \"first match wins\" actually true —\n  # without it, multiple matching peers concatenate into one multi-line\n  # $TS_IP and silently produce a garbage $SSH_TARGET.\n  TS_IP=$(tailscale status | awk -v pat=\"$PEER_TS_PATTERN\" '$2 ~ pat {print $1; exit}')\n  SSH_ARGS=(-i \"$PEER_KEY\")\n  SSH_TARGET=\"${PEER_USER}@${TS_IP}\"\n  if ssh \"${SSH_ARGS[@]}\" -o ConnectTimeout=5 -o BatchMode=yes \"$SSH_TARGET\" true 2>\u002Fdev\u002Fnull; then\n    echo \"SSH_OK via Tier 2 (Tailscale)\"\n  else\n    SSH_TARGET=\"\"   # both Tier 1 and Tier 2 failed — caller must handle Tier 3\n  fi\nfi\n```\n\nConcrete invocations:\n\n```bash\n# Reaches mymac — note the key is `id_mymac`, NOT the Linux peer's key\nPEER_LAN_ALIAS=\"mymac\"\nPEER_TS_PATTERN=\"mymac\"     # matches your Mac's Tailscale hostname\nPEER_KEY=\"$HOME\u002F.ssh\u002Fid_mymac\"\nPEER_USER=\"myusername\"\n\n# Reaches mylinux — key is `id_mylinux`\nPEER_LAN_ALIAS=\"mylinux\"\nPEER_TS_PATTERN=\"mylinux\"   # matches your Linux box's Tailscale hostname\nPEER_KEY=\"$HOME\u002F.ssh\u002Fid_mylinux\"\nPEER_USER=\"myusername\"\n```\n\n## Tier 3 — messaging-gateway fallback\n\nWhen `$SSH_TARGET` is empty after the Tier 1\u002F2 ladder, both LAN and Tailscale SSH are unreachable. Post the full hand-off context (repo path, branch, commit SHA, exact next-command) to a channel a reactive gateway agent on the peer machine is watching (e.g. a Hermes-style gateway, or anything that runs commands on your behalf). It has no shared context with your current session — give complete, explicit instructions, don't assume it can infer intent from prior conversation turns.\n\n### Tier 3 caveats\n\n- **Only human-typed messages trigger a response, on most gateways.** Messages posted via a bot-associated token (including API calls using an OAuth-app-issued user token) commonly get silently dropped by design. If this tier ever goes quiet, check OAuth scopes-vs-reinstall status before assuming a connection\u002Fsocket problem — see the discriminating check below, it's usually the faster diagnosis.\n- **OAuth scope mismatches after a manifest edit are a common, easy-to-miss root cause.** A connection can report fully healthy — process alive, socket\u002Fsession established, ping\u002Fpong succeeding — while a specific required permission was declared in the integration's manifest but never actually granted to the live credential (e.g. added to a Slack app's manifest after the app was already installed — the scope isn't live until the app is reinstalled\u002Freauthorized). **Discriminating check:** call the platform's own auth-introspection endpoint with the gateway's actual live credential (for Slack: `auth.test`, or attempt the specific scoped call you need and read the error — `missing_scope` names the gap directly) rather than trusting the integration's own settings UI, which can show a scope as \"configured\" when it was never granted. **Remedy:** reinstall\u002Freauthorize the app so the currently-declared scopes actually take effect — a bare process\u002Fservice restart does not do this.\n- **A message-filtering rule you're tripping as a test artifact, not a real failure.** Many gateways correctly drop messages attributed to a bot\u002Fapp identity by default (including messages posted via some *other* app's OAuth-issued token, which platforms often tag with that app's identity even when the underlying account is a real human). Verify with a message you know is genuinely human-originated — typed directly in the client, not posted via any API token — before concluding the gateway itself is broken.\n- **No shared context with your current session.** The receiving gateway has no idea what you've already tried or what state you're in. Post a complete, self-contained message — repo + branch + commit + exact next-command — addressed generally (most gateways need no special mention syntax; a plain human-typed message in the channel is sufficient, and mention syntax can even be filtered out by the same bot-detection rule if it originates from an API token).\n- Only after ruling both scope-mismatch and message-filtering out is it worth suspecting the connection layer itself — enable debug-level logging on the gateway process and check its actual log destination, which for a systemd-managed service is the journal (e.g. `journalctl --user -u \u003Cservice>`), or the equivalent launchd log for a macOS service — not necessarily its own app log file, which may not show this level of detail.\n\n## Key selection — name keys after the peer they connect to, not the local machine\n\nThe SSH key used on machine A to reach machine B should be named for B (the peer), not for A. This lets each machine's `authorized_keys` be read by file name to see which direction\u002Fpeer each key belongs to:\n\n- Connecting mymac ← mylinux: key on mylinux is `~\u002F.ssh\u002Fid_mymac` (named for the peer it talks to), authorized in mymac's `~\u002F.ssh\u002Fauthorized_keys`.\n- Connecting mylinux ← mymac: key on mymac is `~\u002F.ssh\u002Fid_mylinux` (named for the peer it talks to), authorized in mylinux's `~\u002F.ssh\u002Fauthorized_keys`.\n\nThe ladder above encodes the right key by peer — do not swap them.\n\n## IP re-verification pattern\n\nNever hardcode a Tailscale IP in committed code. Even \"last known\" values go stale on tailscale key rotations or mesh reconfiguration. Use:\n\n```bash\n# All live Tailscale peers (one IP per line) — plain `tailscale status`\n# output has no literal \"peer\" token per line, so match everything:\ntailscale status | awk '{print $1}'\n\n# A specific peer — match column 2 (hostname) only, not the whole line, and\n# stop at the first hit (see the Tier 2 ladder block above for why both\n# matter: matching $0 can hit an unrelated peer's OS column, and omitting\n# `exit` can produce a multi-line result instead of one IP).\ntailscale status | awk -v pat=\"$PEER_TS_PATTERN\" '$2 ~ pat {print $1; exit}'\n```\n\nA single peer usually has exactly one IP; if a peer rotates keys, both the old and new IPs may show briefly — the `exit` after the first match is what actually makes \"first match wins\" true here (a plain `awk '\u002Fpat\u002F{print $1}'` with no `exit` prints every matching line, not just the first). If the pattern matches zero peers, `TS_IP` is empty and the Tier 2 ssh call fails fast with a hostname-resolution error, which is the correct outcome (caller falls through to Tier 3).\n",{"name":5,"description":7},"main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf",".claude\u002Fskills\u002Fcross-machine-ssh-tier",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill cross-machine-ssh-tier",{"tool":72,"command":73},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill cross-machine-ssh-tier",{"tool":75,"command":76},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill cross-machine-ssh-tier","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcross-machine-ssh-tier\u002FSKILL.md",true,[],[81,89,96,104,112,121],{"skillNo":82,"name":83,"nameZh":13,"description":84,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"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":90,"name":91,"nameZh":13,"description":92,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":88},"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":97,"name":98,"nameZh":13,"description":99,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":103},"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":105,"name":106,"nameZh":13,"description":107,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":111},"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":113,"name":114,"nameZh":13,"description":115,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":116,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":111},"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":122,"name":123,"nameZh":13,"description":124,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":111},"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",[],[]]