Qmd Zh logo

Qmd Zh

Community
L-LesterYu
qmd-zh

本地混合搜索 Markdown 笔记和文档。适用于搜索笔记、查找相关内容或从已索引的文档集合中检索文档。

Overview

PublisherL-LesterYu
RepositoryOpenClaw-hot-skills-zh
Skill nameqmd-zh
Stars
57
Forks
9
Bundled files
1
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.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by L-LesterYu on GitHub. Read the source before you install it.

Installation

Install the Qmd Zh 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/L-LesterYu/OpenClaw-hot-skills-zh/tree/main/skills/qmd-zh
  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/L-LesterYu/OpenClaw-hot-skills-zh.git /tmp/OpenClaw-hot-skills-zh
mkdir -p .claude/skills
cp -r /tmp/OpenClaw-hot-skills-zh/skills/qmd-zh .claude/skills/qmd-zh
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Qmd Zh 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 Qmd Zh 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 Qmd Zh 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.

qmd - 快速 Markdown 搜索

适用于 Markdown 笔记、文档和知识库的本地搜索引擎。一次索引,快速搜索。

适用场景(触发短语)

  • "搜索我的笔记 / 文档 / 知识库"
  • "查找相关笔记"
  • "从我的文档集合中检索 Markdown 文件"
  • "搜索本地 Markdown 文件"

默认行为(重要)

  • 优先使用 qmd search(BM25)。它通常即时返回结果,应作为默认选择。
  • 仅在关键词搜索失败且需要语义相似度匹配时,才使用 qmd vsearch(冷启动时可能非常慢)。
  • 除非用户明确要求最高质量的混合检索结果且能接受较长运行时间/超时,否则避免使用 qmd query。

前置条件

  • Bun >= 1.0.0
  • macOS: brew install sqlite(SQLite 扩展)
  • 确保 PATH 包含:$HOME/.bun/bin

安装 Bun(macOS):brew install oven-sh/bun/bun

安装

bun install -g https://github.com/tobi/qmd

配置

bash
qmd collection add /path/to/notes --name notes --mask "**/*.md"
qmd context add qmd://notes "此集合的描述"  # 可选
qmd embed  # 首次运行以启用向量 + 混合搜索

索引范围

  • 专为 Markdown 文档集合设计(通常为 **/*.md)。
  • 测试表明"杂乱"的 Markdown 也能正常工作:分块基于内容(每个分块约几百个 token),而非严格按标题/结构划分。
  • 不是代码搜索的替代品;请使用代码搜索工具来搜索代码仓库/源码树。

搜索模式

  • qmd search(默认):快速关键词匹配(BM25)
  • qmd vsearch(最后手段):语义相似度搜索(向量)。由于每次运行可能需要在本地加载 LLM(例如 Qwen3-1.7B),通常较慢。
  • qmd query(一般跳过):混合搜索 + LLM 重排序。通常比 vsearch 更慢,且可能超时。

性能说明

  • qmd search 通常即时完成。
  • qmd vsearch 在某些机器上可能需要约 1 分钟,因为查询扩展可能会在每次运行时将本地模型加载到内存中;向量查找本身通常很快。
  • qmd query 在 vsearch 之上增加了 LLM 重排序,因此可能更慢且交互使用可靠性更低。
  • 如果需要频繁进行语义搜索,建议保持进程/模型处于热启动状态(例如,如果你的环境支持的话,使用长生命周期的 qmd/MCP 服务器模式),而不是每次都冷启动 LLM。

常用命令

bash
qmd search "查询词"             # 默认
qmd vsearch "查询词"
qmd query "查询词"
qmd search "查询词" -c notes     # 搜索指定集合
qmd search "查询词" -n 10        # 返回更多结果
qmd search "查询词" --json       # JSON 格式输出
qmd search "查询词" --all --files --min-score 0.3

实用选项

  • -n <数量>:返回结果数量
  • -c, --collection <名称>:限制搜索范围到指定集合
  • --all --min-score <阈值>:返回所有高于阈值的结果
  • --json / --files:代理友好的输出格式
  • --full:返回完整文档内容

文档检索

bash
qmd get "path/to/file.md"       # 完整文档
qmd get "#docid"                # 按搜索结果中的 ID 检索
qmd multi-get "journals/2025-05*.md"
qmd multi-get "doc1.md, doc2.md, #abc123" --json

维护

bash
qmd status                      # 索引健康状态
qmd update                      # 重新索引已变更的文件
qmd embed                       # 更新嵌入向量

保持索引最新

自动化索引流程,确保在添加/编辑笔记时搜索结果保持最新。

  • 对于关键词搜索(qmd search),通常只需 qmd update(速度很快)。
  • 如果你依赖语义/混合搜索(vsearch/query),可能还需要运行 qmd embed,但这可能较慢。

定时任务示例(cron):

bash
# 每小时增量更新(保持 BM25 索引最新):
0 * * * * export PATH="$HOME/.bun/bin:$PATH" && qmd update

# 可选:每晚更新嵌入向量(可能较慢):
0 5 * * * export PATH="$HOME/.bun/bin:$PATH" && qmd embed

如果你的 Clawdbot/Agent 环境支持内置调度器,可以在那里运行相同的命令,而非使用系统 cron。

模型与缓存

  • 使用本地 GGUF 模型;首次运行时会自动下载。
  • 默认缓存路径:~/.cache/qmd/models/(可通过 XDG_CACHE_HOME 覆盖)。

与 Clawdbot 记忆搜索的关系

  • qmd 搜索的是你显式索引到集合中的本地文件(笔记/文档)。
  • Clawdbot 的 memory_search 搜索的是Agent 记忆(之前交互中保存的事实/上下文)。
  • 两者配合使用:memory_search 用于"我们之前决定/学到了什么?",qmd 用于"我的磁盘笔记/文档中有什么相关内容?"。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Qmd Zh AI skill do?

本地混合搜索 Markdown 笔记和文档。适用于搜索笔记、查找相关内容或从已索引的文档集合中检索文档。

Why use Qmd Zh on TypingMind?

Because you install it once and use it with any model. Qmd Zh 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 Qmd Zh in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/L-LesterYu/OpenClaw-hot-skills-zh/tree/main/skills/qmd-zh. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Qmd Zh?

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 Qmd Zh?

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

Is the Qmd Zh AI skill free?

Yes. It is published on GitHub by L-LesterYu 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 👇