前言¶
在 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/ 等)。
-
決策樹導航
按用戶意圖分流:首次搭建 →start/;接入渠道 →providers/;排錯 →debugging或各模塊的 troubleshooting;配置 →gateway/configuration與concepts/;自動化 →automation/;安裝部署 →install/或platforms/。 -
搜索與發現腳本(位於 Skill 包內
./scripts/)
-sitemap.sh:按分類列出文檔
-search.sh <關鍵詞>:關鍵詞查找
-recent.sh <天數>:最近 N 天有更新的頁面
-fetch-doc.sh <路徑>:拉取指定文檔(如gateway/configuration) -
緩存
cache.sh status/cache.sh refresh查看或刷新 sitemap 緩存(說明中建議優先用緩存,約 1 小時 TTL)。 -
全文索引(可選,依賴 qmd)
build-index.sh fetch下載文檔 →build-index.sh build建索引 →build-index.sh search "查詢"做語義檢索。 -
版本追蹤
track-changes.sh snapshot/list/since <日期>記錄與對比文檔快照。 -
配置代碼段
./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 僅在被 @ 時回覆
- 拉取
providers/discord文檔(fetch-doc.sh providers/discord)。 - 找到
requireMention配置。 - 給出片段並附文檔鏈接:
{
"discord": {
"guilds": {
"*": {
"requireMention": true
}
}
}
}
鏈接:https://docs.clawd.bot/providers/discord
場景二:文檔最近有什麼更新
- 執行
./scripts/recent.sh 7。 - 彙總近 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