Clawdbot 文档助手 Skill:用决策树与脚本查官方文档

前言

在 Clawdbot(OpenClaw 生态)里改网关、接 Discord/Telegram、写自动化时,答案往往散落在 docs.clawd.bot 的多级目录里。自己翻站点容易漏页,把整站塞进上下文又浪费 token。下面介绍一个在 Agent 里挂载的 Skill:按问题类型走决策树,再用脚本搜关键词、拉单页、跟版本,并附带常用配置片段。

这是什么

Clawdbot Documentation Expert(SkillHub 坐标 @clawhub_nicholasspisak/clawddocs,当前版本 1.2.2)是面向 Clawdbot 官方文档 的知识类 Skill,来源 clawhub,由 nicholasspisak 发布,分类为 knowledge-management。标签 requires_api_key=false,安装后不需要额外 API Key。

SkillHub 页面:https://www.skillhub.cn/skills/clawhub_nicholasspisak/clawddocs
国内 API 入口:https://api.skillhub.cn/zcwl/clawddocs
上游仓库页:https://clawhub.ai/nicholasspisak/clawddocs

它解决的是:在对话里快速判断「该看哪一类文档」,并用仓库内脚本完成检索与拉取,而不是泛泛的网页摘要。

核心功能

以下能力均来自官方 Skill 说明,面向 Clawdbot 文档体系(start/、gateway/、providers/、concepts/、automation/、install/、platforms/ 等)。

  1. 决策树导航
    按用户意图分流:首次搭建 → start/;接入渠道 → providers/;排错 → debugging 或各模块的 troubleshooting;配置 → gateway/configuration 与 concepts/;自动化 → automation/;安装部署 → install/ 或 platforms/。

  2. 搜索与发现脚本(位于 Skill 包内 ./scripts/)
    - sitemap.sh:按分类列出文档
    - search.sh <关键词>:关键词查找
    - recent.sh <天数>:最近 N 天有更新的页面
    - fetch-doc.sh <路径>:拉取指定文档(如 gateway/configuration)

  3. 缓存
    cache.sh status / cache.sh refresh 查看或刷新 sitemap 缓存(说明中建议优先用缓存,约 1 小时 TTL)。

  4. 全文索引(可选,依赖 qmd)
    build-index.sh fetch 下载文档 → build-index.sh build 建索引 → build-index.sh search "查询" 做语义检索。

  5. 版本追踪
    track-changes.sh snapshot / list / since <日期> 记录与对比文档快照。

  6. 配置代码段
    ./snippets/common-configs.md 提供 Provider、Gateway、Agent 默认值、重试、Cron、Skills 等常见配置模式;回答时可引用并附上 https://docs.clawd.bot/<路径> 来源链接。

推荐工作流:决策树定位 → 不确定则 search.sh → fetch-doc.sh 或浏览器打开 → 需要示例时查 snippets。

安装与启用

通过 SkillHub(国内常用)

先确认本机已有 skillhub CLI(参见 https://skillhub.cn/install/skillhub.md)。安装技能时必须用 --dir 指向当前 Agent 实际读取的 skills 目录,否则默认落在 ./skills/ 且 Agent 不会加载。

command -v skillhub && skillhub --version
skillhub install @clawhub_nicholasspisak/clawddocs --dir <你的 skills 目录>

也可让 AI 按 SkillHub 页面提示,参照 https://skillhub.cn/install/skillhub.md 安装 @clawhub_nicholasspisak/clawddocs。

常见 skills 目录(以官方安装文档为准):

  • Cursor:~/.cursor/skills/
  • Claude Code:~/.claude/skills/
  • Codex:~/.codex/skills/ 或项目下的 .agents/skills/

安装后按所用客户端要求重启或刷新,使 Skill 生效。

通过 ClawHub / OpenClaw

上游页面给出的安装方式为:

openclaw skills install @nicholasspisak/clawddocs

坐标在 ClawHub 侧为 @nicholasspisak/clawddocs,与 SkillHub 的 @clawhub_nicholasspisak/clawddocs 为同一技能的不同源标识,按你当前环境选其一即可。

典型用法

在 Agent 已加载该 Skill 后,用自然语言提问即可;Agent 应按 Skill 内决策树与脚本操作。下面两段来自官方 Example Interactions,说明预期行为。

场景一:Discord 仅在被 @ 时回复

  1. 拉取 providers/discord 文档(fetch-doc.sh providers/discord)。
  2. 找到 requireMention 配置。
  3. 给出片段并附文档链接:
{
  "discord": {
    "guilds": {
      "*": {
        "requireMention": true
      }
    }
  }
}

链接:https://docs.clawd.bot/providers/discord

场景二:文档最近有什么更新

  1. 执行 ./scripts/recent.sh 7。
  2. 汇总近 7 天更新的页面,并按需展开某一页。

本地调试脚本时,需在 Skill 解压目录下执行,例如:

./scripts/search.sh discord
./scripts/fetch-doc.sh gateway/configuration

全文检索需先安装 qmd 并完成 build-index.sh 的 fetch/build 步骤。

适用场景与注意

适合谁

  • 正在配置或运维 Clawdbot / OpenClaw,需要对照官方文档写配置、排错、接 Provider 的开发者。
  • 希望 Agent 按固定流程查文档、引用 snippets,而不是凭记忆编造配置项的人。

限制与注意

  • 范围限定在 Clawdbot 文档(docs.clawd.bot),不是任意产品的文档助手。
  • build-index.sh 依赖 qmd;未建索引时仍以 sitemap、关键词搜索和单页拉取为主。
  • 脚本路径相对于 Skill 包根目录;确保安装目录与 Agent 的 skills 路径一致。
  • SkillHub 统计(截至页面展示):评分 100000,下载约 62024,安装约 5430;以 SkillHub / ClawHub 页面实时数据为准。

结尾

Clawdbot Documentation Expert 把「问什么 → 看哪类文档 → 怎么搜、怎么拉、怎么跟版本」收成一套可复现流程,并附带常用配置片段,适合挂在 Cursor、Claude Code 等支持 Skills 的客户端里做 Clawdbot 文档问答。

  • SkillHub:https://www.skillhub.cn/skills/clawhub_nicholasspisak/clawddocs
  • 国内 API:https://api.skillhub.cn/zcwl/clawddocs
  • 上游:https://clawhub.ai/nicholasspisak/clawddocs
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜