Survey

From Chanw-research/claude-code-paper-writing · View interactive version

Survey is an AI agent skill from the GitHub repository Chanw-research/claude-code-paper-writing. 从 wiki 知识生成论文 Related Work 章节:主题分组 → 叙事结构 → LaTeX 输出,遵循 citation-verification 和 academic-writing

How to use this skill

Skill file

/survey

基于 wiki 已有知识,生成可直接用于论文的 Related Work 章节。

从 wiki/papers/、concepts/、topics/ 取材,按研究方向分组(非逐篇罗列),

每组以「与本文的区别」收尾。引用遵循 citation-verification.md,

写作遵循 academic-writing.md 的 Related Work 规则。

支持 LaTeX 和 Markdown 两种输出格式。

Inputs

Outputs

Wiki Interaction

Reads

Writes

Graph edges created

Workflow

前置:确认工作目录为 wiki 项目根(包含 wiki/、raw/、tools/ 的目录)。

Step 1: 定位相关知识

  1. 解析输入:
  1. 读取 wiki/graph/context_brief.md 获取全局上下文
  2. 读取 wiki/graph/edges.jsonl:提取论文间语义关系(same_problem_as、similar_method_to、complementary_to、builds_on、compares_against、improves_on、challenges、surveys)
  3. 生成候选论文列表:
  1. 若候选论文 < 5 篇:警告「相关论文不足,建议先 /ingest 更多论文」

Step 2: 精读相关页面

对候选论文列表中的每篇论文:

  1. 读取 wiki/papers/{slug}.md:重点读 Problem、Key idea、Results、My take
  2. 读取该论文关联的 wiki/concepts/*.md:重点读 Definition、Variants、Comparison
  3. 读取相关 wiki/topics/*.md:重点读 Timeline、Open problems

记录每篇论文的:

Step 3: 主题分组

遵循 shared-references/academic-writing.md 的 Related Work 规则:

  1. 按研究方向分组(非逐篇罗列):
  1. 确定组间顺序:
  1. 确定组内顺序:
  1. 标注每组与本文的关系:

Step 4: 生成段落

遵循 shared-references/academic-writing.md:

  1. 每组一段或两段:
  1. 引用格式:
  1. 写作规范:
  1. De-AI polish:

Step 5: BibTeX 准备(仅 --format latex)

若输出格式为 LaTeX,遵循 shared-references/citation-verification.md:

  1. 收集所有 \cite{key} 引用
  2. 对每个 key,尝试获取 BibTeX:DBLP → CrossRef → S2
  3. 已验证的:记录 BibTeX
  4. 未验证的:标记 [UNCONFIRMED]
  5. 输出 BibTeX 条目列表(可追加到 paper/references.bib)
  6. 报告 citation coverage

Step 6: 归档

  1. 生成 slug:

```bash

python3 tools/research_wiki.py slug "<query-keywords>"

```

  1. 写入归档文件:

创建 wiki/outputs/related-work-{slug}-{date}.md:

```yaml


title: "Related Work: {topic}"

type: related-work

format: {latex|markdown}

paper_count: {N}

date_generated: YYYY-MM-DD


```

正文为完整 Related Work 文本。

若 latex 格式:附录包含 BibTeX 条目。

  1. 添加 graph edges:

```bash

# output → 每篇引用的论文

python3 tools/research_wiki.py add-edge wiki/ \

--from "outputs/related-work-{slug}-{date}" --to "papers/{paper-slug}" \

--type derived_from --evidence "Cited in related work section"

```

  1. 追加日志:

```bash

python3 tools/research_wiki.py log wiki/ \

"survey | {topic} | {N} papers, {G} groups, format: {format}"

```

  1. 终端输出:完整 Related Work 正文 + citation coverage 统计

Constraints

Error Handling

Dependencies

Tools(via Bash)

MCP Servers

Claude Code Native

Shared References

Called by

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.