wiki-search
Skill0 starsChanged 7 months agoMITView on GitHub
Deterministic-scoping search before AI reasoning. When asked anything that requires recalling existing wiki content, FIRST run grep over wiki/ + data/ to bound the answer, THEN reason within the returned set. Implements the @gulliveruk principle ("scoping is deterministic, reasoning is probabilistic"). Triggers on: 查/搜/找/有没有/wiki 里/已经写过/相关页面/recall/lookup.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- sensei-hacker/inav-claudetheir own version, first seen Oct 3, 2026
- yogsoth-ai/knowledge-structuringtheir own version, first seen May 18, 2026
- yogsoth-ai/wiki-vaulttheir own version, first seen May 18, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- sensei-hacker/inav-claude★ 6same name
- yogsoth-ai/wiki-vault★ 4same name
- yogsoth-ai/knowledge-structuring★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Files
Wiki Search Skill — 确定性范围 + 概率性推理
触发场景
当用户问任何"wiki 里有没有 X"、"我们以前怎么处理 Y"、"找一下相关的 Z"——或者你内部决定要回忆既有 wiki 内容时——必须先 grep 再推理。
核心原则
Scoping should be deterministic, reasoning should be probabilistic.(@gulliveruk)
- ❌ 凭印象回答 wiki 写过什么 → 错率高,会"自信地犯错"
- ❌ 直接读
_index.md然后 hallucinate 出页面内容 → 信息失真 - ✅ 用 grep 精确返回所有相关行的实际文本,再让 AI 综合
SOP
Step 1: 关键词探查
# 基础语义搜索 — 在 wiki/ 中找
grep -rilE "<keyword1>|<keyword2>" ~/wiki/wiki/ | head -20
# 如果有 hit:拉具体段落(前后 2 行上下文)
grep -rE "<keyword>" ~/wiki/wiki/ -A 2 -B 1 | head -60
# 同时搜 data/ 原始快照(验证溯源)
grep -rilE "<keyword>" ~/wiki/data/ | head -10Step 2: 边界确认
把 grep 返回的页面列表 / 行展示给用户,说清楚你这次会基于哪些页面回答——而不是声称"我记得 wiki 里说过..."。
Step 3: 范围内推理
只在 grep 返回的实际文本上做推理和综合。如果 grep 没返回相关结果,明确说"wiki 里没找到",不要从训练知识或印象里编造。
Step 4: 行号溯源(数字声明专用)
如果回答涉及具体数字 / 百分比 / 量化结论,按 [[CF-011: 数字必须带行号溯源]] 在回复里标注 data/xxx.md, L42。
速查模板(复制粘贴)
# 单关键词
grep -rilE "TSS shape" ~/wiki/wiki/
# 多候选(OR)
grep -rilE "Sinorhizobium|S\\. fredii|根瘤菌" ~/wiki/wiki/
# 排除已知噪声目录
grep -rilE "<keyword>" ~/wiki/wiki/ --exclude-dir=EXAMPLE
# 限定分类
grep -rilE "<keyword>" ~/wiki/wiki/biology/
# 提取行号(drift-check 风格)
grep -nE "<keyword>" ~/wiki/data/2026-04/some-source.md何时可以跳过这个 Skill
- 写新页面(不需要 recall 既有内容)
- 用户给了完整外部内容做 ingest
- 单纯文件操作(git / 编辑指定文件)
何时必须用这个 Skill
- 任何"wiki 里…"开头的问题
- 任何"以前怎么…"问题
- 任何要把 X 跟现有 wiki 概念关联的任务(Dreaming / 桥接)
- 任何要引用具体数字 / 论文 / 名字时——必须 grep 验证拼写和数值
Why(最重要)
[[LLM Wiki 养三周后的三个毛病]] 的"找不到"问题:_index.md 超过 50 页后 AI 找东西效率下降,开始编造或用印象代替查证。grep 是确定性的,不会幻觉。AI 不应该在"找"这一步用概率,只在"想"这一步用概率。
升级路径
当 wiki 超过 500 页或 grep 不够语义化时,升级到:
qmd— 本地 BM25 + 向量混合搜索,提供 MCP server(AI 可直接调)- 或自建 SQLite FTS5 索引(参考 Hermes Agent)
但起步不必装 qmd——grep 起步即可。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

