agentsclimarketplace

Wiki search

Skill JohnnyChen1113/dreamwiki/.claude/skills/wiki-search

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.From its SKILL.md

Install
npx -y skills add JohnnyChen1113/dreamwiki --skill wiki-search

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.5 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

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 -10

Step 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 起步即可。

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,401. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.