howto-qmd
Use when searching markdown knowledge bases, documentation, or notes for relevant context - provides qmd CLI syntax for keyword, semantic, and hybrid search across indexed collections
What this skill does
# Using qmd for Knowledge Base Search ## Overview qmd is a local search engine for markdown documents. It combines BM25 keyword search, vector semantic search, and LLM-powered hybrid re-ranking. Use it to find relevant context in documentation, notes, and knowledge bases when grep is too literal and you need conceptual matching. ## When to Use **Prefer qmd over grep when:** - Searching documentation or notes for conceptually related content - You know what you're looking for but not the exact terms used - You need to find relevant context across a large markdown knowledge base - Building context for a task from scattered documentation **Use grep instead when:** - Searching code files (qmd indexes markdown only) - Looking for exact string matches or regex patterns - The search target is a known identifier, import, or error message ## Search Modes | Mode | Command | Speed | Best For | |------|---------|-------|----------| | Keyword (BM25) | `qmd search` | Fast | Known terms, exact phrases | | Semantic (vector) | `qmd vsearch` | Slow | Conceptual queries, fuzzy recall | | Hybrid (re-ranked) | `qmd query` | Slowest | Highest quality, broad exploration | **Default to `qmd search`** unless keyword results are insufficient. Escalate to `vsearch` or `query` only when needed. ## CLI Quick Reference ```bash # Keyword search (fast, use first) qmd search "authentication flow" # Semantic search (finds conceptually related content) qmd vsearch "how users log in" # Hybrid with LLM re-ranking (most thorough) qmd query "best practices for session management" # Restrict to a collection qmd search "rate limiting" -c api-docs # More results qmd search "error handling" -n 20 # Full document content in results qmd search "deployment" --full # With line numbers qmd search "config" --full --line-numbers # JSON output for structured processing qmd search "auth" --json --full # Retrieve a specific document qmd get "docs/auth.md" --full # Retrieve from a specific line qmd get "docs/auth.md:45" -l 100 # Batch retrieve by glob qmd multi-get "docs/**/*.md" --json ``` ## Collection Management ```bash # Add a collection qmd collection add ~/projects/docs --name project-docs --mask "**/*.md" # List collections qmd collection list # Remove a collection qmd collection remove old-notes # Rebuild keyword index qmd update # Generate/update vector embeddings (required for vsearch/query) qmd embed # Check index health qmd status ``` ## Output Formats | Flag | Format | Use Case | |------|--------|----------| | (default) | Human-readable | Interactive use | | `--json` | JSON | Programmatic processing | | `--files` | CSV: docid,score,filepath,context | File-oriented workflows | | `--xml` | XML | Structured integration | | `--md` | Markdown | Documentation pipelines | ## Filtering and Scoring ```bash # Minimum relevance threshold qmd search "deployment" --min-score 0.5 # All results above threshold qmd search "config" --all --min-score 0.3 # Skip large files qmd search "setup" --max-bytes 50000 ``` ## Practical Patterns **Gather context before starting a task:** ```bash # Find all relevant docs for a feature area qmd search "authentication" -c project-docs -n 10 --files # Then retrieve the most relevant ones qmd get "docs/auth-design.md" --full --line-numbers ``` **Escalation pattern when keywords miss:** ```bash # 1. Try keyword first (fast) qmd search "retry logic" # 2. If too few results, try semantic qmd vsearch "how failures are retried" # 3. If still unclear, use hybrid qmd query "error recovery and retry mechanisms" ``` **Bulk context loading:** ```bash qmd multi-get "design-docs/*.md" --json ``` ## Common Mistakes | Mistake | Fix | |---------|-----| | Using `qmd query` for every search | Start with `qmd search`, escalate only if needed | | Forgetting to run `qmd embed` | Required once before `vsearch`/`query` work | | Searching code files with qmd | qmd indexes markdown only; use grep or ast-grep for code | | Not specifying `-c` with many collections | Restrict to relevant collection for better signal | | Ignoring `--min-score` with `--all` | Unfiltered results include low-relevance noise | ## Red Flags - Running `qmd query` repeatedly in a loop (expensive; cache or batch instead) - Using qmd when a simple grep for a known string would suffice - Forgetting `qmd update` after documents change - Not running `qmd embed` after adding new collections
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.