npx skills add https://github.com/tobi/qmd --skill qmd包含 Shell 命令
此技能包含可能执行系统命令的 shell 命令指令(!命令``)。安装前请仔细审查。
用于 Markdown 内容的本地搜索引擎。
!qmd status 2>/dev/null || echo "未安装: npm install -g @tobilu/qmd"
query{
"searches": [
{ "type": "lex", "query": "CAP theorem consistency" },
{ "type": "vec", "query": "tradeoff between consistency and availability" }
],
"collections": ["docs"],
"limit": 10
}
| 类型 | 方法 | 输入 |
|---|---|---|
lex |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| BM25 |
| 关键词 — 精确术语、名称、代码 |
vec | 向量 | 问题 — 自然语言 |
hyde | 向量 | 答案 — 假设结果(50-100 词) |
lex (关键词)
"connection pool"(带引号)performance -sports(减号前缀)handleError asyncvec (语义)
"how does the rate limiter handle burst traffic""in the payment service, how are refunds processed"hyde (假设文档)
expand (自动扩展)
expand: questionexpand: 与其他带类型的行混合 — 它要么是独立的扩展查询,要么是完整的查询文档当查询术语存在歧义时,添加 intent 来引导结果:
{
"searches": [
{ "type": "lex", "query": "performance" }
],
"intent": "web page load times and Core Web Vitals"
}
意图影响扩展、重新排序、块选择和片段提取。它本身不进行搜索 — 它是一个引导信号,用于消除像 "performance"(网页性能 vs 团队健康 vs 体能)这类查询的歧义。
| 目标 | 方法 |
|---|---|
| 知道确切术语 | 仅使用 lex |
| 不知道词汇 | 使用单行查询(隐式 expand:)或 vec |
| 最佳召回率 | lex + vec |
| 复杂主题 | lex + vec + hyde |
| 歧义查询 | 在上述任何组合中添加 intent |
第一个查询在融合中获得 2 倍权重 — 将你最好的猜测放在第一位。
| 语法 | 含义 | 示例 |
|---|---|---|
term | 前缀匹配 | perf 匹配 "performance" |
"phrase" | 精确短语 | "rate limiter" |
-term | 排除 | performance -sports |
注意:-term 仅在 lex 查询中有效,在 vec/hyde 中无效。
{ "collections": ["docs"] } // 单个
{ "collections": ["docs", "notes"] } // 多个(OR)
省略此项以搜索所有集合。
| 工具 | 用途 |
|---|---|
get | 通过路径或 #docid 检索文档 |
multi_get | 通过 glob/列表检索多个文档 |
status | 集合和健康状态 |
qmd query "question" # 自动扩展 + 重新排序
qmd query $'lex: X\nvec: Y' # 结构化查询
qmd query $'expand: question' # 显式扩展
qmd query --json --explain "q" # 显示分数追踪(RRF + 重新排序混合)
qmd search "keywords" # 仅 BM25(无 LLM)
qmd get "#abc123" # 通过 docid
qmd multi-get "journals/2026-*.md" -l 40 # 通过 glob 批量拉取片段
qmd multi-get notes/foo.md,notes/bar.md # 逗号分隔列表,保持顺序
curl -X POST http://localhost:8181/query \
-H "Content-Type: application/json" \
-d '{"searches": [{"type": "lex", "query": "test"}]}'
npm install -g @tobilu/qmd
qmd collection add ~/notes --name notes
qmd embed
每周安装量
706
代码仓库
GitHub 星标数
16.8K
首次出现
2026年1月30日
安全审计
安装于
opencode592
codex590
gemini-cli578
github-copilot568
amp542
kimi-cli534
Contains Shell Commands
This skill contains shell command directives (!command``) that may execute system commands. Review carefully before installing.
Local search engine for markdown content.
!qmd status 2>/dev/null || echo "Not installed: npm install -g @tobilu/qmd"
query{
"searches": [
{ "type": "lex", "query": "CAP theorem consistency" },
{ "type": "vec", "query": "tradeoff between consistency and availability" }
],
"collections": ["docs"],
"limit": 10
}
| Type | Method | Input |
|---|---|---|
lex | BM25 | Keywords — exact terms, names, code |
vec | Vector | Question — natural language |
hyde | Vector | Answer — hypothetical result (50-100 words) |
lex (keyword)
"connection pool" (quoted)performance -sports (minus prefix)handleError asyncvec (semantic)
"how does the rate limiter handle burst traffic""in the payment service, how are refunds processed"hyde (hypothetical document)
expand (auto-expand)
expand: question on its own lineexpand: with other typed lines — it's either a standalone expand query or a full query documentWhen a query term is ambiguous, add intent to steer results:
{
"searches": [
{ "type": "lex", "query": "performance" }
],
"intent": "web page load times and Core Web Vitals"
}
Intent affects expansion, reranking, chunk selection, and snippet extraction. It does not search on its own — it's a steering signal that disambiguates queries like "performance" (web-perf vs team health vs fitness).
| Goal | Approach |
|---|---|
| Know exact terms | lex only |
| Don't know vocabulary | Use a single-line query (implicit expand:) or vec |
| Best recall | lex + vec |
| Complex topic | lex + vec + hyde |
First query gets 2x weight in fusion — put your best guess first.
| Syntax | Meaning | Example |
|---|---|---|
term | Prefix match | perf matches "performance" |
"phrase" | Exact phrase | "rate limiter" |
-term | Exclude | performance -sports |
Note: -term only works in lex queries, not vec/hyde.
{ "collections": ["docs"] } // Single
{ "collections": ["docs", "notes"] } // Multiple (OR)
Omit to search all collections.
| Tool | Use |
|---|---|
get | Retrieve doc by path or #docid |
multi_get | Retrieve multiple by glob/list |
status | Collections and health |
qmd query "question" # Auto-expand + rerank
qmd query $'lex: X\nvec: Y' # Structured
qmd query $'expand: question' # Explicit expand
qmd query --json --explain "q" # Show score traces (RRF + rerank blend)
qmd search "keywords" # BM25 only (no LLM)
qmd get "#abc123" # By docid
qmd multi-get "journals/2026-*.md" -l 40 # Batch pull snippets by glob
qmd multi-get notes/foo.md,notes/bar.md # Comma-separated list, preserves order
curl -X POST http://localhost:8181/query \
-H "Content-Type: application/json" \
-d '{"searches": [{"type": "lex", "query": "test"}]}'
npm install -g @tobilu/qmd
qmd collection add ~/notes --name notes
qmd embed
Weekly Installs
706
Repository
GitHub Stars
16.8K
First Seen
Jan 30, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode592
codex590
gemini-cli578
github-copilot568
amp542
kimi-cli534
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
103,800 周安装
| Ambiguous query | Add intent to any combination above |