Claude Code + Codex · MIT License

把论文编译成知识图谱

让 Claude Code 或 Codex 逐页读完论文与课程材料,编译成结构化、双向链接的知识库——不是 RAG,是 LLM Wiki。

Compile Papers into a Knowledge Graph

A Claude Code and Codex plugin that reads every page of your PDFs and slides, compiles cited notes, and synthesizes cross-source concepts — not RAG, an LLM Wiki.

> /plugin marketplace add u7079256/paper-wiki > /plugin install paper-wiki@paper-wiki
6
核心 Action
3
Sub-agent
2
变体(科研 / 课程)
GPU
OCR(本地 / 远程)
6
Core Actions
3
Sub-agents
2
Variants (research / course)
GPU
OCR (local / remote)

LLM Wiki,不是 RAG

RAG 每次提问都临时检索文本片段再拼答案,质量取决于切分和召回;paper-wiki 反过来——Claude 事先把每篇源文献从头读到尾,写成带引用的结构化笔记,再跨源综合出概念条目和研究空白。编译好的 wiki 本身就是产出,用 Obsidian 打开就是一张知识图谱。

LLM Wiki, not RAG

RAG retrieves text chunks at query time and stitches an answer on the fly. paper-wiki takes the opposite approach: Claude reads every source page-by-page upfront, writes structured notes with citations, then synthesizes cross-source concepts and research gaps. The compiled wiki is the product — it opens as a knowledge graph in Obsidian.

🔍 RAG(检索再生成)

🔍 RAG (Retrieve & Generate)

  • 入库时切分文档
  • 每次提问临时检索片段
  • 质量取决于切分和召回
  • 没有持久化的知识结构
  • Chunks documents at ingest time
  • Retrieves fragments per query
  • Quality depends on chunking & recall
  • No persistent knowledge structure

📖 LLM Wiki(先编译,后查询)

📖 LLM Wiki (Compile & Query)

  • 逐页通读每篇源文献
  • 写带引用的结构化笔记
  • 跨源综合概念条目
  • 持久化、双向链接的图谱
  • Reads every page end-to-end
  • Writes cited, structured notes
  • Cross-source concept synthesis
  • Persistent, reverse-linked graph

编译 → 审查 → 发现 → 深入理解

Scope fence 守住边界(核心聚焦 / 相邻可纳入 / 硬排除),lifecycle 控制节奏(BUILDING → ACTIVE → FROZEN)。

Compile → Critique → Ideate → Understand

Scope fence guards boundaries (core focus / adjacent OK / exclusions). Lifecycle controls pace (BUILDING → ACTIVE → FROZEN).

研究工作流Research workflow
/wiki-init → import → /wiki-compile → /wiki-critique → /wiki-ideate
                              ↓                              ↓
                        /wiki-search-latest ←── coverage gaps ┘
                              ↓
                        /wiki-compile → /wiki-teach (deep understanding)

科研或课程——选你的工作流

两种变体共享同一套"先编译、后查询"的流程,针对不同场景做了定制。

Research or Course — pick your workflow

Both variants share the same compile-then-query pipeline, tailored for different use cases.

research

文献调研和 novelty gap 分析

Literature survey & novelty gap analysis

源材料论文(arXiv / 网页)
主笔记wiki/papers/
综合层wiki/concepts/
特色wiki/gaps/ 新颖性分析
外部检索/wiki-search-latest/wiki-ideate
SourcesPapers (arXiv / web)
Noteswiki/papers/
Synthesiswiki/concepts/
Uniquewiki/gaps/ novelty analysis
Search/wiki-search-latest + /wiki-ideate

course

复习备考,讲义压缩成可查知识库

Exam revision & lecture compression

源材料讲义 / 实验 / 作业
主笔记wiki/lectures/ + wiki/practice/
综合层wiki/topics/
特色wiki/exam-scope.md 考试大纲骨架
外部检索
SourcesSlides / labs / assignments
Noteswiki/lectures/ + wiki/practice/
Synthesiswiki/topics/
Uniquewiki/exam-scope.md spine
Searchnone

Claude Code 与 Codex 双端可用

两端都能从本仓库 marketplace 安装;bootstrap 项目自带两套入口。

Works in Claude Code and Codex

Both runtimes install from this repository marketplace; bootstrapped projects carry both entry points.

Claude Code
> /plugin marketplace add u7079256/paper-wiki
> /plugin install paper-wiki@paper-wiki
Codex
codex plugin marketplace add u7079256/paper-wiki
codex plugin add paper-wiki@paper-wiki
同一 workspace 只能有一个写入者。切换 Claude Code / Codex 前先结束当前任务并检查工作树。项目规则只认 WIKI.md
One writer per workspace. Finish the active task and inspect the working tree before switching between Claude Code and Codex. WIKI.md is canonical.

后续更新:Claude Code 使用 /plugin marketplace update paper-wiki;Codex 使用 codex plugin marketplace upgrade paper-wiki。若 Git 主机校验失败,请先对照 GitHub 官方公布的 SSH fingerprint,切勿把未经核验的 ssh-keyscan 输出直接写进 known_hosts

不想装 plugin 也行——直接 git clone 本仓库,用 bootstrap 脚本创建项目。

Update with /plugin marketplace update paper-wiki in Claude Code or codex plugin marketplace upgrade paper-wiki in Codex. If Git host verification fails, compare the key with GitHub's officially published SSH fingerprints; do not persist unverified ssh-keyscan output.

Don't want a plugin? git clone this repo and run the bootstrap below — bootstrapped projects are self-contained.

创建 wiki 项目

Bootstrap a wiki project

Windows PowerShell
PS> .\scripts\bootstrap_new_wiki.ps1 -NewPath D:\my-wiki -Topic my-topic `
     -ProjectName "My Wiki" -Variant research
macOS / Linux
$ bash scripts/bootstrap_new_wiki.sh --path ~/my-wiki --topic my-topic \
     --name "My Wiki" --variant research

创建后任选一端:Claude Code 运行 /wiki-init;Codex 运行 $paper-wiki-project wiki-init

Choose one runtime: Claude Code runs /wiki-init; Codex runs $paper-wiki-project wiki-init.

双端 action 速查

Claude Code 用 /wiki-*;Codex 用 $paper-wiki-project wiki-* 或自然语言点名 action。

Dual-runtime action reference

Claude Code uses /wiki-*; Codex uses $paper-wiki-project wiki-* or a natural-language request naming the action.

命令功能
/wiki-init初始化(仅首次):填写主题和种子论文 / 解包并清点材料
/wiki-compile读取 raw/ 中的新材料,编译笔记,综合概念或主题
/wiki-search-latest <主题>搜索最新相关论文 research
/wiki-critique <文件>对抗性审查:找漏洞、过度声明、公式错误
/wiki-ideate <gap>发现未试过的组合 research
/wiki-teach <问题>paper-wiki 自带查询与教学,不依赖外部 /teach
查询 wiki 用内置 wiki-teach action;wiki 里没有的内容会明确告知。
CommandWhat it does
/wiki-initOne-time setup: fill topic + seeds (research) / unpack + inventory (course)
/wiki-compileRead new raw/ material, write notes, synthesize concepts
/wiki-search-latest <topic>Find recent papers to import research
/wiki-critique <file>Adversarial review: holes, overclaims, wrong formulas
/wiki-ideate <gap>Discover untried combinations research
/wiki-teach <question>Built-in query and teaching; no external /teach dependency
To query the wiki, use the built-in wiki-teach action. Absent content is explicitly flagged.

三个研究者的完整使用故事

从创建 wiki 到投稿,每个场景展示具体命令、预期输出和决策点。

Three researchers, three complete journeys

From wiki creation to paper submission — concrete commands, expected outputs, and decision points.

场景 A

PhD 生,新方向,8 周

重点scope fence 延迟填写、ideate 发现方向、reviewer 反馈后重开 wiki

场景 B

资深研究者,4 周快速验证

重点Day 1 即 ideate、精准补充、teach 出对比表写 related work

场景 C

长期维护者,6 周跨论文复用

重点重开冻结 wiki、更新 scope fence、--Update 更新命令

Scenario A

PhD student, new direction, 8 weeks

FocusDeferred scope fence, ideate discovers direction, reviewer feedback reopens wiki

Scenario B

Senior researcher, 4-week fast validation

FocusDay-1 ideate, precise expansion, teach generates comparison tables for writing

Scenario C

Long-term maintainer, 6-week cross-paper reuse

FocusReopen frozen wiki, update scope fence, --Update for stale commands

📖 查看完整走读 → 📖 Read full walkthroughs →

仓库里有什么

What's inside

.claude-plugin/— Claude Code plugin 元数据
.codex-plugin/— Codex plugin manifest
.agents/plugins/— Codex marketplace 元数据
skills/paper-wiki/— 双端共用 skill 与 action 合约
scripts/— bootstrap 脚本 + OCR + PPTX 提取
commands/— Claude slash adapter 与共享流程正文
agents/— sub-agent(wiki-critic / wiki-searcher / wiki-ideator)
templates/— 各变体的模板文件
templates/memory/— 不含 secret 的本地说明模板
docs/— 命令教程、OCR 配置指南、方法论、踩坑记录
examples/— 无 GPU 快速上手 + 示例 wiki
docs/llm-wiki.protocol.yaml— 机器可读的行为规约
.claude-plugin/— Claude Code plugin metadata
.codex-plugin/— Codex plugin manifest
.agents/plugins/— Codex marketplace metadata
skills/paper-wiki/— shared skill and action contracts
scripts/— bootstrap (.ps1 + .sh) + OCR + PPTX
commands/— Claude slash adapters over shared workflows
agents/— sub-agents (wiki-critic / wiki-searcher / wiki-ideator)
templates/— {research, course} template files
templates/memory/— non-secret local note templates
docs/— tutorial, OCR setup, methodology, gotchas
examples/— no-GPU quickstart + sample wiki
docs/llm-wiki.protocol.yaml— machine-readable behavior contract