Community编程与开发github.com

诊断网关

使用只读单行命令诊断网关、配置、密钥、通道和端口故障。

诊断网关 是什么?

这是一个专为 AI 代理(如 Claude Code、Cursor、Codex)设计的只读诊断技能,用于对 OpenClaw 网关及其相关组件(配置、密钥、通道和端口)进行故障排查。该技能的强大之处在于其严格的只读策略:不执行任何配置写入、服务重启或状态迁移,从而避免了因诊断操作而引入的二次风险。它通过一系列原子化的只读命令(如 `openclaw doctor --lint`、`openclaw gateway status --deep`)收集信息,并指导代理如何识别五种典型的故障模式,包括配置错误、密钥状态异常、通道认证失败、端口冲突和网关崩溃循环。最后,技能要求代理生成一份因果顺序清晰的报告,明确指出每个发现的证据、当前状态,并在需要修复时推荐指定的技能(如 `configure-channel`),从而将诊断与修复安全地分离,适用于所有支持 OpenClaw 管理的平台。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/custodian-skills/diagnose-gateway

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

诊断网关 是做什么的?

本剧本为只读操作:不写入配置、不重启服务、不执行 doctor --fix、不终止监听器。绝不要输出密钥值,仅报告经编辑处理的 SecretRef 所有者状态。每次运行结束时,必须给出可观测的 Prove 结果,或确切说明为何无法证明。

收集

openclaw doctor --lint
openclaw gateway status --deep
openclaw config validate
openclaw channels status
openclaw models status
openclaw channels logs --channel <id>

doctor --lint 是只读的,可能以退出码 1 报告发现:阅读报告并继续其余检查。不要替换为普通的 doctor 或 doctor --non-interactive,它们可能会在未使用 --fix 的情况下复制旧配置并迁移状态。

对于托管安装,可获取受限的近期日志:./scripts/clawlog.sh(仓库检出)或网关启动时打印的日志路径(默认路径为 /tmp/openclaw/openclaw-<date>.log)。

无需猜测即可检查以下迹象:

  • 无效配置或模式错误(config validate 会明确指出确切的键和行号);
  • 降级的 SecretRef 所有者——仅报告所有者,绝不报告其 ID 或值;
  • 过期或被拒绝的通道认证(每个账户的 channels status);
  • EADDRINUSE、第二个网关监听器或服务/配置端口不匹配(lsof -nP -iTCP:<port> -sTCP:LISTEN);
  • 网关崩溃循环:读取网关日志中最后一次启动的堆栈信息;如果配置经过模式验证仍然导致启动崩溃,则属于缺陷——捕获堆栈并报告。

关联时间戳,并识别出第一个所有者边界的故障。

修改

无。不要更改配置、迁移状态或修改服务。诊断命令仍可能产生一些次要的日志或缓存记账。

修复

将每个发现转化为下一步操作,并在存在相应技能时指明其名称:configure-channel、add-model-provider 或 cloud-image-bake。仅建议将 openclaw doctor --fix --non-interactive 作为单独批准的步骤。

证明

重复执行最能暴露问题的最小只读检查,并记录其输出,例如:

openclaw gateway status --deep
openclaw channels status --probe

如果访问、日志或网关不可用,请报告确切阻碍因素,而非声明原因。

报告

按因果顺序列出发现并提供每项证据;当前网关/配置/SecretRef/通道/端口状态;一条推荐的下一步技能或操作员行动。明确声明未执行任何配置/服务修复或状态迁移。

更多参考:https://docs.openclaw.ai/gateway/troubleshooting

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相关技能