Tooluck logoTooluck
SKILL.md

wiki-retrieve

Agent skill fromAgriciDaniel/claude-obsidian

Build and query a vault-local contextual BM25 retrieval index with optional multilingual Nomic cosine reranking; use for retrieve, hybrid retrieval, BM25, rerank, contextual retrieval, chunk search, vault search, semantic search, find relevant passages, or retrieval diagnostics. Derived caches stay under .vault-meta, remote egress requires explicit consent, and unavailable reranking falls back deterministically.

How to install wiki-retrieve

install wiki-retrieve
# install the claude-obsidian pack with the skills CLI
npx skills add AgriciDaniel/claude-obsidian

# or add only this skill to Claude Code: copy the folder

skills/wiki-retrieve/

# into

~/.claude/skills/wiki-retrieve/ (all projects)

.claude/skills/wiki-retrieve/ (one project)

skills/wiki-retrieve/SKILL.md

MITFull file
1# Retrieve relevant passages
2
3This extension derives search data from `wiki/` into `.vault-meta/`. It never
4changes canonical notes. Always pass the selected vault explicitly.
5
6Resolve the installed product root from this skill's own location, not from the
7vault or current working directory:
8
9```bash
10PRODUCT_ROOT=/absolute/path/to/installed/claude-obsidian
11PREFIX="$PRODUCT_ROOT/scripts/contextual-prefix.py"
12BM25="$PRODUCT_ROOT/scripts/bm25-index.py"
13RETRIEVE="$PRODUCT_ROOT/scripts/retrieve.py"
14RERANK="$PRODUCT_ROOT/scripts/rerank.py"
15test -f "$PREFIX" && test -f "$BM25" && test -f "$RETRIEVE" && test -f "$RERANK"
16```
17
18## Pipeline
19
201. `contextual-prefix.py` splits pages on paragraph boundaries and stores the
21 raw chunk plus a short page-level prefix.
222. `bm25-index.py` builds a local, standard-library BM25 index over the
23 contextualized text.
243. `retrieve.py` selects BM25 candidates, optionally reranks them, rejects
25 invalid records, deduplicates by page, and returns paths and snippets.
264. The caller reads the returned pages and performs synthesis; retrieval output
27 is not itself evidence.
28
29## Provision locally
30
31Preview first, then build synthetic prefixes without network egress:
32
33```bash
34python3 "$PREFIX" --vault "$VAULT" --all --no-llm --peek
35python3 "$PREFIX" --vault "$VAULT" --all --no-llm
36python3 "$BM25" --vault "$VAULT" build
37python3 "$RETRIEVE" --vault "$VAULT" "wiki" --top 1 --no-rerank --explain
38```
39…

Excerpt shown under the repository's MIT license.

More skills in claude-obsidian

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates