search

A search command for finding notes in an Obsidian vault by meaning as well as matching words. Semantic search finds related ideas even when the exact words differ.

In plain words
What is it for?
Use it to search a second-brain vault and display the most relevant note files and excerpts.
Why use it?
It helps locate relevant notes without remembering their filenames or precise wording. It also checks whether the required search tool and vault collection are configured.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/technicalpickles/pickled-claude-plugins/search
Clone the repo
git clone --depth 1 https://github.com/technicalpickles/pickled-claude-plugins
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00007 $0.00776
Opus 5 $0.00003 $0.00388
Sonnet 5 $0.00001 $0.00155
Haiku 4.5 $0.00001 $0.00078

Measured 2d ago against content hash 3dba7835707a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/second-brain/commands/search.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Search Second Brain

Search your Obsidian vault using qmd's semantic search (combines BM25 + vector similarity + reranking).

Prerequisites

  • qmd must be installed and available in PATH
  • A qmd collection must be configured for your vault

Step 1: Check Prerequisites

Verify qmd is available:

which qmd

If not found, inform user:

qmd is not installed. Install it via:
  bun add -g qmd
Then configure a collection:
  qmd collection add ~/path/to/vault --name second-brain

Step 2: Load Configuration

Get the qmd collection name via sb:

npx @techpickles/sb config qmd-collection

This returns the configured collection name (defaults to second-brain if not set).

Verify the collection exists:

qmd collection list

If collection doesn't exist, inform user which collections are available and suggest adding one.

If no argument provided: Ask: "What would you like to search for?"

Run the search:

qmd query "{query}" -c {collection} -n 10 --json

Step 4: Present Results

Parse JSON output. Each result has:

  • file: qmd://{collection}/{path} - strip the qmd://{collection}/ prefix
  • score: 0.0-1.0 - convert to percentage
  • title: document title from frontmatter or first heading
  • snippet: matching content with diff-like context markers (strip @@ ... @@ lines)

Present results clearly:

## Search Results for "{query}"

1. **{title}** (93%)
   `{path relative to vault}`
   > {cleaned snippet preview, 2-3 lines max}

2. **{title}** (51%)
   ...

Include:

  • Title from the result
  • Relevance score as percentage (score × 100)
  • File path relative to vault (strip qmd://collection/ prefix)
  • Snippet preview (clean up diff markers, show meaningful content)

If no results, suggest:

  • Try different keywords
  • Check if vault has been indexed (qmd update && qmd embed)

Step 5: Offer Follow-up Actions

After showing results, offer to:

  • Read a result - Use qmd get "qmd://{collection}/{path}" to retrieve full content
  • Search again - Try different or refined terms

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 120 lines · 7 tokens per session scan A 3dba7835707a

Subscribe to this mod's changes

search is a command published in the GitHub repository technicalpickles/pickled-claude-plugins (10 stars, last pushed 5d ago), licensed MIT. It adds 7 tokens to every session and 776 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.