名称: clawd-docs-v2
描述: 智能访问 ClawdBot 文档,具备本地搜索索引、缓存片段和按需获取功能。兼顾令牌效率与内容新鲜度。
主页: https://docs.clawd.bot/
元数据: {"clawdbot":{"emoji":"📚"}}
版本: 2.2.0
本技能提供对 ClawdBot 文档的智能访问,具备以下特性:
- 本地搜索索引 - 即时关键词查找(0令牌消耗)
- 缓存片段 - 预获取的常见问题答案(约300-500令牌)
- 按需获取 - 需要时获取完整页面(约8-12k令牌)
- 新鲜度跟踪 - 按页面类型设置TTL(生存时间)
在获取任何内容之前,先检查是否存在黄金片段:
ls ~/clawd/data/docs-snippets/
可用片段(优先检查缓存!):
| 片段 | 匹配查询 |
|---------|---------------|
| telegram-setup.md | "ako nastaviť telegram", "telegram setup" |
| telegram-allowfrom.md | "allowFrom", "kto mi môže písať", "access control" |
| oauth-troubleshoot.md | "token expired", "oauth error", "credentials" |
| update-procedure.md | "ako updatnuť", "update clawdbot" |
| restart-gateway.md | "restart", "reštart", "stop/start" |
| config-basics.md | "config", "nastavenie", "konfigurácia" |
| config-providers.md | "pridať provider", "discord setup", "nový kanál" |
| memory-search.md | "memory", "vector search", "pamäť", "embeddings" |
读取片段:
cat ~/clawd/data/docs-snippets/telegram-setup.md
检查 ~/clawd/data/docs-index.json 获取页面建议。
关键词匹配示例:
- "telegram" → channels/telegram
- "oauth" → concepts/oauth, gateway/troubleshooting
- "update" → install/updating
- "config" → gateway/configuration
在通过 brightdata 获取之前,检查页面是否已缓存:
# 路径转换:concepts/memory → concepts_memory.md
ls ~/clawd/data/docs-cache/ | grep "concepts_memory"
如果存在,本地读取(0令牌!):
cat ~/clawd/data/docs-cache/concepts_memory.md
使用原生的 web_fetch 工具(Clawdbot 核心功能 - 免费且快速!):
web_fetch({ url: "https://docs.clawd.bot/{path}", extractMode: "markdown" })
示例:
web_fetch({ url: "https://docs.clawd.bot/tools/skills", extractMode: "markdown" })
web_fetch 优势对比:
| | web_fetch | brightdata |
|---|-----------|------------|
| 成本 | $0(免费!) | ~$0.003/次 |
| 速度 | ~400毫秒 | 2-5秒 |
| 质量 | Markdown ✅ | Markdown ✅ |
位置: ~/clawd/data/docs-index.json
{
"pages": [
{
"path": "channels/telegram",
"ttl_days": 7,
"keywords": ["telegram", "tg", "bot", "allowfrom"]
}
],
"synonyms": {
"telegram": ["tg", "telegrambot"],
"configuration": ["config", "nastavenie", "settings"]
}
}
使用同义词进行模糊匹配。
| 页面类别 | TTL | 原因 |
|---|---|---|
install/updating |
1 天 | 始终保持最新! |
gateway/* |
7 天 | 配置变更 |
channels/* |
7 天 | 提供商更新 |
tools/* |
7 天 | 功能新增 |
concepts/* |
14 天 | 很少变更 |
reference/* |
30 天 | 稳定模板 |
检查片段过期时间:
head -10 ~/clawd/data/docs-snippets/telegram-setup.md | grep expires
~/clawd/data/docs-snippets/telegram-setup.md~/clawd/data/docs-snippets/telegram-allowfrom.md~/clawd/data/docs-snippets/oauth-troubleshoot.md~/clawd/data/docs-snippets/update-procedure.mdweb_fetch({ url: "https://docs.clawd.bot/tools/skills", extractMode: "markdown" })web_fetch({ url: "https://docs.clawd.bot/concepts/multi-agent", extractMode: "markdown" })如果找不到所需内容:
web_fetch({ url: "https://docs.clawd.bot/llms.txt", extractMode: "markdown" })
返回完整列表,包含所有文档页面。
| 方法 | 令牌消耗 | 使用时机 |
|---|---|---|
| 黄金片段 | ~300-500 | ✅ 始终优先使用! |
| 搜索索引 | 0 | 关键词查找 |
| 完整页面获取 | ~8-12k | 最后手段 |
| 批量获取 | ~20-30k | 多个相关主题 |
80-90% 的查询都应通过片段回答!
~/clawd/data/
├── docs-index.json # 搜索索引
├── docs-stats.json # 使用情况跟踪
├── docs-snippets/ # 缓存的黄金片段
│ ├── telegram-setup.md
│ ├── telegram-allowfrom.md
│ ├── oauth-troubleshoot.md
│ ├── update-procedure.md
│ ├── restart-gateway.md
│ └── config-basics.md
└── docs-cache/ # 完整页面缓存(未来功能)
| 项目 | 值 |
|---|---|
| 技能版本 | 2.1.0 |
| 创建时间 | 2026-01-14 |
| 更新时间 | 2026-01-26 |
| 作者 | Claude Code + Clawd(协作) |
| 源地址 | https://docs.clawd.bot/ |
| 依赖项 | web_fetch(Clawdbot 核心工具) |
| 索引页面 | ~50 个核心页面 |
| 黄金片段 | 7 个预缓存 |
本技能提供智能文档访问 - 始终优先使用缓存片段,仅在必要时进行获取。