wiki-retrieve
ما الذي تفعله
تنشئ هذه المهارة فهرس بحث لـ wiki الخاص بك، وتعيد أكثر المقاطع صلة بالسؤال. وهي موجهة إلى من لديه ملاحظات كثيرة ويريد عمليات بحث سريعة ودقيقة.
متى تستخدمها
- ✓عندما يكون الـ wiki كبيراً وتريد العثور على مقاطع ذات صلة بسؤال.
- ✓عندما تريد بناء فهرس البحث المحلي لخزنتك أو تحديثه.
- ✓عندما تحتاج إلى معرفة سبب إعادة البحث للنتائج التي يعيدها.
رابط المهارة
https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-retrieve/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“ابنِ فهرس بحث للـ wiki الخاص بي، وابحث عن المقاطع التي تتحدث عن عملية التوظيف لدينا.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يقسم وكيلك الصفحات إلى مقاطع، ويبني فهرساً للكلمات المفتاحية على حاسوبك، ثم يعيد أفضل المقاطع المطابقة مع صفحاتها. أي معالجة عن بعد تحتاج إلى موافقتك الصريحة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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
contextual-prefix.pysplits pages on paragraph boundaries and stores the raw chunk plus a short page-level prefix.bm25-index.pybuilds a local, standard-library BM25 index over the contextualized text.retrieve.pyselects BM25 candidates, optionally reranks them, rejects invalid records, deduplicates by page, and returns paths and snippets.- 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
الأسئلة الشائعة
هل ترسل المهارة ملاحظاتي إلى الإنترنت؟
لا، إلا إذا وافقت صراحة. تحتاج المعالجة عن بعد إلى موافقتك، وإلا يبقى الفهرس على حاسوبك.
هل تغيّر ملاحظاتي؟
لا. الفهرس بيانات مشتقة، ولا تتغير الملاحظات الأساسية.
ماذا لو كانت خطوة إعادة الترتيب غير متاحة؟
يعود البحث إلى طريقة الكلمات المفتاحية الأبسط، فتظل النتائج تُعاد.
التفاصيل
الوصف الأصلي من المؤلف
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.
الشعبية
- نجوم GitHub
- 16k
- الترتيب
- #10817
- الترخيص
- MIT
- آخر تحديث
- 25/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
autoresearch
16kيتيح لوكيلك البحث في موضوع ضمن حدود محددة وكتابة تقرير مدعّم بالمراجع. تبقى نتائج الويب أدلة ولا تُضاف إلى ملاحظاتك تلقائياً.
canvas
16kيساعد وكيلك على إنشاء لوحات مرئية في Obsidian تحتوي على ملاحظات وملفات وروابط ومجموعات، وتحديثها. مفيدة للخرائط والتخطيطات المكانية.
defuddle
16kيساعد وكيلك على تخطيط تنظيف صفحة ويب لتصبح نصاً مقروءاً، والاحتفاظ بنسخ محلية من ملفات المصدر. التنظيف عبر الشبكة غير متاح بعد.
obsidian-bases
16kيساعد وكيلك على تصميم عروض Obsidian Bases التي تعمل كقواعد بيانات بسيطة، مع فلاتر ومعادلات وتخطيطات جدولية أو بطاقات.
مهارات مشابهة
gitcrawl
394kيتيح لوكيلك البحث في أرشيف محفوظ لمشكلات GitHub وطلبات السحب، وتجميع المكرر منها، والتحقق من حالتها الحالية على GitHub.
slacrawl
394kيتيح لوكيلك البحث في رسائل Slack داخل أرشيف محلي وعدّها، والتحقق من مدى حداثة الأرشيف، وتحديثه عند الحاجة.
goplaces
394kيساعد وكيلك على البحث عن الأماكن وعرض تفاصيلها وتقييماتها وتحديد أسمائها عبر Google Places، مع مخرجات JSON للسكربتات.