mcpField
W
wiki-builder

wiki-builder

github.com/rohitg00生产力2.9k140 次安装4 周前更新
代码仓库

关于 wiki-builder

wiki-builder 使用 Markdown 文件和 SQLite FTS5 索引创建持久化主题维基,适合用户和 Agent 整理研究、项目、代码库等资料,并支持多种维基类型和来源记录。

主要功能

  1. 01创建并注册维基
  2. 02Markdown 页面与 SQLite FTS5 索引
  3. 03多种维基类型
  4. 04全局或项目级范围
  5. 05来源引用与维护日志

适用场景

  1. 01围绕主题建立研究维基
  2. 02整理笔记和来源文档
  3. 03维护项目或代码库参考维基

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/rohitg00/pro-workflow --skill wiki-builder

安装后在 Claude Code 中输入/wiki-builder确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

agents/
openai.yaml
references/
wiki-flavors.md
scripts/
init_wiki.sh
wiki-cli.js
templates/
index.md
maintenance-log.md
sources.md
wiki.config.md
templates/prompts/
compile-concept-page.md
compile-index.md
compile-source-page.md
lint-wiki.md
query-and-file.md

详细介绍

Wiki 构建器

适用于任何主题的持久化知识库。Markdown 文件保存在磁盘上,并使用 SQLite FTS5 影子索引。

适用场景

  • “开始创建关于 的 Wiki”
  • “将这篇论文 / 这个链接 / 这条笔记添加到 Wiki”
  • “在 中编写关于 X 的概念页面” -“ Wiki 中关于 Y 的内容是什么?”(委托给 wiki-query)
  • “列出我的 Wiki”

存放位置

  • 全局:~/.pro-workflow/wikis/<slug>/ — 默认位置,绝不提交
  • 项目:<project>/.claude/wikis/<slug>/ — 传入 --scope project,可提交

两者都会注册到同一个 ~/.pro-workflow/data.db。

类型

类型用途
research持续探索某个主题
paper深入研究单篇论文
domain宽泛的学科领域
product产品 / 工具知识库
person研究人员 / 创始人档案
organization公司 / 实验室简介
project内部项目知识库
codebase与代码仓库关联、能识别符号 / 文件的知识库
incident事后复盘知识库

目录结构

<slug>/
├── wiki.config.md         # purpose, audience, page types, style, auto_research block
├── raw/                   # untouched source material (PDFs, scrapes, transcripts)
├── wiki/
│   └── index.md           # entry point, hand-curated TOC
├── derived/               # generated artifacts (surveys, charts, summaries)
├── prompts/               # per-task prompts (compile-page, lint, query)
├── logs/maintenance-log.md
└── sources.md             # one row per source: id | url | title | hash | fetched_at

类型会添加以下文件夹:wiki/papers、wiki/concepts、wiki/people、wiki/products、wiki/timelines、wiki/questions。

CLI 命令

node $SKILL_ROOT/scripts/wiki-cli.js init <slug> --title "X" --flavor research [--scope project] [--root <path>]
node $SKILL_ROOT/scripts/wiki-cli.js list
node $SKILL_ROOT/scripts/wiki-cli.js page <slug> <rel-path> --title "X" [--type concept|paper|person|...] [--from-file path]
node $SKILL_ROOT/scripts/wiki-cli.js reindex <slug>
node $SKILL_ROOT/scripts/wiki-cli.js info <slug>

init 会运行 init_wiki.sh(沿用 dair 布局),并在 SQLite 中注册 Wiki。page 会写入 Markdown 并更新 FTS 行。

调用时的工作流

  1. 确定操作(init / ingest / compile / list / reindex / info)。
  2. 在执行任何编写操作前,先读取目标 Wiki 的 wiki.config.md。
  3. 写入 wiki/ 的每条声明都必须引用 sources.md 中的一行(一条引用 = 一个来源行)。
  4. 写入页面后,调用 wiki-cli.js page,使 FTS 索引保持同步。
  5. 每次变更都在 logs/maintenance-log.md 中追加一行记录。
  6. 如果新增了顶层页面,则更新 wiki/index.md。

质量标准

  • 首个页面应立即具备实用价值,而不是空壳。
  • 使用稳定的 slug 文件名(tool-use-benchmarks.md,而非 2026-05-08-notes.md)。
  • 将原始来源与汇编后的解读分开。
  • 在同一 Wiki 中通过相对链接交叉链接相关页面。
  • 使用 > SPECULATION: 块标记推测内容。
  • 不要重复撰写摘要——改为链接到现有页面。
  • 生成的页面应便于未来的 Agent 浏览。

隐私

配置中包含 private: true 的 Wiki 永远不会被 wiki-research-loop 从网络来源获取内容。原始资料仅保存在本地 raw/ 中。

选择启用自动研究

3.3.0 阶段仅提供构建器和查询功能。循环功能将在 3.3.1 中推出。要提前准备,wiki.config.md 可包含:

auto_research:
  enabled: false        # flip in 3.3.1
  max_pages_per_run: 5
  max_depth: 3
  budget_usd: 0.50
  fetchers: [web, arxiv, github]

模板

请参阅 templates/ 中的 wiki.config.md、index.md 和提示词文件。init_wiki.sh 会将这些文件复制到新 Wiki 的根目录。

评论

支持 Markdown