skills/obsidian-semantic-search/SKILL.md
# Obsidian Semantic Search Search Obsidian vault notes by conceptual meaning, not just keywords. Builds a local embedding index over all vault notes (per-section chunking), then performs cosine similarity search at query time. ## When to Use - User asks a fuzzy/conceptual question about their own notes ("What papers discuss exploration in RL?") - Keyword search (`mcp__obsidian__search_notes`) returns too many or too few results - User wants to find notes related to a concept without knowing e
npx skillsauth add jaimeparker/stable-jarvis skills/obsidian-semantic-searchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Search Obsidian vault notes by conceptual meaning, not just keywords. Builds a local embedding index over all vault notes (per-section chunking), then performs cosine similarity search at query time.
mcp__obsidian__search_notes) returns too many or too few resultsVault (.md files) ──build_index.py──> temp/obsidian/embeddings.json <──search.py── User Query
│
└── Shared with paper-deep-reader
.md note (full body text, frontmatter excluded), mtime-tracked incremental rebuildstable_jarvis.llm.embed() — same provider stack as paper-deep-reader (local / qwen / openai)Before any search, the agent MUST check the index state:
python skills/obsidian-semantic-search/scripts/build_index.py --stats
Decision logic:
| State | Action |
|-------|--------|
| Index exists AND built today | Skip build, proceed to Phase 2 directly |
| Index exists AND built in last 3 days | Run build_index.py (incremental — only changed files) |
| Index exists AND older than 3 days | Run build_index.py --force (full rebuild) |
| Index does NOT exist | Run build_index.py --force (first build) |
# Incremental update (recommended when index exists but stale)
python skills/obsidian-semantic-search/scripts/build_index.py
# Full rebuild (first time, or after major vault changes)
python skills/obsidian-semantic-search/scripts/build_index.py --force
The scripts locate the vault automatically via OBSIDIAN_VAULT env var or common paths (~/Documents/Obsidian, ~/Obsidian, ~/vault). If the vault is at a non-standard location, set it first:
export OBSIDIAN_VAULT="/path/to/vault"
python skills/obsidian-semantic-search/scripts/search.py "query text" --top-k 5
Returns JSON array of results, each with:
title — Note title (from H1 or filename)path — Relative path in vault (use directly with mcp__obsidian__read_note)score — Cosine similarity (0–1, higher = more relevant)text_snippet — First 200 chars of the note bodyarxiv_id — From frontmatter, if presentAfter getting results, use mcp__obsidian__read_note with the path field to read full content:
mcp__obsidian__read_note(path="30 Zettelkasten/RL/MAC.md")
Format search results for the user with:
[[wikilink]]text_snippet| Command | Purpose |
|---------|---------|
| build_index.py | Incremental index rebuild (default) |
| build_index.py --force | Full rebuild from scratch |
| build_index.py --stats | Show index statistics |
| build_index.py --clear | Remove index file |
| search.py "query" | Semantic search (top 5) |
| search.py "query" --top-k 10 | More results |
| search.py "query" --min-score 0.4 | Filter low-relevance results |
| search.py "query" --provider qwen | Use specific embedding provider |
All settings via environment variables (loaded from .env):
| Variable | Default | Description |
|----------|---------|-------------|
| OBSIDIAN_VAULT | Auto-detect | Path to Obsidian vault |
| EMBEDDING_PROVIDER | local | local / qwen / openai |
| EMBEDDING_MODEL | Provider-dependent | Model override |
| EMBEDDING_API_KEY | From {PROVIDER}_API_KEY | API key for cloud embeddings |
The local provider uses sentence-transformers (paraphrase-multilingual-MiniLM-L12-v2) and requires no API key.
build_index.py without --force compares file mtimes and only re-embeds changed notes. Deleted notes are automatically removed from the index.temp/obsidian/embeddings.json is shared with paper-deep-reader. Both skills read and benefit from the same index.--force after major vault reorganization or when search quality degrades.search.py include the vault-relative path — this is the exact argument to pass to mcp__obsidian__read_notemcp__obsidian__search_notes for hybrid retrieval: semantic for recall, keyword for precisiontemp/obsidian/embeddings.json — shared with paper-deep-reader skilldevelopment
# Mao Semantic Search Search Mao Zedong Selected Works by conceptual meaning using vector embeddings. Builds a local embedding index over all 230 articles across 5 volumes, then performs cosine similarity search at query time. ## When to Use - User asks a thematic/conceptual question about Mao's works ("What did Mao say about guerrilla warfare?") - Keyword search over the .md files is insufficient - User wants to find passages related to a concept without knowing exact terminology - As a pre-
development
Use when a researcher is choosing, framing, refining, or stress-testing a research question, hypothesis, thesis topic, project idea, grant direction, paper angle, or stalled research direction.
research
精读文献。快速泛读请用paper-quick-read。
data-ai
泛读:快速概览Zotero库中的文献,单轮LLM生成摘要级Markdown报告,并上传为Zotero Note。深度精读请用paper-deep-reader。