name: knowledge-base-collector description: Collect and organize a personal knowledge base from URLs (web/X/WeChat) and screenshots. Use when the user says they want to save an URL, ingest a link, archive content to KB, tag/classify notes, store screenshots, or search their saved knowledge in Telegram. Supports WeChat via a connected macOS node when cloud fetch is blocked.
content.md + meta.json and a global index.jsonl#agent, #coding-agent, #claude-code, #mcp, #rag, #prompt-injection, #security, #pricing, #database)把用户发来的链接/截图沉淀到共享知识库(KB),并做标签化整理。
/home/ubuntu/.openclaw/kbkb/20_Inbox/urls/index.jsonlkb/20_Inbox/urls/<YYYY-MM>/<item>/content.md + meta.json目标:先入库不丢,再迭代“摘要/标签/检索”。
运行脚本:
python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/ingest_url.py "<URL>" --tags "#optional" --note "context"
行为:
- 自动识别来源(web/x/wechat)
- 优先用 r.jina.ai 抽取正文(无需登录)
- 公众号遇到风控会写占位条目:status=blocked_verification + tag #needs-manual
- 对同一 URL 做 key 去重(已存在则跳过)
更多技能请访问小葱技能站7w4.net。
当云端抓取命中“环境异常/验证”时:
- 如果有已连接的 macOS 节点(例如 Reed-Mac)且该节点能访问该文章,可用 nodes.run 在节点上执行抓取(requests+bs4),然后写入 KB。
- 注意:这条路径依赖节点在线与网络环境;无法承诺 100%。
脚本:
python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/ingest_image.py /path/to/image.jpg \
--text-file /path/to/ocr.txt \
--title "..." --tags "#ai #product" --note "..."
说明:
- ingest_image.py 负责“落盘+索引”。OCR 可用:
- 本机 tesseract(若安装了 tesseract-ocr + chi_sim)
- 或用多模态 LLM 抽取文字后写入 --text-file
推荐先用脚本(本机/服务器):
python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/search_kb.py --q "claude code" --limit 10
python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/search_kb.py --tags "#claude-code #coding-agent" --limit 20
python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/search_kb.py --source wechat --since 7d --q "Elys"
python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/wechat_backlog.py --limit 30
python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/weekly_digest.py --days 7 --limit 30
REDACTED)。这个 Skill 整体质量不错,功能覆盖完整,从收集链接到分类整理再到检索都能支持。使用第三方服务提取网页内容比较可靠,标签分类支持中文也做得较好。主要不足是图片内容需要自己先做 OCR 文字提取才能入库,以及搜索能力比较基础,对大量数据可能不够用。整体适合个人知识沉淀使用,但还有优化空间。