From onebrain
Set up and manage qmd search index for faster vault search. Subcommands: setup, embed, status, reindex, uninstall.
npx claudepluginhub kengio/onebrain --plugin onebrainThis skill uses the workspace's default tool permissions.
qmd is an optional local search engine that indexes your vault for fast keyword and semantic search. When active, the agent uses it automatically for vault-wide searches.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Performs token-optimized structural code search using tree-sitter AST parsing to discover symbols, outline files, and unfold code without reading full files.
qmd is an optional local search engine that indexes your vault for fast keyword and semantic search. When active, the agent uses it automatically for vault-wide searches.
Usage: /qmd <subcommand>
Available subcommands: setup, embed, status, reindex, uninstall
If no subcommand is given, show this help and list available subcommands.
Set up qmd for this vault. Creates a collection, stores it in vault.yml, and runs an initial index.
Ask using AskUserQuestion:
If user selects Cancel, stop.
Read vault.yml. If qmd_collection key is already present:
qmd is already configured for this vault (collection:
<value>). To reconfigure, run/qmd uninstallfirst, then/qmd setupagain.
Stop.
Run: which qmd (macOS/Linux) or where qmd (Windows).
If qmd is NOT found:
Ask using AskUserQuestion:
If Cancel: tell user "You can install qmd manually with npm install -g @tobilu/qmd, then run /qmd setup again." Stop.
If npm: run npm install -g @tobilu/qmd. If it fails, show the error and stop.
If bun: run bun install -g @tobilu/qmd. If it fails, show the error and stop.
After installation, verify with which qmd. If still not found, tell user to check their PATH and stop.
basename "$CLAUDE_PROJECT_DIR" (or PowerShell equivalent)openssl rand -hex 3 first; if that fails, try python3 -c "import secrets; print(secrets.token_hex(3))". If both fail, tell the user "Could not generate a unique collection name. Please run /qmd setup again." and stop.<vault-dirname>-<hex> (e.g., onebrain-a3f2c1)Read vault.yml. Get folders.archive value (default: 06-archive).
Run:
qmd collection add <vault-root-path> --name <collection-name> --ignore ".obsidian/**" --ignore ".claude/**" --ignore ".git/**" --ignore "docs/**" --ignore "<archive-folder>/**" --ignore "attachments/**"
Where <vault-root-path> is the value of $CLAUDE_PROJECT_DIR and <archive-folder> is the value read in Step 5.
If the command fails, show the error and stop.
Run:
qmd context add "qmd://<collection-name>" "Personal Obsidian knowledge vault : notes, projects, areas, resources, and session logs"
If this command fails, report the error but continue (context is optional metadata).
Read vault.yml. Add qmd_collection: <collection-name> as a top-level key immediately after the method: line (before the folders: block). Write the full updated vault.yml back.
Example of updated vault.yml:
method: onebrain
qmd_collection: onebrain-a3f2c1
folders:
inbox: 00-inbox
...
If the write fails, show the error. Tell the user to manually add qmd_collection: <collection-name> to vault.yml. Stop.
Run:
qmd update -c <collection-name>
Report progress. If it fails, show the error : the collection is created but not indexed. User can run /qmd reindex to retry.
Say:
qmd is set up! Collection
<collection-name>is indexed and ready.
- The agent will now use qmd for vault-wide searches automatically
- The index updates whenever Claude writes or edits files in this vault (via hook)
- Run
/qmd embedto enable semantic/similarity search (optional, slower first run)- Run
/qmd statusto check index health- Run
/qmd uninstallto remove qmd integration from this vault
Generate vector embeddings for semantic search.
Read vault.yml. If qmd_collection key is missing:
qmd is not configured for this vault. Run
/qmd setupfirst.
Stop.
Check which qmd. If not found:
qmd is not installed. Run
/qmd setupto install and configure it.
Stop.
Ask using AskUserQuestion:
If Cancel, stop.
Run:
qmd embed -c <collection-name>
Where <collection-name> is read from vault.yml qmd_collection.
Report completion or any errors.
Say:
Embeddings generated. Semantic search is now active : use natural language queries like "find notes about project planning" and qmd will find conceptually related notes.
Show collection info and index health.
Read vault.yml for qmd_collection. If missing:
qmd is not configured for this vault. Run
/qmd setupto enable it.
Stop.
Check which qmd. If not found:
qmd binary not found. It may have been uninstalled. Run
/qmd setupto reinstall and reconfigure.
Stop.
Run:
qmd collection list
Show the output to the user. Highlight the line for the vault's collection name.
Force a full BM25 reindex of the vault collection.
Read vault.yml for qmd_collection. If missing:
qmd is not configured for this vault. Run
/qmd setupfirst.
Stop.
Check which qmd. If not found:
qmd is not installed. Run
/qmd setupto install and configure it.
Stop.
Run:
qmd update -c <collection-name>
Where <collection-name> is read from vault.yml qmd_collection.
Report progress and any errors.
Say:
Index updated. All vault notes are now searchable.
Remove qmd integration from this vault. Does not uninstall the qmd binary.
Read vault.yml. If qmd_collection key is missing:
qmd is not configured for this vault. Nothing to uninstall.
Stop.
Ask using AskUserQuestion:
If Cancel, stop.
Read qmd_collection from vault.yml. Run:
qmd collection remove <collection-name>
If qmd is not installed or the command fails, report the error but continue to Step 4 (still need to clean vault.yml).
Read vault.yml. Remove the qmd_collection: ... line. Write the full updated vault.yml back.
If the write fails, show the error. Tell the user to manually remove the qmd_collection line from vault.yml.
Say:
qmd search disabled for this vault. The agent will use standard Glob/Grep/Read search.
You can re-enable anytime with
/qmd setup.