agentleFS
81895626sun-rgb81895626sun-rgb/claude-obsidian-wiki/skills/wiki-query/SKILL.md

wiki-query

Skill0 starsChanged 7 months agoMITView on GitHub

针对 Obsidian 风格 wiki 知识库提问并获取综合回答。当用户说"查知识库"、"wiki 里有没有"、"/wiki-query",或者提出一个可以从 wiki 中回答的问题时触发。适用于已建立索引、知识地图和 wiki 页面目录的知识库。

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use wiki-capture, wiki-update and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jehrhardtSkill

    wiki-capture

    Quickly capture raw thoughts, links, images, or notes to today's Obsidian daily note from anywhere in Pi. Use when the user wants to jot something down for later wiki processing.

    Also in 6 projects that use this

  • bozhouDevSkill

    wiki-update

    Use when revising existing wiki pages because knowledge has changed, a new piece of information updates or contradicts existing content, or the user wants to directly edit wiki content with LLM assistance.

    Also in 9 projects that use this

  • Ivy-Chen1999Skill

    wiki-setup

    Initialize a new Obsidian wiki vault with the correct structure, special files, and configuration. Use this skill when the user wants to set up a new wiki from scratch, initialize the vault structure, create the .env file, or says things like "set up my wiki", "initialize obsidian", "create a new vault", "get started with the wiki". Also use when the user needs to reconfigure their existing vault or fix a broken setup.

    Also in 5 projects that use this

  • Ivy-Chen1999Skill

    wiki-research

    Autonomously research a topic via multi-round web search, synthesize findings, and file structured results into the Obsidian wiki. Use this skill when the user says "/wiki-research [topic]", "research X", "find everything about Y", "do a deep dive on Z", "autonomous research on X", or wants comprehensive, web-sourced knowledge on a topic filed directly into their wiki.

    Also in 4 projects that use this

  • bozhouDevSkill

    wiki-init

    Use when bootstrapping a new personal wiki for any knowledge domain — research, codebase documentation, reading notes, competitive analysis, or any long-term knowledge accumulation project.

    Also in 7 projects that use this

  • justvinhhereSkill

    wiki-review

    Use when the user runs /review, says "show pending changes", "what's uncommitted", or wants an audit of uncommitted wiki edits before they land in history. Narrates uncommitted changes, flags structural issues scoped to those changes, and commits them with a conventional subject. Fully automatic.

    Also in 8 projects that use this

  • +5 more from Ivy-Chen1999

The file

Files
SKILL.md

Wiki Query

针对 wiki 知识库提问,综合多个页面生成带引用的回答。好的回答可以归档为新 wiki 页面。

默认配置约定

本插件是一个偏 Obsidian、偏中文知识库的默认实现。公开版不再绑定某个私有路径,但仍假设你有一套结构化 vault。

默认约定如下:

  • VAULT_ROOT:你的知识库根目录
  • INDEX_FILE:_Index.md
  • KNOWLEDGE_MAP_FILE:知识地图.md
  • WIKI_DIR:wiki/
  • LOG_FILE:log.md
  • 引用格式:Obsidian wikilink(如 [[页面名]])
  • 回答语言:中文

如果你的文件名、目录名或回答语言不同,请先按需修改本 skill 中的这些默认约定。

执行流程

第一步:理解问题

分析用户的问题,判断类型:

  • 事实查询:"FRP 怎么配置?" → 定位具体页面
  • 对比分析:"Cloudflare Tunnel 和 FRP 哪个更适合我?" → 跨页面综合
  • 综合判断:"我的 K8s 部署方案有哪些?" → 聚合同分类多篇内容
  • 关联发现:"AI 视频生成和运维有什么关系?" → 跨分类交叉分析

第二步:检索相关页面

  1. 读取 <VAULT_ROOT>/<INDEX_FILE>,根据问题关键词定位相关分类和页面
  2. 如果索引不够精确,用 Grep 在 <VAULT_ROOT>/<WIKI_DIR> 目录下搜索关键词
  3. 读取所有相关的 wiki 页面(通常 2-8 篇)

第三步:生成回答

根据问题类型选择回答形式:

  • 事实查询 → 直接引用相关页面内容,给出简洁答案
  • 对比分析 → 生成对比表格,列出各方案的优劣
  • 综合判断 → 生成结构化摘要,按维度组织
  • 关联发现 → 画出关联关系,解释连接逻辑

回答规则:

  • 每个论点必须标注来源页面:(见 [[页面名]])
  • 如果 wiki 中没有足够信息回答,明确说明"wiki 中暂无相关内容",并建议用户补充什么资料
  • 如果发现 wiki 中的信息有矛盾,指出矛盾并列出两方来源

第四步:询问归档

回答完成后,询问用户:

这个回答要归档为新 wiki 页面吗?

适合归档的回答:

  • 对比分析(如"K8s 部署方案对比")
  • 综合判断(如"内网穿透方案选型")
  • 关联发现(如"AI 工作流与运维基础设施的依赖关系")

不需要归档的回答:

  • 简单事实查询(直接看原页面就行)
  • 一次性问题

第五步:归档(用户确认后)

如果用户选择归档:

  1. 确定页面名称(与用户确认)
  2. 按 wiki-add 的页面模板生成新页面,但 source 字段留空(因为来源是 wiki 自身)
  3. 在关联笔记中链接所有被引用的 wiki 页面
  4. 更新 <VAULT_ROOT>/<INDEX_FILE> 和 <VAULT_ROOT>/<KNOWLEDGE_MAP_FILE>
  5. 在 <VAULT_ROOT>/<LOG_FILE> 追加记录:
## [YYYY-MM-DD] query-archive | 页面名称
- 问题:用户的原始问题
- 引用页面:PageA, PageB, PageC
- 分类:归入的分类

第六步:记录日志

无论是否归档,都在 <VAULT_ROOT>/<LOG_FILE> 追加查询记录:

## [YYYY-MM-DD] query | 问题关键词
- 引用页面:PageA, PageB
- 是否归档:是/否

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.