| name | find-notes |
| description | Searches the Obsidian vault and returns matching notes. Triggers on phrases like "find my notes on X", "what did I write about Y", "search obsidian for Z", "do I have any notes about", "find in vault", "look up in obsidian". |
| version | 1.0.0 |
Find Notes in Obsidian
Searches the vault for notes matching a query.
Vault Path
Resolve the config path dynamically, then read vault_path:
CONFIG="$(bash "${CLAUDE_PLUGIN_ROOT}/scripts/lib/resolve-config.sh")"
VAULT_PATH=$(grep '^vault_path:' "$CONFIG" | sed 's/vault_path: //')
If the resolver prints nothing (no config at $OBSIDIAN_LOCAL_MD, ${XDG_CONFIG_HOME:-$HOME/.config}/claude-obsidian/obsidian.local.md, or ${CLAUDE_PLUGIN_ROOT}/obsidian.local.md), tell the user to run /obsidian:setup first and stop.
Search Strategy
- Filename search —
find "$VAULT_PATH" -name "*<query>*" -type f
- Content search —
grep -r -l -i "<query>" "$VAULT_PATH" --include="*.md" --exclude-dir=".obsidian"
- Frontmatter/tag search —
grep -r -l "tags:.*<query>" "$VAULT_PATH" --include="*.md"
Combine and deduplicate results. Rank by:
- Exact title match (highest)
- Recent modification date
- Number of keyword occurrences in content
Output Format
For each match, show:
**[[Note Title]]**
Path: Projects/Domain/Note-Title.md
Last modified: YYYY-MM-DD
Preview: ...first 2-3 relevant lines...
Steps
- If
VAULT.md exists at the vault root, read it for vault-specific structure conventions (e.g., index files, special folders to prioritize in search)
- Parse query from user request
- Run all three searches against vault
- Deduplicate and rank results
- Display top 5 results with previews
- Offer to open any result: "Open note 2 in Obsidian?"
- If user selects one, call
bash ${CLAUDE_PLUGIN_ROOT}/scripts/open-in-obsidian.sh <path>