一键导入
qmd
Search markdown knowledge bases, notes, and documentation using QMD. Use when users ask to search notes, find documents, or look up information.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Search markdown knowledge bases, notes, and documentation using QMD. Use when users ask to search notes, find documents, or look up information.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user notices a system, concept, person, project, decision, competitor, or problem is missing from the Wiki and wants to create a page for it.
Use when the user asks any question, requests research, or wants information from the knowledge base. This is the default action in this repository — when in doubt, search the Wiki. Use for "find me...", "what do we know about...", "tell me about...", "who is...", "what is...", or any general research question.
Use when the user asks to ground this conversation in the knowledge base, says "wiki-ground", asks to treat the KB as source of truth, or wants domain answers backed by the Wiki. Optional topic front-loads relevant knowledge base pages.
Use when the user asks for a health check, lint, audit, or wants to check for orphan pages, contradictions, or data gaps in the Wiki.
Use when the user asks to finalize an ingest, merge batch logs, or rebuild Wiki indexes after a batch import.
Use when about to process individual notes during Wiki ingestion — loaded as a required background skill by wiki-ingest and wiki-ingest-next-batch. Contains file conversion rules, topic assignment rules, WikiLink rules, and the session log format.
| name | qmd |
| description | Search markdown knowledge bases, notes, and documentation using QMD. Use when users ask to search notes, find documents, or look up information. |
| license | MIT |
| compatibility | Requires qmd CLI or MCP server. Install via `npm install -g @tobilu/qmd`. |
| metadata | {"author":"tobi","version":"2.0.0"} |
| allowed-tools | Bash(qmd:*), mcp__qmd__* |
Local search engine for markdown content.
In Codex, use the repo-provided QMD MCP tools if they are available in the current tool list; otherwise use the qmd CLI. If qmd fails because its cache/database is outside the workspace sandbox, report that QMD needs an MCP server or writable QMD cache path instead of silently falling back to stale results.
!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 |
| Ambiguous query | Add intent to any combination above |
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 "scans/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