Query logo

Query

Community
owenliang60-ship-it
query

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

Overview

Publisherowenliang60-ship-it
Repositoryknowledge-mgmt
Skill namequery
Stars
39
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by owenliang60-ship-it on GitHub. Read the source before you install it.

Installation

Install the Query AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/owenliang60-ship-it/knowledge-mgmt/tree/main/query
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/owenliang60-ship-it/knowledge-mgmt.git /tmp/knowledge-mgmt
mkdir -p .claude/skills
cp -r /tmp/knowledge-mgmt/query .claude/skills/query
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Query in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Query on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Query is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

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

执行流程

Step 1: 解析查询意图

从用户问题中提取:

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

Step 2: 搜索 Vault

bash
# 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

bash
# 批量读取搜索结果
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 中暂无此主题的笔记"

回答格式:

markdown
## 回答

{综合回答,穿插 [[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 再综合

Frequently asked questions

What does the Query AI skill do?

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

Why use Query on TypingMind?

Because you install it once and use it with any model. Query is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Query in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/owenliang60-ship-it/knowledge-mgmt/tree/main/query. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Query?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Query?

As many as you like. As long as a model supports skills, you can use Query with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Query AI skill free?

Yes. It is published on GitHub by owenliang60-ship-it under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇