agentleFS
owenliang60-ship-itowenliang60-ship-it/knowledge-mgmt/query/SKILL.md

query

Skill37 starsChanged 8 months agoMITView on GitHub

搜索 Obsidian vault 中的已有知识来回答问题。CC 主动读取 MOC 索引和相关 Cards,综合 vault 知识 + 模型知识回答,标注来源。当用户说"query"、"查一下 vault"、"vault 里有什么"、"从笔记里找"时触发。

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use attach-db, install-duckdb 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.
  • duckdbSkill

    attach-db

    Attach a DuckDB database file for use with /duckdb-skills:query. Explores the schema (tables, columns, row counts) and writes a SQL state file so subsequent queries can restore this session automatically via duckdb -init.

    Also in 3 projects that use this

  • carlopiSkill

    install-duckdb

    Install or update DuckDB extensions. Each argument is either a plain extension name (installs from core) or name@repo (e.g. magic@community). Pass --update to update extensions instead of installing.

    Also in 3 projects that use this

  • carlopiSkill

    read-file

    Read and explore any data file (CSV, JSON, Parquet, Avro, Excel, spatial, …) by filename only — resolves the path automatically. Uses DuckDB + the magic extension for format auto-detection. Installs magic if needed.

    Also in 4 projects that use this

  • Google CloudSkill

    ingest

    Extracts, distills, and compiles raw sources (PPTX slide decks, PDFs, Word docs, Excel sheets, web URLs, transcripts, codebases, or raw/ directories) into persistent, structured Knowledge Compiler markdown wikis following the Open Knowledge Format (OKF v0.2) and Andrej Karpathy LLM-Wiki standard. Use when the user invokes /ingest, asks to ingest raw files or a target path, compile knowledge, update the wiki, or extract unstructured files into markdown knowledge bases. Don't use for retrospectively compiling the active chat conversation without external files (use distill-session) or for read-only vault lookups (use vault-query).

    Also in 19 projects that use this

  • NVIDIASkill

    save

    Persist the working library to the run dir and durable catalog. Use for /save.

    Also in 4 projects that use this

  • BugRogerSkill

    project

    Project lifecycle management. Dispatches to Ada.

    Also in 3 projects that use this

The file

Files
SKILL.md

/query — 带 Vault 上下文的知识查询

让 CC 不只靠模型记忆回答,而是主动搜索 vault 中的已有知识。

执行流程

Step 1: 解析查询意图

从用户问题中提取:

  • 关键概念(用于搜索)
  • 涉及的 domain(用于定位 MOC)
  • 查询类型:事实查找 / 综合分析 / 对比 / 探索

Step 2: 搜索 Vault

# 1. 读取相关 MOC 索引
obsidian read path="Cards/MOC-{Domain}.md"

# 2. 搜索关键词
obsidian search query="{关键概念1}"
obsidian search query="{关键概念2}"

# 3. 带上下文搜索(更精确)
obsidian search:context query="{关键短语}"

Step 3: 读取命中的 Cards

# 批量读取搜索结果
for card in {搜索结果}; do
  obsidian read path="$card"
done

优先读取:

  1. 研究摘要(type/research, type/reading)— 综合信息密度最高
  2. 概念卡(type/concept)— 定义和关键要点
  3. 洞察卡(type/insight)— 独特见解
  4. 原子卡片(type/atomic)— 精炼知识点

Step 4: 综合回答

回答原则:

  • Vault 知识优先:vault 中有的信息,标注来源 [[Card名]]
  • 模型知识补充:vault 中没有的,用模型知识补充,明确标注"(模型知识,vault 中暂无)"
  • 诚实告知:如果搜索后 vault 中确实没有相关内容,说"vault 中暂无此主题的笔记"

回答格式:

## 回答

{综合回答,穿插 [[Card名]] 引用}

---
📚 引用了 {N} 张 Cards:[[Card1]] [[Card2]] [[Card3]]
💡 模型补充:{有/无}

Step 5: 回写提议(可选)

如果回答产出了有价值的综合分析:

这个回答包含了跨 Card 的综合分析,值得存为新的对比/综合卡片吗?
→ 说 "note" 走 /note 流程回写
→ 说 "不用" 跳过

不自动回写,用户觉得好才走 /note。

与普通提问的区别

普通提问/query
知识来源模型记忆vault Cards + 模型
溯源无标注来自哪张 Card
搜索范围无MOC → Cards → 全文搜索
沉淀留在对话里可通过 /note 回写

注意事项

  • 搜索结果多时,先读 MOC 索引缩小范围,不要盲目全文搜索
  • 单次查询读取的 Cards 控制在 10 张以内,避免 context 溢出
  • 如果问题跨多个 domain,先搜索各自 MOC 再综合

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.