Claude-skills qmd
Local hybrid search for markdown notes and docs. Use when searching notes, finding related content, or retrieving documents from indexed collections.
install
source · Clone the upstream repo
git clone https://github.com/ckorhonen/claude-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ckorhonen/claude-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/qmd" ~/.claude/skills/ckorhonen-claude-skills-qmd && rm -rf "$T"
manifest:
skills/qmd/SKILL.mdsource content
qmd - Quick Markdown Search
Local search engine for Markdown notes, docs, and knowledge bases. Index once, search fast.
When to use (trigger phrases)
- "search my notes / docs / knowledge base"
- "find related notes"
- "retrieve a markdown document from my collection"
- "search local markdown files"
Default behavior (important)
- Prefer
(BM25). It's typically instant and should be the default.qmd search - Use
only when keyword search fails and you need semantic similarity (can be very slow on a cold start).qmd vsearch - Avoid
unless the user explicitly wants the highest quality hybrid results and can tolerate long runtimes/timeouts.qmd query
Search modes
| Mode | Command | Speed | Use case |
|---|---|---|---|
| BM25 (default) | | Instant | Keyword matching |
| Vector | | ~1 min cold | Semantic similarity |
| Hybrid | | Slowest | LLM reranking (skip unless requested) |
Common commands
qmd search "query" # default - fast keyword search qmd search "query" -c notes # search specific collection qmd search "query" -n 10 # more results qmd search "query" --json # JSON output qmd search "query" --all --files --min-score 0.3
Useful options
: number of results-n <num>
: restrict to a collection-c, --collection <name>
: return all matches above a threshold--all --min-score <num>
/--json
: agent-friendly output formats--files
: return full document content--full
Retrieve documents
qmd get "path/to/file.md" # Full document qmd get "#docid" # By ID from search results qmd multi-get "journals/2025-05*.md" qmd multi-get "doc1.md, doc2.md, #abc123" --json
Maintenance
qmd status # Index health qmd update # Re-index changed files qmd embed # Update embeddings
Setup (if not installed)
# Install bun install -g https://github.com/tobi/qmd # Create collection qmd collection add /path/to/notes --name notes --mask "**/*.md" qmd context add qmd://notes "Description of this collection" # optional qmd embed # one-time to enable vector + hybrid search
Performance notes
is typically instantqmd search
can be ~1 minute on cold start (loads local LLM for query expansion)qmd vsearch
adds LLM reranking on top ofqmd query
, even slowervsearch
Common Pitfalls
Search query too vague (irrelevant results)
Problem: Broad queries like "notes" or "project" return hundreds of low-relevance matches.
Solution:
- Use specific keywords:
notqmd search "Python async context managers"qmd search "Python" - Combine keywords:
qmd search "deadline March quarterly review" - Use quotes for exact phrases:
qmd search "exact phrase match" - Check result scores:
to filter low-confidence matchesqmd search "query" --all --min-score 0.5
Index not updated (missing recent files)
Problem: Newly created or recently modified files don't appear in search results.
Solution:
# Check index status qmd status # Re-index all changed files qmd update # Full re-index if update doesn't help qmd collection remove <name> qmd collection add /path/to/notes --name <name> --mask "**/*.md" qmd embed # if vector search enabled
Path filters wrong (excluding relevant directories)
Problem: Search doesn't find files because the collection mask is too narrow or collection path is wrong.
Solution:
# List current collections qmd status # Verify collection path matches your notes location # If path changed, re-add collection: qmd collection remove <old-name> qmd collection add /path/to/notes --name <name> --mask "**/*.md" # Common issue: subdirectories excluded by mask # If notes are in journals/2025/*, use: --mask "**/*.md" # Not: --mask "*.md" (which only matches top level)
Search timeout on large vaults (performance issues)
Problem:
qmd query or qmd vsearch hangs or times out on large knowledge bases (1000+ files).
Solution:
- Avoid
on large vaults (LLM reranking is too slow)qmd query - Use
instead (BM25 is fast even on huge collections)qmd search - If semantic search needed, use
withqmd vsearch
to limit results-n 5 - Restrict search scope with
to search one collection instead of all:-c <collection>qmd search "query" -c notes -n 5 # faster than searching all collections - If vault exceeds 5000 files, consider splitting into multiple collections
Missing configuration (qmd not initialized)
Problem:
qmd status shows "No collections" or qmd search returns no results.
Solution:
# Install qmd if missing bun install -g https://github.com/tobi/qmd # Set up a collection qmd collection add /path/to/notes --name notes --mask "**/*.md" # Enable vector search (optional but recommended) qmd embed # Verify setup qmd status # Should show your collection with file count
Semantic search returns irrelevant results (vsearch/query)
Problem: Vector search matches by topic but misses what you actually wanted.
Solution:
- Fall back to
(BM25 keyword matching is more precise for specific terms)qmd search - Rephrase query to include actual keywords: not "What are my goals?" but "goals quarterly review objectives"
- Use
if available (adds LLM reranking), but only if you can tolerate slow runtimeqmd query - Use
to get fewer, higher-confidence matches from vector search-n 3