skills/query/SKILL.md
Searches stored cards by domain, type, status, or keyword. Recommends semantically related cards using AI language understanding. Queries inbox, action, task, area, and project data from the vault index. Use when the user asks to search, find, list, filter, or browse cards, or wants recommendations for related content. Triggers: '搜尋', '找', 'search', 'find', '列出', 'list', '有沒有', '跟X相關的', '有幾張', 'how many', '統計'.
npx skillsauth add VolderLu/TwinMind queryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
TwinMind 查詢引擎。處理所有索引查詢和卡片推薦操作。
本 skill 為唯讀操作,不修改任何檔案,不需調用 /twinmind:post-op。
所有查詢操作皆從 vault-index.json 的記憶體內資料執行,不掃描檔案系統。共通模式:遍歷 notes → 篩選條件 → 回傳匹配欄位 → 空態提示。
當使用者要求列出特定領域的卡片時(如「列出所有 technology 領域的卡片」):
vault-index.json 的 notes 遍歷所有條目domain 陣列包含指定 domain 的 notesdomain 包含任一指定值即匹配title、type、status、path當使用者要求按類型或成熟度篩選卡片時(如「列出所有 seed 狀態的 concept」):
vault-index.json 的 notes 遍歷所有條目type 等於指定值(concept / insight / source / question)status 等於指定值(seed / growing / evergreen)title、type、status、path當使用者以關鍵字搜尋卡片時(如「搜尋跟 Rust 相關的筆記」):
vault-index.json 的 notes 遍歷所有條目title 和 summary 進行比對:
title 匹配的排在前面,僅 summary 匹配的排在後面title、type、status、path、summary當使用者詢問領域分佈(如「各領域有多少卡片?」)時:
vault-index.json 的 stats.domains 取得所有 domain 與計數stats.total_cards 總數stats.domains 為空物件:回報「目前尚無任何領域分類」當使用者要求推薦相關卡片時(如「跟 CAP 定理相關的卡片有哪些?」「有沒有跟記憶體管理相關的筆記?」),AI 執行以下步驟:
Step 1 — 判斷查詢來源
接收使用者的卡片 title 或自然語言描述作為查詢輸入。
vault-index.json 中某筆 note 的 title → 以該卡片為查詢錨點,記錄其 ID(用於自我排除和連結標示)Step 2 — 語意比對
遍歷 vault-index.json 中所有 notes,對每筆 note 進行語意比對:
title、summary、domain 進行語意比較(依賴 Claude 的語言理解能力判斷概念相似度,非向量嵌入)Step 3 — 自我排除
若 Step 1 確認查詢精確匹配某既有卡片,從比對結果中排除該卡片本身。
Step 4 — 已連結標示
若 Step 1 確認了查詢錨點卡片,對每筆推薦結果檢查:
links_to 或 linked_from 中## Connections 區塊,找出關係類型符號Step 5 — 回傳結果
取排序後的前 5 筆結果,每筆包含:
| 欄位 | 說明 | |------|------| | title | 卡片標題 | | type | 卡片類型 | | status | 成熟度 | | path | 檔案路徑 | | reason | 一句話說明為何相關 | | linked | (選填)已連結標示,含關係類型符號 |
邊界情況:
notes 為空物件):回報「知識庫尚無卡片」所有行動層查詢從 vault-index.json 讀取,不掃描檔案。
當使用者詢問 Inbox 狀態時(如「inbox 有什麼待處理」「列出 inbox」):
inbox 篩選符合條件的項目(預設 status == "pending")created 降序排列當使用者詢問 Actions 時(如「列出 actions」「有哪些行動」):
standalone_actions 篩選(預設 status == "active",可指定 all/done)當使用者詢問獨立 Tasks 時(如「列出 tasks」「待辦清單」):
standalone_tasks 讀取當使用者詢問 Areas 時(如「列出 areas」「關注領域」):
areas 讀取,按 status 分組(active / inactive)當使用者詢問特定專案的 actions 或 tasks 時(如「build-blog 的 actions」):
projects[name].actions 讀取 action 列表projects[name].tasks_total / tasks_done 讀取統計PARA/Projects/<name>/actions.md 或 tasks.mdtesting
TwinMind task engine — manages standalone tasks (life chores, errands, quick todos). Use this skill when the user mentions a simple, concrete thing they need to do that doesn't belong to any project or action. Classic triggers: short imperative sentences like '買牛奶', '繳電費', '回覆 email', '預約牙醫', or explicit task operations like '加個待辦', 'add task', 'task done', '完成 task', '刪除 task', 'delete task', '列出 tasks', 'list tasks', '待辦清單'. The distinguishing feature of a standalone task is that it's too small for an Action and not tied to any project. If the user mentions a project name, route to twinmind:project. If it's a multi-step endeavor, consider twinmind:action instead.
tools
Initialize a new TwinMind vault in the current directory. Creates TwinMind.md configuration and vault directory structure from templates. Use when starting a fresh knowledge vault or setting up TwinMind in a new project.
development
Classifies user knowledge-base input into one of 9 intent categories (capture, inbox, query, project, action, task, area, review, connect) using signal words, priority rules, compound intent handling, and fuzzy fallback matching. Invoke BEFORE dispatching to any twinmind:* skill when the user provides knowledge-base input. Do NOT skip this step — the session startup skeleton only has a summary table; this skill has the complete rules needed for accurate classification.
development
TwinMind review and maintenance engine. Use for vault health checks, seed card review, index verification/rebuild, MOC management, and vault status summaries. Triggers on: 'vault status', '知識庫狀況', 'health report', '健康報告', 'verify index', '檢查索引', 'rebuild index', '重建索引', 'review seeds', '有哪些 seed', 'update MOC', or any request about knowledge base maintenance and overview.