Diagnose Gateway, config, secrets, channels, and port failures with read-only one-liners.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-diagnose-gateway-20bbe1f8bffd ,按照其中的说明把「diagnose-gateway」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This playbook is read-only: no config writes, no service restarts, no doctor --fix, no killing listeners. Never print secret values; report only redacted SecretRef owner state. Every run ends with the observable Prove result or an exact explanation of why it could not be proven.
openclaw doctor --lint
openclaw gateway status --deep
openclaw config validate
openclaw channels status
openclaw models status
openclaw channels logs --channel <id>
doctor --lint is read-only and can exit 1 for findings: read the report and continue the remaining checks. Do not substitute ordinary doctor or doctor --non-interactive; they can copy legacy config and migrate state without --fix.
On managed installs, bounded recent logs: ./scripts/clawlog.sh (repo checkout) or the log path printed at gateway startup (/tmp/openclaw/openclaw-<date>.log by default).
Check these signatures without guessing:
config validate names the exact key and line);channels status per account);EADDRINUSE, a second gateway listener, or service/config port mismatch (lsof -nP -iTCP:<port> -sTCP:LISTEN);Correlate timestamps and identify the first owner-boundary failure.
Nothing. Do not change config, migrate state, or alter services. Diagnostic commands may still produce incidental logs or cache bookkeeping.
Translate each finding into the next action, naming the responsible skill when one exists: configure-channel, add-model-provider, or cloud-image-bake. Recommend openclaw doctor --fix --non-interactive only as a separately approved step.
Repeat the smallest read-only probe that exposes the condition and record its output, for example:
openclaw gateway status --deep
openclaw channels status --probe
If access, logs, or the gateway are unavailable, report that exact blocker rather than declaring a cause.
Findings in causal order with evidence for each; current gateway/config/SecretRef/channel/port state; one recommended next skill or operator action. State explicitly that no config/service repairs or state migrations were performed.
Further reference: https://docs.openclaw.ai/gateway/troubleshooting