agentleFS
VastFutureVastFuture/llm-wiki-skills/skills/wiki-query/SKILL.md

wiki-query

Skill0 starsChanged 3 months agoMITView on GitHub

查询 LLM Wiki 知识库。先读 wiki/index.md 定位相关页面,深入阅读后综合答案并带引用。 有价值的查询结果自动归档到 wiki/综合/ 目录。触发词:查一下、wiki里有没有、搜索知识库。

41 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 9 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

  • 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

  • nathanadaySkill

    almagest

    Orient in the Almagest vault, say what waits for the user, do the work a request asks in a linked repository, and route any other request to the skill that owns it. Use for /almagest, what is going on, status, what waits for me, where do I work on X, work on X, fix this, implement, build, note this, remember to, publish my journal, what is in my journals, and any request when the right skill is not clear. Keeping part of this conversation is wiki-save; files to learn from are wiki-ingest.

    Also in 3 projects that use this

  • +5 more from Ivy-Chen1999

The file

Files
SKILL.md

/wiki-query — 查询知识库

从 LLM Wiki 知识库中查询信息。先定位后深入,有价值的答案自动归档。

查询流程

步骤 0:读取配置

在执行查询前,先确定知识库路径:

  1. 读取配置文件:
    • 优先项目模式:检查当前目录是否存在 wiki-config.json(scope: "project")
    • 全局模式:~/.config/opencode/wiki-config.json(scope: "global")
  2. 从配置中获取 kbPath(知识库根目录)
  3. 若配置不存在或 kbPath 为空,提示用户先执行 /wiki-init 初始化知识库
  4. wiki/ 目录即 {kbPath}/wiki/,raw/ 即配置中的 rawPath

步骤 1:先读目录

读取 {kbPath}/wiki/index.md,定位与问题相关的页面

步骤 2:深入阅读

逐个阅读 {kbPath}/wiki/ 下的相关页面,理解上下文

步骤 3:综合答案

跨页面综合信息,形成完整答案,附引用

步骤 4:归档判断

判断答案是否值得长期保留,值得则归档到 {kbPath}/wiki/综合/

归档规则

以下情况应将答案归档为新的 wiki 页面:

  • 比较分析(如:A 和 B 的优缺点对比)
  • 新发现的跨页面关联
  • 需要反复查阅的综合答案
  • 深度研究报告

归档目录:wiki/综合/

文件命名:保持 wikilink 兼容,以问题主题命名

不归档的情况

  • 简单的事实性回答
  • 不需要复用的临时问题
  • 可以从现有页面直接得到的答案

输出要求

  • 使用简体中文
  • 附带来源引用(页面路径 + 章节)
  • 多页面综合时注明跨页面关联

工具使用规则

更新 index.md、log.md 等累积性文件时:

  • 必须先用 Read 读取当前内容
  • 必须用 Edit 工具做增量修改(追加、替换)
  • 禁止用 Write 工具覆盖整个文件

Write 工具仅用于:

  • 创建全新文件
  • 用户明确要求覆盖整个文件

脚本执行优先级

需要执行脚本操作时,按以下顺序选择实现方式:

  1. Python — 检测到 Python 环境则优先使用
  2. Linux — Shell 脚本(bash/sh)
  3. Windows + Git Bash — 用 Git Bash 执行
  4. Windows(无 Git Bash) — PowerShell

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.