Vault query
Search and filter AIMind Obsidian vault notes by type, author, tags, date, and content. Traverse wikilinks for context gathering. Use when retrieving knowledge, finding related notes, or building context from vault. Sibling to vault-save for writing.From its SKILL.md
npx -y skills add jhavenz/obsidian-explorer --skill vault-queryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.6 KB, as published. Nobody here has run it
$ARGUMENTS
Vault Location
Base path: /Users/jhavens/.obsidian/vaults/aimind/AIMind/
Query Patterns
See query-patterns.md for examples.
Search Modes
Full-text search:
search="event sourcing"
Regex search (prefix with /):
search="/event.*pattern/"
Frontmatter filters:
type=pattern author=ai since=2026-01-01 tags=architecture
Combined Queries
All conditions AND together:
type=pattern search="event" author=ai
Link Traversal
When follow-links=true:
- Find matching notes
- Parse
relatedfrontmatter - Resolve wikilinks to file paths
- Include linked notes in results
- Recurse to
depthlevel
Backlink discovery:
search="[[CQRS Pattern]]"
Output Formats
| Format | Returns |
|---|---|
summary | title, type, tags, first 200 chars |
full | complete note content |
paths | file paths only |
frontmatter | parsed YAML frontmatter |
Execution Steps
- Parse arguments
- Build file glob pattern from type (if specified)
- Apply full-text search with Grep (if specified)
- Parse frontmatter of matches
- Filter by frontmatter fields
- If follow-links: resolve and include linked notes
- Apply limit
- Format output per output parameter
Type to Path Mapping
| Type | Search Path |
|---|---|
| concept | 20-knowledge/concepts/**/*.md |
| pattern | 20-knowledge/patterns/**/*.md |
| insight | 20-knowledge/insights/**/*.md |
| decision | 20-knowledge/decisions/**/*.md |
| skill | 30-claude/skills/**/SKILL.md |
| protocol | 30-claude/protocols/**/*.md |
| (none) | **/*.md (all notes) |
Frontmatter Parsing
Use script for consistent parsing:
bun scripts/parse-frontmatter.ts /path/to/note.md
Returns:
{
"frontmatter": { "title": "...", "type": "...", ... },
"content": "...",
"path": "/path/to/note.md"
}
Wikilink Resolution
Convert [[Note Title]] to file path:
- Search for files matching title (case-insensitive)
- Prefer exact slug match
- Return first match or null
Result Format
Summary (default)
## Event Sourcing Pattern
Type: pattern | Author: ai | Tags: architecture, cqrs
Path: 20-knowledge/patterns/event-sourcing.md
Event sourcing persists state as a sequence of events rather than...
Paths
20-knowledge/patterns/event-sourcing.md
20-knowledge/patterns/cqrs.md
20-knowledge/concepts/domain-events.md
Frontmatter
- title: Event Sourcing Pattern
type: pattern
author: ai
tags: [architecture, cqrs]
related: ["[[CQRS Pattern]]", "[[Domain Events]]"]
Error Handling
- No matches: return empty result with query summary
- Invalid type: warn and search all paths
- Parse error: skip file, continue with others
- Link resolution failure: include partial results
Performance
- Use Glob for type-filtered searches
- Use Grep for full-text before parsing
- Limit early when possible
- Cache frontmatter parsing within session
CLI Integration
When Obsidian CLI is available, these operations use native commands for 10x faster results:
| Parameter | CLI Command | Fallback |
|---|---|---|
search | obsidian search query="..." | Grep + frontmatter parse |
backlinks | obsidian backlinks | Grep for [[Title]] patterns |
orphans | obsidian orphans | Graph analysis via file ops |
tag-stats | obsidian tags counts sort=count | Parse all frontmatter |
follow-links | obsidian links | Parse related[] field |
Results include source: "cli" or source: "fallback" to indicate which method was used.
Scripts
# Search with CLI fallback
bun scripts/search-unified.ts "event sourcing"
# Find backlinks to a note
bun scripts/backlinks-finder.ts "20-knowledge/patterns/cqrs.md"
# Analyze tags
bun scripts/tags-analyzer.ts count 20
# Find orphan notes
bun scripts/orphans-finder.ts 50