6 custom skills (assign-task, dispatch-webhook, daily-briefing, task-capture, qmd-brain, tts-voice) with technical documentation. Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
1.9 KiB
1.9 KiB
name, description, triggers, tools
| name | description | triggers | tools | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| qmd-brain | 第二大腦知識庫搜尋與索引。用 qmd(BM25+向量混合)搜尋本地 markdown 文件,並透過 PostgreSQL pgvector 進行深度語意搜尋。 |
|
|
qmd-brain Skill
功能說明
第二大腦(Second Brain)知識庫搜尋工具,整合兩層搜尋:
| 層次 | 工具 | 特色 |
|---|---|---|
| Layer 1 | qmd (BM25 全文搜尋) | 快速關鍵字比對,本地 SQLite |
| Layer 2 | embed_to_pg (語意搜尋) | 向量相似度,PostgreSQL pgvector |
觸發範例
使用者:「幫我找關於 nginx 設定的資料」
→ qmd search "nginx 設定" → 返回相關文件段落
使用者:「之前有記過 Telegram bot 的設定嗎?」
→ embed_to_pg search "Telegram bot token 設定" → 語意搜尋
使用者:「更新知識庫索引」
→ qmd embed + embed_to_pg embed
使用者:「查知識庫統計」
→ qmd collection list + embed_to_pg stats
搜尋策略
- 關鍵字搜尋(qmd search):適合確定的詞彙、指令、設定名稱
- 語意搜尋(embed_to_pg search):適合概念性問題、模糊記憶
- 混合搜尋:先用 qmd 快速篩選,再用 pgvector 重排
輸出格式
搜尋結果包含:
- 文件來源(檔案路徑)
- 相關段落(前 200 字)
- 相似度分數
重要路徑
qmd 索引: ~/.cache/qmd/index.sqlite
pgvector DB: postgresql://qmd_user@localhost/qmd_brain
embed 腳本: /home/selig/apps/qmd-pg/embed_to_pg.py
qmd collections:selig-home (/home/selig)
每日排程
凌晨 02:00 自動執行:
qmd embed(更新 BM25 + 本地向量索引)embed_to_pg embed(更新 PostgreSQL 向量庫)