explore-vault
GitHub指导 Agent 在 Vault 中高效查找和阅读笔记。强调先验证标签、属性及文件夹结构,再执行搜索或读取内容。提供搜索失败时的优化策略,如调整关键词匹配逻辑及算法升级,确保检索准确性。
Trigger Scenarios
Install
npx skills add s2b-dev/smart-second-brain --skill explore-vault -g -y
SKILL.md
Frontmatter
{
"name": "explore-vault",
"metadata": {
"author": "S2B",
"version": "1.2",
"category": "core"
},
"description": "Search, read, and explore the user's vault — find notes by tag, property, folder, or keyword, then read their content. Load this before answering any question that depends on what's in the vault; it holds the note-finding procedure (verify tags\/properties\/folders before querying, don't guess) and what to do when a search comes back weak (reformulate, escalate the algorithm once).",
"allowed-tools": "search_notes list_directory read_content grep_notes get_all_tags get_properties execute_javascript"
}
Finding Notes
-
Unknown Organization: If the user asks for a category of notes (e.g. "daily notes", "meetings", "books", "ideas") and you don't know how they are organized:
- If a
dataviewskill is listed in your available skills, load it: a category of notes, a filter by tag/property/date, or a count across notes is one Dataview query returning a compact table, where search plus many reads is not. Still verify the tag and property names below first. - Call
get_all_tagsFIRST to check if a relevant tag exists (e.g. #daily, #meeting, #book). - ALSO call
get_propertiesand omit 'note_name' to check if there are relevant frontmatter properties (e.g. "type", "category", "status"). - If the folder layout matters and you don't know it, call
list_directorywith no path: it returns the top folders with file counts, not file names, so it stays small in any vault. Pass a folder's path only when you need that folder's contents. Never walk the tree to find a note — that is whatsearch_notesandgrep_notesare for. - If you find a matching tag or property, use it to filter your search or query.
- If no relevant tag or property is found, call
search_noteswith a broad term to find example files and see their paths/names/properties. - Do NOT guess tag names, property keys, or folder paths without verifying first.
- If a
-
Verification: Before constructing any query, ALWAYS verify which tags, properties, folders, or keywords actually exist using the steps above.
-
Reading Content:
search_noteswill give you a list of potential matches with metadata.- If the user query contains explicit Obsidian wiki links (e.g. [[Project Plan]]), you may call
read_contentdirectly with those links. - If you need to read the full content of a note and no explicit wiki link is provided, use
read_contentwith the specific file path from the search results.
-
When the first search disappoints: reformulate, don't repeat. Retrying the same words with a bigger limit finds the same notes. Change what you are matching on:
- Use the note's words, not the user's. People ask in their own framing; notes are written in another. "Why do I lose time to interruptions" won't match a note whose vocabulary is "switching", "reload", "batching". Guess the terms the author would have typed and search those.
- For questions about a relationship or direction, search the participants and artifacts instead of the relation. "Feedback I received" and "feedback I gave" are the same words in opposite directions, and retrieval cannot tell them apart — but the names, dates, projects, or meeting types involved are concrete and do match. Search those, then judge direction by reading.
- Escalate the algorithm once, not repeatedly. Start
lexical. If wording looks like the obstacle, retrysemantic(orhybridwhen the query mixes an exact term with a fuzzy concept). Ifsemanticalso fails, the problem is your terms, not the strategy — go back to reformulating. - Decompose a question that spans notes. If the answer needs two facts that likely live apart ("what's holding up X" = the blocker + the thing blocked), search for each separately rather than for the whole question.
- Two or three well-varied searches, then stop. Report what you found and what you could not, rather than continuing to guess. Say which phrasings you tried.
-
Read the
messagefield. When a result includes one, it is authoritative about what actually ran. If it reports that semantic search is unavailable because no embedding index is configured, do not retry withsemanticorhybrid— that cannot change during the conversation. Vary your terms instead. -
Compute, don't estimate. When the answer requires counting, aggregating, or date arithmetic over notes (e.g. "how many meetings in March", a total across notes), don't do it in your head. If the
dataviewskill is available, aGROUP BY/sumquery over the notes' metadata (run without the displayLIMIT— an aggregate must cover every note) is the cheapest way; otherwise collect the raw values with the tools above and run the calculation withexecute_javascript.
Version History
-
2.2.0
Current 2026-09-22 02:53
优化 list_directory 工具输出限制,根目录调用仅返回文件夹概览以节省 Token;调整流程优先检查标签和属性,仅在布局重要时列出根目录,禁止遍历树查找笔记。
- 2.0.5 2026-09-08 21:10


