{"skill":{"slug":"qmd-2","displayName":"Qmd","summary":"Search markdown knowledge bases, notes, and documentation using QMD. Use when users ask to search notes, find documents, or look up information.","description":"---\nname: qmd\ndescription: Search markdown knowledge bases, notes, and documentation using QMD. Use when users ask to search notes, find documents, or look up information.\nlicense: MIT\ncompatibility: Requires qmd CLI or MCP server. Install via `npm install -g @tobilu/qmd`.\nmetadata:\n  author: tobi\n  version: \"2.0.0\"\nallowed-tools: Bash(qmd:*), mcp__qmd__*\n---\n\n# QMD - Quick Markdown Search\n\nLocal search engine for markdown content.\n\n## Status\n\n!`qmd status 2>/dev/null || echo \"Not installed: npm install -g @tobilu/qmd\"`\n\n## MCP: `query`\n\n```json\n{\n  \"searches\": [\n    { \"type\": \"lex\", \"query\": \"CAP theorem consistency\" },\n    { \"type\": \"vec\", \"query\": \"tradeoff between consistency and availability\" }\n  ],\n  \"collections\": [\"docs\"],\n  \"limit\": 10\n}\n```\n\n### Query Types\n\n| Type | Method | Input |\n|------|--------|-------|\n| `lex` | BM25 | Keywords — exact terms, names, code |\n| `vec` | Vector | Question — natural language |\n| `hyde` | Vector | Answer — hypothetical result (50-100 words) |\n\n### Writing Good Queries\n\n**lex (keyword)**\n- 2-5 terms, no filler words\n- Exact phrase: `\"connection pool\"` (quoted)\n- Exclude terms: `performance -sports` (minus prefix)\n- Code identifiers work: `handleError async`\n\n**vec (semantic)**\n- Full natural language question\n- Be specific: `\"how does the rate limiter handle burst traffic\"`\n- Include context: `\"in the payment service, how are refunds processed\"`\n\n**hyde (hypothetical document)**\n- Write 50-100 words of what the *answer* looks like\n- Use the vocabulary you expect in the result\n\n**expand (auto-expand)**\n- Use a single-line query (implicit) or `expand: question` on its own line\n- Lets the local LLM generate lex/vec/hyde variations\n- Do not mix `expand:` with other typed lines — it's either a standalone expand query or a full query document\n\n### Intent (Disambiguation)\n\nWhen a query term is ambiguous, add `intent` to steer results:\n\n```json\n{\n  \"searches\": [\n    { \"type\": \"lex\", \"query\": \"performance\" }\n  ],\n  \"intent\": \"web page load times and Core Web Vitals\"\n}\n```\n\nIntent 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).\n\n### Combining Types\n\n| Goal | Approach |\n|------|----------|\n| Know exact terms | `lex` only |\n| Don't know vocabulary | Use a single-line query (implicit `expand:`) or `vec` |\n| Best recall | `lex` + `vec` |\n| Complex topic | `lex` + `vec` + `hyde` |\n| Ambiguous query | Add `intent` to any combination above |\n\nFirst query gets 2x weight in fusion — put your best guess first.\n\n### Lex Query Syntax\n\n| Syntax | Meaning | Example |\n|--------|---------|---------|\n| `term` | Prefix match | `perf` matches \"performance\" |\n| `\"phrase\"` | Exact phrase | `\"rate limiter\"` |\n| `-term` | Exclude | `performance -sports` |\n\nNote: `-term` only works in lex queries, not vec/hyde.\n\n### Collection Filtering\n\n```json\n{ \"collections\": [\"docs\"] }              // Single\n{ \"collections\": [\"docs\", \"notes\"] }     // Multiple (OR)\n```\n\nOmit to search all collections.\n\n## Other MCP Tools\n\n| Tool | Use |\n|------|-----|\n| `get` | Retrieve doc by path or `#docid` |\n| `multi_get` | Retrieve multiple by glob/list |\n| `status` | Collections and health |\n\n## CLI\n\n```bash\nqmd query \"question\"              # Auto-expand + rerank\nqmd query $'lex: X\\nvec: Y'       # Structured\nqmd query $'expand: question'     # Explicit expand\nqmd query --json --explain \"q\"    # Show score traces (RRF + rerank blend)\nqmd search \"keywords\"             # BM25 only (no LLM)\nqmd get \"#abc123\"                 # By docid\nqmd multi-get \"journals/2026-*.md\" -l 40  # Batch pull snippets by glob\nqmd multi-get notes/foo.md,notes/bar.md   # Comma-separated list, preserves order\n```\n\n## HTTP API\n\n```bash\ncurl -X POST http://localhost:8181/query \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"searches\": [{\"type\": \"lex\", \"query\": \"test\"}]}'\n```\n\n## Setup\n\n```bash\nnpm install -g @tobilu/qmd\nqmd collection add ~/notes --name notes\nqmd embed\n```\n","tags":{"latest":"0.1.0"},"stats":{"comments":0,"downloads":559,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1773662930810,"updatedAt":1778491948843},"latestVersion":{"version":"0.1.0","createdAt":1773662930810,"changelog":"- Initial release of qmd-2 skill.\n- Enables searching markdown notes, docs, and knowledge bases using the QMD CLI or MCP server.\n- Supports keyword (lex), semantic (vec), and hypothetical document (hyde) query types, with disambiguation options.\n- Allows filtering by collections and combining query types for best results.\n- Includes guidance for writing effective queries and using QMD via CLI and HTTP API.\n- Requires installation of qmd CLI (`npm install -g @tobilu/qmd`).","license":"MIT-0"},"metadata":null,"owner":{"handle":"satvik374","userId":"s178m12dvm7zp92yctzf5zrj9x83rq6p","displayName":"Satvik374","image":"https://avatars.githubusercontent.com/u/190399082?v=4"},"moderation":null}