nousresearch/hermes-agent/qmd
Claude Code and agent skill by nousresearch/hermes-agent
- community
Checking that the SKILL.md file is still in the repository.
Hybrid local search over notes, docs, and transcripts.
Install
npx vskill@latest install nousresearch/hermes-agent/qmdSKILL.md
The same SKILL.md was published earlier as nousresearch/hermes-agent/qmd.
QMD — Query Markup Documents
Local, on-device search engine for personal knowledge bases. Indexes markdown notes, meeting transcripts, documentation, and any text-based files, then provides hybrid search combining keyword matching, semantic understanding, and LLM-powered reranking — all running locally with no cloud dependencies.
Created by Tobi Lütke. MIT licensed.
When to Use
- User asks to search their notes, docs, knowledge base, or meeting transcripts
- User wants to find something across a large collection of markdown/text files
- User wants semantic search ("find notes about X concept") not just keyword grep
- User has already set up qmd collections and wants to query them
- User asks to set up a local knowledge base or document search system
- Keywords: "search my notes", "find in my docs", "knowledge base", "qmd"
Prerequisites
Node.js >= 22 (required)
SQLite with Extension Support (macOS only)
macOS system SQLite lacks extension loading. Install via Homebrew:
Install qmd
First run auto-downloads 3 local GGUF models (~2GB total):
| Model | Purpose | Size | |
|---|---|---|---|
| embeddinggemma-300M-Q8_0 | Vector embeddings | ~300MB | |
| qwen3-reranker-0.6b-q8_0 | Result reranking | ~640MB | |
| qmd-query-expansion-1.7B | Query expansion | ~1.1GB |
Verify Installation
Quick Reference
| Command | What It Does | Speed | |
|---|---|---|---|
qmd search "query" | BM25 keyword search (no models) | ~0.2s | |
qmd vsearch "query" | Semantic vector search (1 model) | ~3s | |
qmd query "query" | Hybrid + reranking (all 3 models) | ~2-3s warm, ~19s cold | |
qmd get <docid> | Retrieve full document content | instant | |
qmd multi-get "glob" | Retrieve multiple files | instant | |
qmd collection add <path> --name <n> | Add a directory as a collection | instant | |
qmd context add <path> "description" | Add context metadata to improve retrieval | instant | |
qmd embed | Generate/update vector embeddings | varies | |
qmd status | Show index health and collection info | instant | |
qmd mcp | Start MCP server (stdio) | persistent | |
qmd mcp --http --daemon | Start MCP server (HTTP, warm models) | persistent |
Setup Workflow
1. Add Collections
Point qmd at directories containing your documents:
2. Add Context Descriptions
Context metadata helps the search engine understand what each collection contains. This significantly improves retrieval quality:
3. Generate Embeddings
This processes all documents in all collections and generates vector embeddings. Re-run after adding new documents or collections.
4. Verify
Search Patterns
Fast Keyword Search (BM25)
Best for: exact terms, code identifiers, names, known phrases. No models loaded — near-instant results.
Semantic Vector Search
Best for: natural language questions, conceptual queries. Loads embedding model (~3s first query).
Hybrid Search with Reranking (Best Quality)
Best for: important queries where quality matters most. Uses all 3 models — query expansion, parallel BM25+vector, reranking.
Structured Multi-Mode Queries
Combine different search types in a single query for precision:
Query Syntax (lex/BM25 mode)
| Syntax | Effect | Example | |
|---|---|---|---|
term | Prefix match | perf matches "performance" | |
"phrase" | Exact phrase | "rate limiter" | |
-term | Exclude term | performance -sports |
HyDE (Hypothetical Document Embeddings)
For complex topics, write what you expect the answer to look like:
Scoping to Collections
Output Formats
MCP Integration (Recommended)
qmd exposes an MCP server that provides search tools directly to Hermes Agent via the native MCP client. This is the preferred integration — once configured, the agent gets qmd tools automatically without needing to load this skill.
Option A: Stdio Mode (Simple)
Add to ~/.hermes/config.yaml:
This registers tools: mcp_qmd_search, mcp_qmd_vsearch, mcp_qmd_deep_search, mcp_qmd_get, mcp_qmd_status.
Tradeoff: Models load on first search call (~19s cold start), then stay warm for the session. Acceptable for occasional use.
Option B: HTTP Daemon Mode (Fast, Recommended for Heavy Use)
Start the qmd daemon separately — it keeps models warm in memory:
Then configure Hermes Agent to connect via HTTP:
Tradeoff: Uses ~2GB RAM while running, but every query is fast (~2-3s). Best for users who search frequently.
Keeping the Daemon Running
macOS (launchd)
write_file ~/Library/LaunchAgents/com.qmd.daemon.plist:
Linux (systemd user service)
write_file ~/.config/systemd/user/qmd-daemon.service (it creates the directory):
MCP Tools Reference
Once connected, these tools are available as mcp_qmd_*:
| MCP Tool | Maps To | Description | |
|---|---|---|---|
mcp_qmd_search | qmd search | BM25 keyword search | |
mcp_qmd_vsearch | qmd vsearch | Semantic vector search | |
mcp_qmd_deep_search | qmd query | Hybrid search + reranking | |
mcp_qmd_get | qmd get | Retrieve document by ID or path | |
mcp_qmd_status | qmd status | Index health and stats |
The MCP tools accept structured JSON queries for multi-mode search:
CLI Usage (Without MCP)
When MCP is not configured, use qmd directly via terminal:
For setup and management tasks, always use terminal:
How the Search Pipeline Works
Understanding the internals helps choose the right search mode:
- Query Expansion — A fine-tuned 1.7B model generates 2 alternative
queries. The original gets 2x weight in fusion.
- Parallel Retrieval — BM25 (SQLite FTS5) and vector search run
simultaneously across all query variants.
- RRF Fusion — Reciprocal Rank Fusion (k=60) merges results.
Top-rank bonus: #1 gets +0.05, #2-3 get +0.02.
- LLM Reranking — qwen3-reranker scores top 30 candidates (0.0-1.0).
- Position-Aware Blending — Ranks 1-3: 75% retrieval / 25% reranker.
Ranks 4-10: 60/40. Ranks 11+: 40/60 (trusts reranker more for long tail).
Smart Chunking: Documents are split at natural break points (headings, code blocks, blank lines) targeting ~900 tokens with 15% overlap. Code blocks are never split mid-block.
Best Practices
- Always add context descriptions —
qmd context adddramatically
improves retrieval accuracy. Describe what each collection contains.
- Re-embed after adding documents —
qmd embedmust be re-run when
new files are added to collections.
- Use `qmd search` for speed — when you need fast keyword lookup
(code identifiers, exact names), BM25 is instant and needs no models.
- Use `qmd query` for quality — when the question is conceptual or
the user needs the best possible results, use hybrid search.
- Prefer MCP integration — once configured, the agent gets native
tools without needing to load this skill each time.
- Daemon mode for frequent users — if the user searches their
knowledge base regularly, recommend the HTTP daemon setup.
- First query in structured search gets 2x weight — put the most
important/certain query first when combining lex and vec.
Troubleshooting
"Models downloading on first run"
Normal — qmd auto-downloads ~2GB of GGUF models on first use. This is a one-time operation.
Cold start latency (~19s)
This happens when models aren't loaded in memory. Solutions:
- Use HTTP daemon mode (
qmd mcp --http --daemon) to keep warm - Use
qmd search(BM25 only) when models aren't needed - MCP stdio mode loads models on first search, stays warm for session
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingoptional-skills/research/qmd/SKILL.md
Popularity
- Repository stars
- 243,741
- Repository forks
- 50,281
- 7-day trend score
- 62
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 9 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nousresearch/hermes-agent/qmd)