| name | search |
| description | Search the vault. Use when the user asks 'what did I think about X', 'find notes on X', 'do I have anything about X', 'search for X', or uses /search. Returns relevant vault files ranked by relevance. |
Search Skill
Index-first retrieval across the vault. Local, instant, no embeddings.
Search Strategy
Query → Read vault/index.md FIRST → Navigate to relevant pages → Follow wikilinks → (if insufficient) → Grep vault → (Mirror fallback, if enabled) → Merge & rank
Step 0: Read the Index First (Karpathy pattern)
ALWAYS start by reading vault/index.md. It is the master catalog. Scan its tables for pages matching the query by title, stream, or summary.
This is faster and more accurate than grepping — the one-line summaries let you navigate directly to the right pages without scanning every file.
If the index gives 3+ strong matches, skip the full-text grep (Step 1a) and read those pages directly.
Step 1: Search the Vault
1a. Full-text search (only if the index was insufficient)
Grep across vault/ideas/, vault/tasks/, vault/research/, vault/notes/, vault/drafts/, vault/raw/ — content AND frontmatter. Look for exact phrases, key terms, entity names, and synonyms. If the owner captures in multiple languages, search key terms in each.
1b. Follow wikilinks
For each matched file, check its ## Related section. Read the linked files too — they are semantically connected and often hold the better answer.
1c. Check MEMORY.md and DECISIONS.md
Durable facts and past decisions matching the query live in vault/MEMORY.md and vault/DECISIONS.md. Always check both for "why did I / what did I decide" questions.
Step 2: Mirror Fallback (OPTIONAL)
Only if integrations.cloud_mirror is enabled in the CLAUDE.md config block AND vault search returned fewer than 3 results (items captured via external channels may not be synced to the vault yet). Query the mirror databases by text search.
Step 3: Present Results
Ranked list, vault results first:
Found 3 results for "referral program":
1. [[YYYY-MM-DD-add-referral-program]] — idea (0.85) — my-side-project — YYYY-MM-DD
> Add a referral program to drive organic growth...
2. [[YYYY-MM-DD-growth-experiments-review]] — note — my-side-project — YYYY-MM-DD
> Reviewed Q2 growth experiments; referrals outperformed ads...
3. DEC-004 — "No paid acquisition until organic baseline is known" — DECISIONS.md
Deduplicate items that exist in both vault and mirror — show once, note both locations. For time-based queries ("what did I capture last week"), filter by frontmatter date or filename.
Step 4: Offer Next Actions
- "Want me to open any of these?"
- "Should I connect [[file-A]] and [[file-B]] with a wikilink?"
- "These 2 items might be duplicates — want to merge them?"
If the query produced a synthesis worth keeping (not just a lookup), offer to file it back into the vault (see CLAUDE.md rule 8) — with the full compile step if accepted.