From obsidian-tools
Obsidian 知识库问答。当用户想要查询知识库、基于笔记回答问题、在知识库中搜索信息时触发此 skill。也支持通过文章 ID(OBA-{8位随机ID})直接定位文章。
How this skill is triggered — by the user, by Claude, or both
Slash command
/obsidian-tools:ob-chatThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<role>Obsidian 知识库问答助手,通过索引优先的方式从知识库中检索并综合回答用户问题。</role>
Obsidian 知识库问答助手,通过索引优先的方式从知识库中检索并综合回答用户问题。 基于 wiki/index.md 导航知识库,选择最相关的文章综合回答。
触发词:
- 问一下知识库
- 查询笔记
- ob-chat
- 知识库问答
- 在我的笔记中查找
- 根据我的知识库回答
文章 ID 触发(自动识别):
- 用户消息中包含 OBA-{8位随机ID} 格式的 ID(如 OBA-k7jm2p9q, OBA-xn8btf3w)
- 自动理解为"基于该 ID 对应的 Obsidian 文章回答问题"
- 无需显式调用 ob-chat
示例:
- "ob-chat RLHF 和 chain-of-thought 有什么关系?"
- "在我的知识库中查找关于 Transformer 的内容"
- "问一下:注意力机制和 RLHF 有什么共同点?"
- "OBA-k7jm2p9q 里提到的终端跳转方案,能详细解释下吗?"
- "看看 OBA-xn8btf3w 这篇文章"
requires=OBSIDIAN_REPO; focus=query,answer
通过索引优先检索从知识库中找到最相关文章,综合回答用户问题,并将答案归档回 wiki 实现知识复利。
**委托 ob-router skill** 解析当前激活仓库路径,读取 wiki/index.md 作为导航入口。
从索引中定位 1-2 个最相关子分类,选择 3-5 篇具体文章。
读取选中的完整文章,综合回答用户问题,带 [[wikilinks]] 引用。
</gsd:workflow>
基于索引的知识库问答,答案归档实现知识复利。
【硬约束】仓库路径一律委托 ob-router skill 解析,本 skill 不自行读取路径文件。
调用 ob-router skill 获取 $OBSIDIAN_REPO:
ob-router init 持久化将 ob-router 返回的路径保存为 $OBSIDIAN_REPO,后续全程使用此变量。
4. 检查 $OBSIDIAN_REPO/wiki/index.md 是否存在
5. 如果不存在,提示用户先运行 ob-index 初始化知识库
检查用户消息是否包含文章 ID(格式 OBA-[a-z0-9]{8}):
index.md 中查找匹配行,获取文件路径[OBA-{id}] 引用来源查找路径:遍历 $OBSIDIAN_REPO/wiki/projects/*/index.md,匹配表格中 ID 列。
用户提到多个 ID 时:读取所有匹配文章,综合回答。
读取 $OBSIDIAN_REPO/wiki/index.md,获取知识库全局导航。
如果索引文件过长(超过 200 行):
如果知识库为空:
知识库索引为空。请先使用 ob-collect 采集内容或使用 ob-index 初始化知识库。
从索引的一行摘要中,选择 3-5 篇最相关的文章。
选择标准:
展示检索过程:
索引检索:
→ 分类:概念 → 选中 3 篇
- [[concepts/rlhf]] — "用人类反馈强化学习对齐语言模型"
- [[concepts/chain-of-thought]] — "引导模型逐步推理的提示技术"
- [[concepts/attention]] — "让模型动态权衡 token 相关性"
→ 分类:来源 → 选中 2 篇
- [[sources/instructgpt]] — "OpenAI 的 RLHF 实践"
- [[sources/cot-paper]] — "Chain-of-Thought 原始论文"
[[wikilinks]] 引用> [!code-ref] 的内容,作为"相关代码"部分展示回答格式:
## {回答标题}
{综合回答内容,使用 [[wikilinks]] 引用相关概念}
### 相关代码
> [!code-ref] {从文章中提取的 code-ref,直接展示}
> ...
---
### 参考
- [[sources/{来源 1}]]
- [[concepts/{概念 1}]]
- [[synthesis/{综合文章}]]
- [OBA-{id}] {文章标题}(如涉及项目知识文章)
code-ref 展示规则:
文章 ID 展示规则:
[OBA-{id}] + 文章标题如果知识库中没有足够信息回答问题:
知识库中未找到足够信息回答此问题。
已有相关内容:
- [[concepts/{相关概念}]] — 部分相关
建议采集以下内容以补充知识库:
1. {建议的来源/文章}
2. {建议的来源/文章}
将"无法回答"本身也记录为知识缺口,追加到 log.md。
npx claudepluginhub wangjs-jacky/jacky-skills --plugin obsidian-toolsScans, creates, and organizes notes in an Obsidian vault with wikilinks and index notes. Activates when the user needs to search, create, or manage notes.
Open-ended Q&A against the knowledge base. Locates candidate pages with one call to the deterministic retrieval script (.knowlery/bin/query.mjs), then reads the promising ones with Obsidian CLI and synthesizes an evidence-based answer with citations. Use when the user asks questions about vault content like "what is X", "why did we decide Y", "explain Z", "what do my notes say about", "summarize what I know about", or any question that should be answered from accumulated knowledge rather than general training data.
Queries the knowledge base with a question, synthesizes answers from relevant KB files using keyword matching and indexes, and optionally files results as new KB articles.