Aller au contenu
Skillpedia
Analyse et tableurs16k · #10817

wiki-retrieve

Ce qu’il fait

Cette skill crée un index de recherche de votre wiki et renvoie les passages les plus pertinents pour une question. Elle s'adresse aux personnes qui ont beaucoup de notes et veulent des recherches rapides et précises.

Quand l’utiliser

  • ✓Quand votre wiki est volumineux et que vous voulez trouver les passages pertinents pour une question.
  • ✓Quand vous voulez créer ou actualiser l'index de recherche local de votre vault.
  • ✓Quand vous devez comprendre pourquoi une recherche renvoie les résultats qu'elle donne.

Lien du skill

https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-retrieve/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-retrieve/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Crée un index de recherche pour mon wiki et trouve les passages sur notre processus de recrutement.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent découpe vos pages en fragments, construit un index de mots-clés sur cet ordinateur et renvoie les extraits les plus pertinents avec leurs pages. Tout traitement à distance nécessite votre accord explicite.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Retrieve relevant passages

This extension derives search data from wiki/ into .vault-meta/. It never changes canonical notes. Always pass the selected vault explicitly.

Resolve the installed product root from this skill's own location, not from the vault or current working directory:

PRODUCT_ROOT=/absolute/path/to/installed/claude-obsidian
PREFIX="$PRODUCT_ROOT/scripts/contextual-prefix.py"
BM25="$PRODUCT_ROOT/scripts/bm25-index.py"
RETRIEVE="$PRODUCT_ROOT/scripts/retrieve.py"
RERANK="$PRODUCT_ROOT/scripts/rerank.py"
test -f "$PREFIX" && test -f "$BM25" && test -f "$RETRIEVE" && test -f "$RERANK"

Pipeline

  1. contextual-prefix.py splits pages on paragraph boundaries and stores the raw chunk plus a short page-level prefix.
  2. bm25-index.py builds a local, standard-library BM25 index over the contextualized text.
  3. retrieve.py selects BM25 candidates, optionally reranks them, rejects invalid records, deduplicates by page, and returns paths and snippets.
  4. The caller reads the returned pages and performs synthesis; retrieval output is not itself evidence.

Provision locally

Preview first, then build synthetic prefixes without network egress:

python3 "$PREFIX" --vault "$VAULT" --all --no-llm --peek
python3 "$PREFIX" --vault "$VAULT" --all --no-llm
python3 "$BM25" --vault "$VAULT" build
python3 "$RETRIEVE" --vault "$VAULT" "wiki" --top 1 --no-rerank --explain

Chunk and index files are disposable runtime state. Incremental prefixing skips records whose chunk hashes, page hashes and provider/model profile still match. Legacy records without that profile regenerate on an explicit build. A complete scan removes surplus records for deleted pages, and the prefixer invalidates the BM25 index before changing its chunk set so a mixed stale index is not served. Prefix and BM25 build operations share the vault-wide mutation lock with every other writer; a busy vault fails closed instead of publishing a partial index.

Contextual-prefix privacy

Synthetic prefixes use only local frontmatter and page text. The explicit Anthropic API profile can send page bodies off-machine and requires the user's consent plus --allow-egress and a configured API key. There is no Claude CLI generation tier or ambient subprocess fallback. Never infer consent from an API key or installed binary. Preview the scope first and state which provider will receive what data.

Remote Ollama endpoints also require explicit approval and --allow-remote-ollama; the default reranker accepts localhost only.

Local model prefixes are a separate explicit option. Use an already installed exact name:tag; no server is started and no model is installed or pulled:

python3 "$PREFIX" --vault "$VAULT" --all --local-ollama --ollama-model installed:tag --peek
python3 "$PREFIX" --vault "$VAULT" --all --local-ollama --ollama-model installed:tag

The prefix adapter verifies cloud-disabled server status and local model identity before sending page text. Unsupported or unavailable preflight falls back to synthetic prefixes for new or changed chunks only; prefixes from the same endpoint and model stay in place, so a transient outage leaves an unchanged vault's chunks and BM25 index untouched. This requirement can exclude older Ollama servers. Reranking and tiling use the same local-only proof before query, page, chunk, or embedding cache work. --allow-remote-ollama approves the endpoint, not cloud delegation by the server. See prefix providers for the exact policy, cloud model selection and verification limits. The reranker has its own model and endpoint policy; selecting local prefixes does not enable reranking.

Query

For a strictly read-only lookup, use the prebuilt BM25 index:

python3 "$RETRIEVE" --vault "$VAULT" "$QUERY" --top 5 --no-rerank --explain

For an explicitly requested rerank, omit --no-rerank. The default is Ollama's multilingual nomic-embed-text-v2-moe model (approximately 958 MB); the product never pulls it automatically. To use an already-installed, smaller, English-oriented v1.5 model, pass --model nomic-embed-text explicitly. Nomic models use search_query: for the query and search_document: for candidate text. Nomic v2 has a 512-token input context and Ollama truncates longer embedding inputs by default; BM25 still scores the complete chunk. Embeddings are cached by exact model, verified digest, input scheme, and hash of

Questions fréquentes

Envoie-t-elle mes notes sur internet ?

Pas sans votre accord explicite. Le traitement à distance nécessite votre consentement, et l'index reste sinon sur votre ordinateur.

Modifie-t-elle mes notes ?

Non. L'index est stocké comme donnée dérivée, et les notes de référence ne sont pas modifiées.

Que se passe-t-il si l'étape de reclassement est indisponible ?

La recherche revient à la méthode plus simple par mots-clés, de sorte que des résultats sont tout de même renvoyés.

Détails

Description originale de l’auteur

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.

repo: AgriciDaniel/claude-obsidian

Popularité

Étoiles GitHub
16k
Position au classement
#10817
Licence
MIT
Mis à jour
25/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires