Query logo

Query

Community
jinchenma94
query

只读查询个人知识库并用本地证据回答问题,或为选题、观点、主题和待论证内容生成可追溯的创作素材包。区分个人观点、个人经历、外部证据、历史输出、冲突与缺口;不写入或修复页面。

Overview

Publisherjinchenma94
Repositoryjinchenma-knowledge-base
Skill namequery
Stars
29
Forks
4
Bundled files
Instructions only
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 jinchenma94 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/jinchenma94/jinchenma-knowledge-base/tree/main/skills/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/jinchenma94/jinchenma-knowledge-base.git /tmp/jinchenma-knowledge-base
mkdir -p .claude/skills
cp -r /tmp/jinchenma-knowledge-base/skills/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

先完整读取 知识库公共契约,并将保存本 Skill 的 Knowledge Base Agent 根目录记为 ${knowledge_base_agent_root}。Schema 只从 ${knowledge_base_agent_root}/config/knowledge-base/知识库Schema.json 读取;知识库路径只通过 Knowledge Base Agent 的解析器或调用方兼容入口取得。任一入口缺失时停止。默认全程只读并排除 .归档。

模式

  • 标准查询:回答“库里有什么”“某个判断来自哪里”“两个页面有什么关系”等问题。
  • 创作素材:用户提出选题、观点、主题或待论证内容,需要汇集个人观点、经历、原话、证据和历史输出时使用。

输入没有明确要求格式时,根据目标选择一种模式并在回执中说明。两种模式使用同一证据、来源和去重规则。

分阶段检索

  1. 解析问题中的实体、主题、时间、精确短语、关系、预期输出和用户明确指定的范围。
  2. 标准查询按 Schema 优先检查高相关的知识、观点、主题、人物、组织、交流和项目;创作素材优先检查观点、随记、日记、逐字稿、知识、50-内容创作/12-作品/ 的历史作品和相关主题。
  3. 主题 只用于发现候选。沿其正文链接进入观点、知识、原始材料和历史输出,不能引用主题概括作为独立证据。
  4. 沿每个候选的 derived_from 递归回溯直接来源和根来源。没有完整来源链的派生页面降低证据等级并报告缺口。
  5. 使用文件名、aliases、精确短语和正文检索补充候选;用现有 Tags 扩展时单独记录新增候选及阅读全文后的有效数。Tag 命中只表示页面值得读取。
  6. 对关系问题读取 derived_from、topics、participants 和正文 Wiki 内链;需要 Obsidian 原生解析时按需查询反链。
  7. 首轮只保留少量高相关候选,阅读全文和必要直接来源后再形成结论。找不到时报告已检查范围,不继续无边界扩大。

.归档/ 里的旧页面只作为明确指定的历史材料读取。

来源链与去重

对每个派生页面记录:

  • 页面类型与日期;
  • 直接来源;
  • 递归回溯后的根来源;
  • 可以支持的断言;
  • 适用条件、时效或不确定性。

同一根来源产生的分析、多个观点、主题链接和历史输出引用只算一组来源,不冒充多份独立证据。多根来源共同支持时逐项列出,不能只给汇总数量。

观点冲突与变化

  • replaces 只表示用户明确记录的取代关系,展示完整链并保留旧观点。
  • 没有 replaces 的冲突观点并列返回,说明各自条件与日期,不能根据创建时间推断较新的页面代表当前立场。
  • 个人分析中的外部判断只有在对应观点页或用户原话明确接受后,才能列为个人观点。
  • 历史表达证据只说明当时观点;用户当前立场证据不足时标记未确认。

标准查询输出

先直接回答,再给可点击页面与来源。按证据强度区分:

  • direct_evidence:一个明确页面或受保护来源直接支持;
  • cross_page_synthesis:两个以上独立根来源共同支持,逐页引用;
  • reasonable_inference:由证据推导但没有页面直接表述,写出推断链与置信度;
  • not_found:已检查范围没有足够证据。
text
answer: <直接答案>
evidence:
  direct_evidence: <页面、日期、直接来源、根来源与原句>
  cross_page_synthesis: <独立根来源集合与综合>
  reasonable_inference: <推断链、置信度或空>
  not_found: <检查范围与缺口>
conflicts_and_replacements: <冲突、replaces 链或空>
tag_expansion: <未使用 | 新增候选数 / 阅读后有效候选数>

创作素材包

输出按用途分组:

  1. 个人观点:已确认观点页或用户第一方直接判断,用于确定立场。
  2. 个人经历与原始表达:日记、随记、对话原话和项目过程,用于案例与个人风格;历史表达不自动视为当前立场。
  3. 外部证据:事实、数据、研究和他人观点,保持来源归属并注明待核验项。
  4. 历史输出:既有文章、推文、口播等,说明可复用内容和重复表达风险。
  5. 冲突与取代:并列冲突观点和明确 replaces 链。
  6. 材料缺口:缺少的事实、个人案例、反例、时间信息或当前立场确认。

每项统一返回:

text
page: <页面链接>
page_type: <页面类型>
date: <页面或证据日期>
direct_source: <直接来源>
root_source: <根来源>
supports: <可以支持的写作断言>
boundary: <适用条件、不能扩写成什么或待核验项>

主题页可以作为 discovery_via 记录,不能填入 supports 充当证据。素材包末尾说明根来源去重结果、冲突处理和材料是否足以支持目标内容。

禁止

  • 不使用 Semantic、Hybrid、Embedding、向量数据库或图数据库查询。
  • 不为回答方便修改标签、Frontmatter、关系或正文。
  • 不把主题页、Tags、文件名命中或反链数量当作事实证据。
  • 不把外部观点、合理推断或历史表达写成用户当前已确认观点。
  • 只在用户另行要求时将查询结果保存为页面。

Frequently asked questions

What does the Query AI skill do?

只读查询个人知识库并用本地证据回答问题,或为选题、观点、主题和待论证内容生成可追溯的创作素材包。区分个人观点、个人经历、外部证据、历史输出、冲突与缺口;不写入或修复页面。

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/jinchenma94/jinchenma-knowledge-base/tree/main/skills/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?

It is published on GitHub by jinchenma94. Check the repository for licensing terms. 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 👇