[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DDPJP3DZJC4YB761KP9VM6":3,"skill-same:01M6DDPJP3DZJC4YB761KP9VM6":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":61,"commitSha":62,"skillDirectory":63,"forksCount":64,"repositoryHtmlUrl":65,"repositoryHomepageUrl":6,"ownerHtmlUrl":66,"ownerBlogUrl":6,"ownerDescription":67,"updatedAt":68,"install":69,"resources":82},"01M6DDPJP3DZJC4YB761KP9VM6","qmd",null,"Search personal knowledge bases, notes, docs, and meeting transcripts locally using qmd — a hybrid retrieval engine with BM25, vector search, and LLM reranking. Supports CLI and MCP integration.","zapabob\u002FSkills","zapabob","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130830376?v=4","01M6DBMYZAGRTFQDSQYW3W764P","峯岸 亮","01M6DBMZ3GKDSJ01NZ9XTZD7JD",2,"MIT","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Farchive\u002Fskill-md-reviewed\u002Fsha256\u002F2d\u002F2da1534593f7d61e8251d0f0544f5e87f95facd726b129f46dd7e3a1545fea1b\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"vector","knowledge-base","local","arxiv","bases","engine","knowledge","MCP Integration","Vector Search","integration","MCP","search","rag","notes","linux","obsidian","cli","macos","personal","2026-11-10 10:12:30",false,"---\r\nname: qmd\r\ndescription: Search personal knowledge bases, notes, docs, and meeting transcripts locally using qmd — a hybrid retrieval engine with BM25, vector search, and LLM reranking. Supports CLI and MCP integration.\r\nversion: 1.0.0\r\nauthor: Hermes Agent + Teknium\r\nlicense: MIT\r\nplatforms: [macos, linux]\r\nmetadata:\r\n  hermes:\r\n    tags: [Search, Knowledge-Base, RAG, Notes, MCP, Local-AI]\r\n    related_skills: [obsidian, native-mcp, arxiv]\r\n---\r\n\r\n# QMD — Query Markup Documents\r\n\r\nLocal, on-device search engine for personal knowledge bases. Indexes markdown\r\nnotes, meeting transcripts, documentation, and any text-based files, then\r\nprovides hybrid search combining keyword matching, semantic understanding, and\r\nLLM-powered reranking — all running locally with no cloud dependencies.\r\n\r\nCreated by [Tobi Lütke](https:\u002F\u002Fgithub.com\u002Ftobi\u002Fqmd). MIT licensed.\r\n\r\n## When to Use\r\n\r\n- User asks to search their notes, docs, knowledge base, or meeting transcripts\r\n- User wants to find something across a large collection of markdown\u002Ftext files\r\n- User wants semantic search (\"find notes about X concept\") not just keyword grep\r\n- User has already set up qmd collections and wants to query them\r\n- User asks to set up a local knowledge base or document search system\r\n- Keywords: \"search my notes\", \"find in my docs\", \"knowledge base\", \"qmd\"\r\n\r\n## Prerequisites\r\n\r\n### Node.js >= 22 (required)\r\n\r\n```bash\r\n# Check version\r\nnode --version  # must be >= 22\r\n\r\n# macOS — install or upgrade via Homebrew\r\nbrew install node@22\r\n\r\n# Linux — use NodeSource or nvm\r\ncurl -fsSL https:\u002F\u002Fdeb.nodesource.com\u002Fsetup_22.x | sudo -E bash -\r\nsudo apt-get install -y nodejs\r\n# or with nvm:\r\nnvm install 22 && nvm use 22\r\n```\r\n\r\n### SQLite with Extension Support (macOS only)\r\n\r\nmacOS system SQLite lacks extension loading. Install via Homebrew:\r\n\r\n```bash\r\nbrew install sqlite\r\n```\r\n\r\n### Install qmd\r\n\r\n```bash\r\nnpm install -g @tobilu\u002Fqmd\r\n# or with Bun:\r\nbun install -g @tobilu\u002Fqmd\r\n```\r\n\r\nFirst run auto-downloads 3 local GGUF models (~2GB total):\r\n\r\n| Model | Purpose | Size |\r\n|-------|---------|------|\r\n| embeddinggemma-300M-Q8_0 | Vector embeddings | ~300MB |\r\n| qwen3-reranker-0.6b-q8_0 | Result reranking | ~640MB |\r\n| qmd-query-expansion-1.7B | Query expansion | ~1.1GB |\r\n\r\n### Verify Installation\r\n\r\n```bash\r\nqmd --version\r\nqmd status\r\n```\r\n\r\n## Quick Reference\r\n\r\n| Command | What It Does | Speed |\r\n|---------|-------------|-------|\r\n| `qmd search \"query\"` | BM25 keyword search (no models) | ~0.2s |\r\n| `qmd vsearch \"query\"` | Semantic vector search (1 model) | ~3s |\r\n| `qmd query \"query\"` | Hybrid + reranking (all 3 models) | ~2-3s warm, ~19s cold |\r\n| `qmd get \u003Cdocid>` | Retrieve full document content | instant |\r\n| `qmd multi-get \"glob\"` | Retrieve multiple files | instant |\r\n| `qmd collection add \u003Cpath> --name \u003Cn>` | Add a directory as a collection | instant |\r\n| `qmd context add \u003Cpath> \"description\"` | Add context metadata to improve retrieval | instant |\r\n| `qmd embed` | Generate\u002Fupdate vector embeddings | varies |\r\n| `qmd status` | Show index health and collection info | instant |\r\n| `qmd mcp` | Start MCP server (stdio) | persistent |\r\n| `qmd mcp --http --daemon` | Start MCP server (HTTP, warm models) | persistent |\r\n\r\n## Setup Workflow\r\n\r\n### 1. Add Collections\r\n\r\nPoint qmd at directories containing your documents:\r\n\r\n```bash\r\n# Add a notes directory\r\nqmd collection add ~\u002Fnotes --name notes\r\n\r\n# Add project docs\r\nqmd collection add ~\u002Fprojects\u002Fmyproject\u002Fdocs --name project-docs\r\n\r\n# Add meeting transcripts\r\nqmd collection add ~\u002Fmeetings --name meetings\r\n\r\n# List all collections\r\nqmd collection list\r\n```\r\n\r\n### 2. Add Context Descriptions\r\n\r\nContext metadata helps the search engine understand what each collection\r\ncontains. This significantly improves retrieval quality:\r\n\r\n```bash\r\nqmd context add qmd:\u002F\u002Fnotes \"Personal notes, ideas, and journal entries\"\r\nqmd context add qmd:\u002F\u002Fproject-docs \"Technical documentation for the main project\"\r\nqmd context add qmd:\u002F\u002Fmeetings \"Meeting transcripts and action items from team syncs\"\r\n```\r\n\r\n### 3. Generate Embeddings\r\n\r\n```bash\r\nqmd embed\r\n```\r\n\r\nThis processes all documents in all collections and generates vector\r\nembeddings. Re-run after adding new documents or collections.\r\n\r\n### 4. Verify\r\n\r\n```bash\r\nqmd status   # shows index health, collection stats, model info\r\n```\r\n\r\n## Search Patterns\r\n\r\n### Fast Keyword Search (BM25)\r\n\r\nBest for: exact terms, code identifiers, names, known phrases.\r\nNo models loaded — near-instant results.\r\n\r\n```bash\r\nqmd search \"authentication middleware\"\r\nqmd search \"handleError async\"\r\n```\r\n\r\n### Semantic Vector Search\r\n\r\nBest for: natural language questions, conceptual queries.\r\nLoads embedding model (~3s first query).\r\n\r\n```bash\r\nqmd vsearch \"how does the rate limiter handle burst traffic\"\r\nqmd vsearch \"ideas for improving onboarding flow\"\r\n```\r\n\r\n### Hybrid Search with Reranking (Best Quality)\r\n\r\nBest for: important queries where quality matters most.\r\nUses all 3 models — query expansion, parallel BM25+vector, reranking.\r\n\r\n```bash\r\nqmd query \"what decisions were made about the database migration\"\r\n```\r\n\r\n### Structured Multi-Mode Queries\r\n\r\nCombine different search types in a single query for precision:\r\n\r\n```bash\r\n# BM25 for exact term + vector for concept\r\nqmd query $'lex: rate limiter\\nvec: how does throttling work under load'\r\n\r\n# With query expansion\r\nqmd query $'expand: database migration plan\\nlex: \"schema change\"'\r\n```\r\n\r\n### Query Syntax (lex\u002FBM25 mode)\r\n\r\n| Syntax | Effect | Example |\r\n|--------|--------|---------|\r\n| `term` | Prefix match | `perf` matches \"performance\" |\r\n| `\"phrase\"` | Exact phrase | `\"rate limiter\"` |\r\n| `-term` | Exclude term | `performance -sports` |\r\n\r\n### HyDE (Hypothetical Document Embeddings)\r\n\r\nFor complex topics, write what you expect the answer to look like:\r\n\r\n```bash\r\nqmd query $'hyde: The migration plan involves three phases. First, we add the new columns without dropping the old ones. Then we backfill data. Finally we cut over and remove legacy columns.'\r\n```\r\n\r\n### Scoping to Collections\r\n\r\n```bash\r\nqmd search \"query\" --collection notes\r\nqmd query \"query\" --collection project-docs\r\n```\r\n\r\n### Output Formats\r\n\r\n```bash\r\nqmd search \"query\" --json        # JSON output (best for parsing)\r\nqmd search \"query\" --limit 5     # Limit results\r\nqmd get \"#abc123\"                # Get by document ID\r\nqmd get \"path\u002Fto\u002Ffile.md\"       # Get by file path\r\nqmd get \"file.md:50\" -l 100     # Get specific line range\r\nqmd multi-get \"journals\u002F*.md\" --json  # Batch retrieve by glob\r\n```\r\n\r\n## MCP Integration (Recommended)\r\n\r\nqmd exposes an MCP server that provides search tools directly to\r\nHermes Agent via the native MCP client. This is the preferred\r\nintegration — once configured, the agent gets qmd tools automatically\r\nwithout needing to load this skill.\r\n\r\n### Option A: Stdio Mode (Simple)\r\n\r\nAdd to `~\u002F.hermes\u002Fconfig.yaml`:\r\n\r\n```yaml\r\nmcp_servers:\r\n  qmd:\r\n    command: \"qmd\"\r\n    args: [\"mcp\"]\r\n    timeout: 30\r\n    connect_timeout: 45\r\n```\r\n\r\nThis registers tools: `mcp_qmd_search`, `mcp_qmd_vsearch`,\r\n`mcp_qmd_deep_search`, `mcp_qmd_get`, `mcp_qmd_status`.\r\n\r\n**Tradeoff:** Models load on first search call (~19s cold start),\r\nthen stay warm for the session. Acceptable for occasional use.\r\n\r\n### Option B: HTTP Daemon Mode (Fast, Recommended for Heavy Use)\r\n\r\nStart the qmd daemon separately — it keeps models warm in memory:\r\n\r\n```bash\r\n# Start daemon (persists across agent restarts)\r\nqmd mcp --http --daemon\r\n\r\n# Runs on http:\u002F\u002Flocalhost:8181 by default\r\n```\r\n\r\nThen configure Hermes Agent to connect via HTTP:\r\n\r\n```yaml\r\nmcp_servers:\r\n  qmd:\r\n    url: \"http:\u002F\u002Flocalhost:8181\u002Fmcp\"\r\n    timeout: 30\r\n```\r\n\r\n**Tradeoff:** Uses ~2GB RAM while running, but every query is fast\r\n(~2-3s). Best for users who search frequently.\r\n\r\n### Keeping the Daemon Running\r\n\r\n#### macOS (launchd)\r\n\r\n```bash\r\ncat > ~\u002FLibrary\u002FLaunchAgents\u002Fcom.qmd.daemon.plist \u003C\u003C 'EOF'\r\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\u003C!DOCTYPE plist PUBLIC \"-\u002F\u002FApple\u002F\u002FDTD PLIST 1.0\u002F\u002FEN\"\r\n  \"http:\u002F\u002Fwww.apple.com\u002FDTDs\u002FPropertyList-1.0.dtd\">\r\n\u003Cplist version=\"1.0\">\r\n\u003Cdict>\r\n  \u003Ckey>Label\u003C\u002Fkey>\r\n  \u003Cstring>com.qmd.daemon\u003C\u002Fstring>\r\n  \u003Ckey>ProgramArguments\u003C\u002Fkey>\r\n  \u003Carray>\r\n    \u003Cstring>qmd\u003C\u002Fstring>\r\n    \u003Cstring>mcp\u003C\u002Fstring>\r\n    \u003Cstring>--http\u003C\u002Fstring>\r\n    \u003Cstring>--daemon\u003C\u002Fstring>\r\n  \u003C\u002Farray>\r\n  \u003Ckey>RunAtLoad\u003C\u002Fkey>\r\n  \u003Ctrue\u002F>\r\n  \u003Ckey>KeepAlive\u003C\u002Fkey>\r\n  \u003Ctrue\u002F>\r\n  \u003Ckey>StandardOutPath\u003C\u002Fkey>\r\n  \u003Cstring>\u002Ftmp\u002Fqmd-daemon.log\u003C\u002Fstring>\r\n  \u003Ckey>StandardErrorPath\u003C\u002Fkey>\r\n  \u003Cstring>\u002Ftmp\u002Fqmd-daemon.log\u003C\u002Fstring>\r\n\u003C\u002Fdict>\r\n\u003C\u002Fplist>\r\nEOF\r\n\r\nlaunchctl load ~\u002FLibrary\u002FLaunchAgents\u002Fcom.qmd.daemon.plist\r\n```\r\n\r\n#### Linux (systemd user service)\r\n\r\n```bash\r\nmkdir -p ~\u002F.config\u002Fsystemd\u002Fuser\r\n\r\ncat > ~\u002F.config\u002Fsystemd\u002Fuser\u002Fqmd-daemon.service \u003C\u003C 'EOF'\r\n[Unit]\r\nDescription=QMD MCP Daemon\r\nAfter=network.target\r\n\r\n[Service]\r\nExecStart=qmd mcp --http --daemon\r\nRestart=on-failure\r\nRestartSec=10\r\nEnvironment=PATH=\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin\r\n\r\n[Install]\r\nWantedBy=default.target\r\nEOF\r\n\r\nsystemctl --user daemon-reload\r\nsystemctl --user enable --now qmd-daemon\r\nsystemctl --user status qmd-daemon\r\n```\r\n\r\n### MCP Tools Reference\r\n\r\nOnce connected, these tools are available as `mcp_qmd_*`:\r\n\r\n| MCP Tool | Maps To | Description |\r\n|----------|---------|-------------|\r\n| `mcp_qmd_search` | `qmd search` | BM25 keyword search |\r\n| `mcp_qmd_vsearch` | `qmd vsearch` | Semantic vector search |\r\n| `mcp_qmd_deep_search` | `qmd query` | Hybrid search + reranking |\r\n| `mcp_qmd_get` | `qmd get` | Retrieve document by ID or path |\r\n| `mcp_qmd_status` | `qmd status` | Index health and stats |\r\n\r\nThe MCP tools accept structured JSON queries for multi-mode search:\r\n\r\n```json\r\n{\r\n  \"searches\": [\r\n    {\"type\": \"lex\", \"query\": \"authentication middleware\"},\r\n    {\"type\": \"vec\", \"query\": \"how user login is verified\"}\r\n  ],\r\n  \"collections\": [\"project-docs\"],\r\n  \"limit\": 10\r\n}\r\n```\r\n\r\n## CLI Usage (Without MCP)\r\n\r\nWhen MCP is not configured, use qmd directly via terminal:\r\n\r\n```\r\nterminal(command=\"qmd query 'what was decided about the API redesign' --json\", timeout=30)\r\n```\r\n\r\nFor setup and management tasks, always use terminal:\r\n\r\n```\r\nterminal(command=\"qmd collection add ~\u002FDocuments\u002Fnotes --name notes\")\r\nterminal(command=\"qmd context add qmd:\u002F\u002Fnotes 'Personal research notes and ideas'\")\r\nterminal(command=\"qmd embed\")\r\nterminal(command=\"qmd status\")\r\n```\r\n\r\n## How the Search Pipeline Works\r\n\r\nUnderstanding the internals helps choose the right search mode:\r\n\r\n1. **Query Expansion** — A fine-tuned 1.7B model generates 2 alternative\r\n   queries. The original gets 2x weight in fusion.\r\n2. **Parallel Retrieval** — BM25 (SQLite FTS5) and vector search run\r\n   simultaneously across all query variants.\r\n3. **RRF Fusion** — Reciprocal Rank Fusion (k=60) merges results.\r\n   Top-rank bonus: #1 gets +0.05, #2-3 get +0.02.\r\n4. **LLM Reranking** — qwen3-reranker scores top 30 candidates (0.0-1.0).\r\n5. **Position-Aware Blending** — Ranks 1-3: 75% retrieval \u002F 25% reranker.\r\n   Ranks 4-10: 60\u002F40. Ranks 11+: 40\u002F60 (trusts reranker more for long tail).\r\n\r\n**Smart Chunking:** Documents are split at natural break points (headings,\r\ncode blocks, blank lines) targeting ~900 tokens with 15% overlap. Code\r\nblocks are never split mid-block.\r\n\r\n## Best Practices\r\n\r\n1. **Always add context descriptions** — `qmd context add` dramatically\r\n   improves retrieval accuracy. Describe what each collection contains.\r\n2. **Re-embed after adding documents** — `qmd embed` must be re-run when\r\n   new files are added to collections.\r\n3. **Use `qmd search` for speed** — when you need fast keyword lookup\r\n   (code identifiers, exact names), BM25 is instant and needs no models.\r\n4. **Use `qmd query` for quality** — when the question is conceptual or\r\n   the user needs the best possible results, use hybrid search.\r\n5. **Prefer MCP integration** — once configured, the agent gets native\r\n   tools without needing to load this skill each time.\r\n6. **Daemon mode for frequent users** — if the user searches their\r\n   knowledge base regularly, recommend the HTTP daemon setup.\r\n7. **First query in structured search gets 2x weight** — put the most\r\n   important\u002Fcertain query first when combining lex and vec.\r\n\r\n## Troubleshooting\r\n\r\n### \"Models downloading on first run\"\r\nNormal — qmd auto-downloads ~2GB of GGUF models on first use.\r\nThis is a one-time operation.\r\n\r\n### Cold start latency (~19s)\r\nThis happens when models aren't loaded in memory. Solutions:\r\n- Use HTTP daemon mode (`qmd mcp --http --daemon`) to keep warm\r\n- Use `qmd search` (BM25 only) when models aren't needed\r\n- MCP stdio mode loads models on first search, stays warm for session\r\n\r\n### macOS: \"unable to load extension\"\r\nInstall Homebrew SQLite: `brew install sqlite`\r\nThen ensure it's on PATH before system SQLite.\r\n\r\n### \"No collections found\"\r\nRun `qmd collection add \u003Cpath> --name \u003Cname>` to add directories,\r\nthen `qmd embed` to index them.\r\n\r\n### Embedding model override (CJK\u002Fmultilingual)\r\nSet `QMD_EMBED_MODEL` environment variable for non-English content:\r\n```bash\r\nexport QMD_EMBED_MODEL=\"your-multilingual-model\"\r\n```\r\n\r\n## Data Storage\r\n\r\n- **Index & vectors:** `~\u002F.cache\u002Fqmd\u002Findex.sqlite`\r\n- **Models:** Auto-downloaded to local cache on first run\r\n- **No cloud dependencies** — everything runs locally\r\n\r\n## References\r\n\r\n- [GitHub: tobi\u002Fqmd](https:\u002F\u002Fgithub.com\u002Ftobi\u002Fqmd)\r\n- [QMD Changelog](https:\u002F\u002Fgithub.com\u002Ftobi\u002Fqmd\u002Fblob\u002Fmain\u002FCHANGELOG.md)\r\n","# QMD — Query Markup Documents\r\n\r\nLocal, on-device search engine for personal knowledge bases. Indexes markdown\r\nnotes, meeting transcripts, documentation, and any text-based files, then\r\nprovides hybrid search combining keyword matching, semantic understanding, and\r\nLLM-powered reranking — all running locally with no cloud dependencies.\r\n\r\nCreated by [Tobi Lütke](https:\u002F\u002Fgithub.com\u002Ftobi\u002Fqmd). MIT licensed.\r\n\r\n## When to Use\r\n\r\n- User asks to search their notes, docs, knowledge base, or meeting transcripts\r\n- User wants to find something across a large collection of markdown\u002Ftext files\r\n- User wants semantic search (\"find notes about X concept\") not just keyword grep\r\n- User has already set up qmd collections and wants to query them\r\n- User asks to set up a local knowledge base or document search system\r\n- Keywords: \"search my notes\", \"find in my docs\", \"knowledge base\", \"qmd\"\r\n\r\n## Prerequisites\r\n\r\n### Node.js >= 22 (required)\r\n\r\n```bash\r\n# Check version\r\nnode --version  # must be >= 22\r\n\r\n# macOS — install or upgrade via Homebrew\r\nbrew install node@22\r\n\r\n# Linux — use NodeSource or nvm\r\ncurl -fsSL https:\u002F\u002Fdeb.nodesource.com\u002Fsetup_22.x | sudo -E bash -\r\nsudo apt-get install -y nodejs\r\n# or with nvm:\r\nnvm install 22 && nvm use 22\r\n```\r\n\r\n### SQLite with Extension Support (macOS only)\r\n\r\nmacOS system SQLite lacks extension loading. Install via Homebrew:\r\n\r\n```bash\r\nbrew install sqlite\r\n```\r\n\r\n### Install qmd\r\n\r\n```bash\r\nnpm install -g @tobilu\u002Fqmd\r\n# or with Bun:\r\nbun install -g @tobilu\u002Fqmd\r\n```\r\n\r\nFirst run auto-downloads 3 local GGUF models (~2GB total):\r\n\r\n| Model | Purpose | Size |\r\n|-------|---------|------|\r\n| embeddinggemma-300M-Q8_0 | Vector embeddings | ~300MB |\r\n| qwen3-reranker-0.6b-q8_0 | Result reranking | ~640MB |\r\n| qmd-query-expansion-1.7B | Query expansion | ~1.1GB |\r\n\r\n### Verify Installation\r\n\r\n```bash\r\nqmd --version\r\nqmd status\r\n```\r\n\r\n## Quick Reference\r\n\r\n| Command | What It Does | Speed |\r\n|---------|-------------|-------|\r\n| `qmd search \"query\"` | BM25 keyword search (no models) | ~0.2s |\r\n| `qmd vsearch \"query\"` | Semantic vector search (1 model) | ~3s |\r\n| `qmd query \"query\"` | Hybrid + reranking (all 3 models) | ~2-3s warm, ~19s cold |\r\n| `qmd get \u003Cdocid>` | Retrieve full document content | instant |\r\n| `qmd multi-get \"glob\"` | Retrieve multiple files | instant |\r\n| `qmd collection add \u003Cpath> --name \u003Cn>` | Add a directory as a collection | instant |\r\n| `qmd context add \u003Cpath> \"description\"` | Add context metadata to improve retrieval | instant |\r\n| `qmd embed` | Generate\u002Fupdate vector embeddings | varies |\r\n| `qmd status` | Show index health and collection info | instant |\r\n| `qmd mcp` | Start MCP server (stdio) | persistent |\r\n| `qmd mcp --http --daemon` | Start MCP server (HTTP, warm models) | persistent |\r\n\r\n## Setup Workflow\r\n\r\n### 1. Add Collections\r\n\r\nPoint qmd at directories containing your documents:\r\n\r\n```bash\r\n# Add a notes directory\r\nqmd collection add ~\u002Fnotes --name notes\r\n\r\n# Add project docs\r\nqmd collection add ~\u002Fprojects\u002Fmyproject\u002Fdocs --name project-docs\r\n\r\n# Add meeting transcripts\r\nqmd collection add ~\u002Fmeetings --name meetings\r\n\r\n# List all collections\r\nqmd collection list\r\n```\r\n\r\n### 2. Add Context Descriptions\r\n\r\nContext metadata helps the search engine understand what each collection\r\ncontains. This significantly improves retrieval quality:\r\n\r\n```bash\r\nqmd context add qmd:\u002F\u002Fnotes \"Personal notes, ideas, and journal entries\"\r\nqmd context add qmd:\u002F\u002Fproject-docs \"Technical documentation for the main project\"\r\nqmd context add qmd:\u002F\u002Fmeetings \"Meeting transcripts and action items from team syncs\"\r\n```\r\n\r\n### 3. Generate Embeddings\r\n\r\n```bash\r\nqmd embed\r\n```\r\n\r\nThis processes all documents in all collections and generates vector\r\nembeddings. Re-run after adding new documents or collections.\r\n\r\n### 4. Verify\r\n\r\n```bash\r\nqmd status   # shows index health, collection stats, model info\r\n```\r\n\r\n## Search Patterns\r\n\r\n### Fast Keyword Search (BM25)\r\n\r\nBest for: exact terms, code identifiers, names, known phrases.\r\nNo models loaded — near-instant results.\r\n\r\n```bash\r\nqmd search \"authentication middleware\"\r\nqmd search \"handleError async\"\r\n```\r\n\r\n### Semantic Vector Search\r\n\r\nBest for: natural language questions, conceptual queries.\r\nLoads embedding model (~3s first query).\r\n\r\n```bash\r\nqmd vsearch \"how does the rate limiter handle burst traffic\"\r\nqmd vsearch \"ideas for improving onboarding flow\"\r\n```\r\n\r\n### Hybrid Search with Reranking (Best Quality)\r\n\r\nBest for: important queries where quality matters most.\r\nUses all 3 models — query expansion, parallel BM25+vector, reranking.\r\n\r\n```bash\r\nqmd query \"what decisions were made about the database migration\"\r\n```\r\n\r\n### Structured Multi-Mode Queries\r\n\r\nCombine different search types in a single query for precision:\r\n\r\n```bash\r\n# BM25 for exact term + vector for concept\r\nqmd query $'lex: rate limiter\\nvec: how does throttling work under load'\r\n\r\n# With query expansion\r\nqmd query $'expand: database migration plan\\nlex: \"schema change\"'\r\n```\r\n\r\n### Query Syntax (lex\u002FBM25 mode)\r\n\r\n| Syntax | Effect | Example |\r\n|--------|--------|---------|\r\n| `term` | Prefix match | `perf` matches \"performance\" |\r\n| `\"phrase\"` | Exact phrase | `\"rate limiter\"` |\r\n| `-term` | Exclude term | `performance -sports` |\r\n\r\n### HyDE (Hypothetical Document Embeddings)\r\n\r\nFor complex topics, write what you expect the answer to look like:\r\n\r\n```bash\r\nqmd query $'hyde: The migration plan involves three phases. First, we add the new columns without dropping the old ones. Then we backfill data. Finally we cut over and remove legacy columns.'\r\n```\r\n\r\n### Scoping to Collections\r\n\r\n```bash\r\nqmd search \"query\" --collection notes\r\nqmd query \"query\" --collection project-docs\r\n```\r\n\r\n### Output Formats\r\n\r\n```bash\r\nqmd search \"query\" --json        # JSON output (best for parsing)\r\nqmd search \"query\" --limit 5     # Limit results\r\nqmd get \"#abc123\"                # Get by document ID\r\nqmd get \"path\u002Fto\u002Ffile.md\"       # Get by file path\r\nqmd get \"file.md:50\" -l 100     # Get specific line range\r\nqmd multi-get \"journals\u002F*.md\" --json  # Batch retrieve by glob\r\n```\r\n\r\n## MCP Integration (Recommended)\r\n\r\nqmd exposes an MCP server that provides search tools directly to\r\nHermes Agent via the native MCP client. This is the preferred\r\nintegration — once configured, the agent gets qmd tools automatically\r\nwithout needing to load this skill.\r\n\r\n### Option A: Stdio Mode (Simple)\r\n\r\nAdd to `~\u002F.hermes\u002Fconfig.yaml`:\r\n\r\n```yaml\r\nmcp_servers:\r\n  qmd:\r\n    command: \"qmd\"\r\n    args: [\"mcp\"]\r\n    timeout: 30\r\n    connect_timeout: 45\r\n```\r\n\r\nThis registers tools: `mcp_qmd_search`, `mcp_qmd_vsearch`,\r\n`mcp_qmd_deep_search`, `mcp_qmd_get`, `mcp_qmd_status`.\r\n\r\n**Tradeoff:** Models load on first search call (~19s cold start),\r\nthen stay warm for the session. Acceptable for occasional use.\r\n\r\n### Option B: HTTP Daemon Mode (Fast, Recommended for Heavy Use)\r\n\r\nStart the qmd daemon separately — it keeps models warm in memory:\r\n\r\n```bash\r\n# Start daemon (persists across agent restarts)\r\nqmd mcp --http --daemon\r\n\r\n# Runs on http:\u002F\u002Flocalhost:8181 by default\r\n```\r\n\r\nThen configure Hermes Agent to connect via HTTP:\r\n\r\n```yaml\r\nmcp_servers:\r\n  qmd:\r\n    url: \"http:\u002F\u002Flocalhost:8181\u002Fmcp\"\r\n    timeout: 30\r\n```\r\n\r\n**Tradeoff:** Uses ~2GB RAM while running, but every query is fast\r\n(~2-3s). Best for users who search frequently.\r\n\r\n### Keeping the Daemon Running\r\n\r\n#### macOS (launchd)\r\n\r\n```bash\r\ncat > ~\u002FLibrary\u002FLaunchAgents\u002Fcom.qmd.daemon.plist \u003C\u003C 'EOF'\r\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\u003C!DOCTYPE plist PUBLIC \"-\u002F\u002FApple\u002F\u002FDTD PLIST 1.0\u002F\u002FEN\"\r\n  \"http:\u002F\u002Fwww.apple.com\u002FDTDs\u002FPropertyList-1.0.dtd\">\r\n\u003Cplist version=\"1.0\">\r\n\u003Cdict>\r\n  \u003Ckey>Label\u003C\u002Fkey>\r\n  \u003Cstring>com.qmd.daemon\u003C\u002Fstring>\r\n  \u003Ckey>ProgramArguments\u003C\u002Fkey>\r\n  \u003Carray>\r\n    \u003Cstring>qmd\u003C\u002Fstring>\r\n    \u003Cstring>mcp\u003C\u002Fstring>\r\n    \u003Cstring>--http\u003C\u002Fstring>\r\n    \u003Cstring>--daemon\u003C\u002Fstring>\r\n  \u003C\u002Farray>\r\n  \u003Ckey>RunAtLoad\u003C\u002Fkey>\r\n  \u003Ctrue\u002F>\r\n  \u003Ckey>KeepAlive\u003C\u002Fkey>\r\n  \u003Ctrue\u002F>\r\n  \u003Ckey>StandardOutPath\u003C\u002Fkey>\r\n  \u003Cstring>\u002Ftmp\u002Fqmd-daemon.log\u003C\u002Fstring>\r\n  \u003Ckey>StandardErrorPath\u003C\u002Fkey>\r\n  \u003Cstring>\u002Ftmp\u002Fqmd-daemon.log\u003C\u002Fstring>\r\n\u003C\u002Fdict>\r\n\u003C\u002Fplist>\r\nEOF\r\n\r\nlaunchctl load ~\u002FLibrary\u002FLaunchAgents\u002Fcom.qmd.daemon.plist\r\n```\r\n\r\n#### Linux (systemd user service)\r\n\r\n```bash\r\nmkdir -p ~\u002F.config\u002Fsystemd\u002Fuser\r\n\r\ncat > ~\u002F.config\u002Fsystemd\u002Fuser\u002Fqmd-daemon.service \u003C\u003C 'EOF'\r\n[Unit]\r\nDescription=QMD MCP Daemon\r\nAfter=network.target\r\n\r\n[Service]\r\nExecStart=qmd mcp --http --daemon\r\nRestart=on-failure\r\nRestartSec=10\r\nEnvironment=PATH=\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin\r\n\r\n[Install]\r\nWantedBy=default.target\r\nEOF\r\n\r\nsystemctl --user daemon-reload\r\nsystemctl --user enable --now qmd-daemon\r\nsystemctl --user status qmd-daemon\r\n```\r\n\r\n### MCP Tools Reference\r\n\r\nOnce connected, these tools are available as `mcp_qmd_*`:\r\n\r\n| MCP Tool | Maps To | Description |\r\n|----------|---------|-------------|\r\n| `mcp_qmd_search` | `qmd search` | BM25 keyword search |\r\n| `mcp_qmd_vsearch` | `qmd vsearch` | Semantic vector search |\r\n| `mcp_qmd_deep_search` | `qmd query` | Hybrid search + reranking |\r\n| `mcp_qmd_get` | `qmd get` | Retrieve document by ID or path |\r\n| `mcp_qmd_status` | `qmd status` | Index health and stats |\r\n\r\nThe MCP tools accept structured JSON queries for multi-mode search:\r\n\r\n```json\r\n{\r\n  \"searches\": [\r\n    {\"type\": \"lex\", \"query\": \"authentication middleware\"},\r\n    {\"type\": \"vec\", \"query\": \"how user login is verified\"}\r\n  ],\r\n  \"collections\": [\"project-docs\"],\r\n  \"limit\": 10\r\n}\r\n```\r\n\r\n## CLI Usage (Without MCP)\r\n\r\nWhen MCP is not configured, use qmd directly via terminal:\r\n\r\n```\r\nterminal(command=\"qmd query 'what was decided about the API redesign' --json\", timeout=30)\r\n```\r\n\r\nFor setup and management tasks, always use terminal:\r\n\r\n```\r\nterminal(command=\"qmd collection add ~\u002FDocuments\u002Fnotes --name notes\")\r\nterminal(command=\"qmd context add qmd:\u002F\u002Fnotes 'Personal research notes and ideas'\")\r\nterminal(command=\"qmd embed\")\r\nterminal(command=\"qmd status\")\r\n```\r\n\r\n## How the Search Pipeline Works\r\n\r\nUnderstanding the internals helps choose the right search mode:\r\n\r\n1. **Query Expansion** — A fine-tuned 1.7B model generates 2 alternative\r\n   queries. The original gets 2x weight in fusion.\r\n2. **Parallel Retrieval** — BM25 (SQLite FTS5) and vector search run\r\n   simultaneously across all query variants.\r\n3. **RRF Fusion** — Reciprocal Rank Fusion (k=60) merges results.\r\n   Top-rank bonus: #1 gets +0.05, #2-3 get +0.02.\r\n4. **LLM Reranking** — qwen3-reranker scores top 30 candidates (0.0-1.0).\r\n5. **Position-Aware Blending** — Ranks 1-3: 75% retrieval \u002F 25% reranker.\r\n   Ranks 4-10: 60\u002F40. Ranks 11+: 40\u002F60 (trusts reranker more for long tail).\r\n\r\n**Smart Chunking:** Documents are split at natural break points (headings,\r\ncode blocks, blank lines) targeting ~900 tokens with 15% overlap. Code\r\nblocks are never split mid-block.\r\n\r\n## Best Practices\r\n\r\n1. **Always add context descriptions** — `qmd context add` dramatically\r\n   improves retrieval accuracy. Describe what each collection contains.\r\n2. **Re-embed after adding documents** — `qmd embed` must be re-run when\r\n   new files are added to collections.\r\n3. **Use `qmd search` for speed** — when you need fast keyword lookup\r\n   (code identifiers, exact names), BM25 is instant and needs no models.\r\n4. **Use `qmd query` for quality** — when the question is conceptual or\r\n   the user needs the best possible results, use hybrid search.\r\n5. **Prefer MCP integration** — once configured, the agent gets native\r\n   tools without needing to load this skill each time.\r\n6. **Daemon mode for frequent users** — if the user searches their\r\n   knowledge base regularly, recommend the HTTP daemon setup.\r\n7. **First query in structured search gets 2x weight** — put the most\r\n   important\u002Fcertain query first when combining lex and vec.\r\n\r\n## Troubleshooting\r\n\r\n### \"Models downloading on first run\"\r\nNormal — qmd auto-downloads ~2GB of GGUF models on first use.\r\nThis is a one-time operation.\r\n\r\n### Cold start latency (~19s)\r\nThis happens when models aren't loaded in memory. Solutions:\r\n- Use HTTP daemon mode (`qmd mcp --http --daemon`) to keep warm\r\n- Use `qmd search` (BM25 only) when models aren't needed\r\n- MCP stdio mode loads models on first search, stays warm for session\r\n\r\n### macOS: \"unable to load extension\"\r\nInstall Homebrew SQLite: `brew install sqlite`\r\nThen ensure it's on PATH before system SQLite.\r\n\r\n### \"No collections found\"\r\nRun `qmd collection add \u003Cpath> --name \u003Cname>` to add directories,\r\nthen `qmd embed` to index them.\r\n\r\n### Embedding model override (CJK\u002Fmultilingual)\r\nSet `QMD_EMBED_MODEL` environment variable for non-English content:\r\n```bash\r\nexport QMD_EMBED_MODEL=\"your-multilingual-model\"\r\n```\r\n\r\n## Data Storage\r\n\r\n- **Index & vectors:** `~\u002F.cache\u002Fqmd\u002Findex.sqlite`\r\n- **Models:** Auto-downloaded to local cache on first run\r\n- **No cloud dependencies** — everything runs locally\r\n\r\n## References\r\n\r\n- [GitHub: tobi\u002Fqmd](https:\u002F\u002Fgithub.com\u002Ftobi\u002Fqmd)\r\n- [QMD Changelog](https:\u002F\u002Fgithub.com\u002Ftobi\u002Fqmd\u002Fblob\u002Fmain\u002FCHANGELOG.md)\r\n",{"name":5,"author":48,"license":15,"version":49,"metadata":50,"platforms":60,"description":7},"Hermes Agent + Teknium","1.0.0",{"hermes":51},{"tags":52,"related_skills":58},[53,54,55,56,34,57],"Search","Knowledge-Base","RAG","Notes","Local-AI",[39,59,27],"native-mcp",[41,38],"main","0d1434f89f4bc6b07e9d272accd8c1013768820f","archive\u002Fskill-md-reviewed\u002Fsha256\u002F2d\u002F2da1534593f7d61e8251d0f0544f5e87f95facd726b129f46dd7e3a1545fea1b",0,"https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills","https:\u002F\u002Fgithub.com\u002Fzapabob","The Open University of JAPAN　2019-now\r\n\r\nTokyo University of Science　2007-2010","2026-10-26 16:29:01",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add zapabob\u002FSkills --skill qmd",{"tool":75,"command":76},"bunx","bunx skills add zapabob\u002FSkills --skill qmd",{"tool":78,"command":79},"pnpm","pnpm dlx skills add zapabob\u002FSkills --skill qmd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Farchive\u002Fskill-md-reviewed\u002Fsha256\u002F2d\u002F2da1534593f7d61e8251d0f0544f5e87f95facd726b129f46dd7e3a1545fea1b\u002FSKILL.md",true,[],[84,114,149,176,203,220],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":99,"publishedAt":43},"01M6GJTE1GESGGF9K028Y7753E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fxurl\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[90,93,94],{"categoryNo":91,"categoryName":92,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[86,100,41,40,101,38,102,103,35,104,105,106,107,108,109,110,61,111,112,113],"openclaw","github","windows","official","https","social-media","api","Media","hermes","hermes agent","twitter","social","via","post",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":131,"publishedAt":43},"01M6GJT8S1PXQ8WPXT1HSNBWH2","writing-plans","Write implementation plans: bite-sized tasks, paths, code.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwriting-plans\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[120,123,126,127,128],{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":124,"categoryName":125,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},{"categoryNo":129,"categoryName":130,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000036","内容创作者",[132,133,134,135,41,136,38,137,102,138,139,140,141,142,143,144,145,146,147,148],"writing","writing plans","plans","design","review","workflow","documentation","tasks","development","code","planning","code-review","subagent","write","superpowers","paths","test-driven-development",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":158,"publishedAt":43},"01M6GJST0H5X7WHBJ3BZK0DVKH","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwhisper\u002Fvariants\u002Fhermes-agent-optional\u002FSKILL.md",[155],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",[151,41,38,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],"openai","speech","multimodal","Transformers","ASR","Audio","text","model","speech recognition","use","general","multilingual","translation","english","identification","processing","Audio Processing",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":185,"publishedAt":43},"01M6GJSMRQ8EETZTYMG72P70EA","weights-and-biases","W&B: log ML experiments, sweeps, model registry, dashboards.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fweights-and-biases\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[182],{"categoryNo":183,"categoryName":184,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000013","分析与可视化",[186,41,187,188,102,189,190,191,192,193,194,166,195,196,197,198,199,200,201,202],"weights and biases","tensorflow","experiments","pytorch","visualization","registry","real-time","tuning","dashboards","experiment","log","time","Experiment Tracking","Model Registry","Hyperparameter Tuning","WandB","Real-Time Visualization",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":207,"categories":208,"keywords":210,"publishedAt":43},"01M6GJS19KDPRY112JTR326S06","watchers","Poll RSS, JSON APIs, and GitHub with watermark dedup.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwatchers\u002Fvariants\u002Fhermes-agent-optional\u002FSKILL.md",[209],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[205,41,211,101,38,212,213,214,215,216,217,108,109,218,219],"terminal","automation","http","monitoring","cron","json","rss","devops","with",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":228,"publishedAt":43},"01M6GJRHJD2A6Q830SWF9W48BC","serving-llms-vllm","vLLM: high-throughput LLM serving, OpenAI API, quantization.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fvllm\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[226,227],{"categoryNo":91,"categoryName":92,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},[229,230,231,38,232,159,233,234,235,162,236,106,237,238,239,240,241,242,243,244],"llms","vLLM","serving llms vllm","research","openai api","tensor","Inference Serving","Production","llm serving","High Throughput","PagedAttention","Continuous Batching","Quantization","Tensor Parallelism","high-throughput","throughput"]