Knowledge Base Collector

👤 reed1898 📦 v0.1.3 ⭐ 4.3 ⬇️ 2.3K 下載
📚 知識管理 免費

📖 技能介紹


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.


Summary

  • Ingest: web URLs, X/Twitter links, WeChat Official Account links (mp.weixin.qq.com), and screenshots
  • Store: writes to a shared KB folder with per-item content.md + meta.json and a global index.jsonl
  • Organize: tag-first classification with richer tags (e.g. #agent, #coding-agent, #claude-code, #mcp, #rag, #prompt-injection, #security, #pricing, #database)
  • WeChat: cloud fetch may be blocked; when a macOS node (e.g. Reed-Mac) is online, prefer node-side fetch to improve success rate; otherwise create a placeholder entry
  • Search: designed to support Telegram Q&A / search flows on top of the index and content

把使用者發來的連結/截圖沉澱到共享知識庫(KB),並做標籤化整理。

預設 KB 位置

  • KB Root(可改):/home/ubuntu/.openclaw/kb
  • 索引:kb/20_Inbox/urls/index.jsonl
  • 每條內容目錄:kb/20_Inbox/urls/<YYYY-MM>/<item>/content.md + meta.json

目標:先入庫不丟,再迭代“摘要/標籤/檢索”。

你要做的事(按輸入型別)

1) 普通網頁 / X(Twitter) / 公眾號 URL 入庫

執行指令碼:

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 去重(已存在則跳過)

WeChat 更高成功率(推薦路徑)

當雲端抓取命中“環境異常/驗證”時: - 如果有已連線的 macOS 節點(例如 Reed-Mac)且該節點能訪問該文章,可用 nodes.run 在節點上執行抓取(requests+bs4),然後寫入 KB。 - 注意:這條路徑依賴節點線上與網路環境;無法承諾 100%。

2) 截圖/圖片入庫(含 OCR 文本)

指令碼:

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

Telegram 裡直接問(檢索)

推薦先用指令碼(本機/伺服器):

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

週報/主題報告候選清單(給 LLM 寫總結用)

python3 /home/ubuntu/.openclaw/skills/knowledge-base-collector/scripts/weekly_digest.py --days 7 --limit 30

來源於7w4.net。

重要注意事項(安全/隱私)

  • 截圖/網頁可能包含 token/驗證碼/金鑰:入庫前應做脫敏(替換為 REDACTED)。
  • 公眾號抓取受風控影響:建議允許“佔位入庫”,後續再補全。

🤖 AI 評測

這個 Skill 整體質量不錯,功能覆蓋完整,從收集連結到分類整理再到檢索都能支援。使用第三方服務提取網頁內容比較可靠,標籤分類支援中文也做得較好。主要不足是圖片內容需要自己先做 OCR 文字提取才能入庫,以及搜尋能力比較基礎,對大量資料可能不夠用。整體適合個人知識沉澱使用,但還有最佳化空間。

📊 多維度評分

適應性4.4
規範性4.1
有效性4.5
可靠性4.1
可信度4.7

📁 包含檔案 (8 個)

📄 SKILL.md 3.7 KB
📄 _meta.json 143 B
📄 scripts/ingest_image.py 4.7 KB
📄 scripts/ingest_url.py 8 KB
📄 scripts/search_kb.py 4.4 KB
📄 scripts/tagger.py 3.8 KB
📄 scripts/wechat_backlog.py 2.1 KB
📄 scripts/weekly_digest.py 3.1 KB