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. Generate a Related Work section for a paper from wiki knowledge — thematic grouping → narrative structure → LaTeX output, following citation-verification and academic-writing

How to use this skill

Skill file

/survey

Generate a Related Work section ready for direct use in a paper, based on existing wiki knowledge.

Draw material from wiki/papers/, concepts/, topics/; group by research direction (not paper-by-paper listing).

End each group with a statement of how it differs from this work. Citations follow citation-verification.md;

writing follows academic-writing.md Related Work rules.

Supports LaTeX and Markdown output formats.

Inputs

Outputs

Wiki Interaction

Reads

Writes

Graph edges created

Workflow

Precondition: confirm the working directory is the wiki project root (the directory containing wiki/, raw/, tools/).

Step 1: Locate Relevant Knowledge

  1. Parse input:
  1. Read wiki/graph/context_brief.md for global context
  2. Read wiki/graph/edges.jsonl: extract inter-paper semantic relationships (same_problem_as, similar_method_to, complementary_to, builds_on, compares_against, improves_on, challenges, surveys)
  3. Build candidate paper list:
  1. If candidate papers < 5: warn "insufficient related papers; consider /ingest of more papers first"

Step 2: Deep-Read Related Pages

For each paper in the candidate list:

  1. Read wiki/papers/{slug}.md: focus on Problem, Key idea, Results, My take
  2. Read linked wiki/concepts/*.md: focus on Definition, Variants, Comparison
  3. Read related wiki/topics/*.md: focus on Timeline, Open problems

Record for each paper:

Step 3: Thematic Grouping

Following the Related Work rules in shared-references/academic-writing.md:

  1. Group by research direction (not paper-by-paper listing):
  1. Determine group order:
  1. Determine within-group order:
  1. Annotate each group's relationship to this work:

Step 4: Generate Paragraphs

Following shared-references/academic-writing.md:

  1. One or two paragraphs per group:
  1. Citation format:
  1. Writing standards:
  1. De-AI polish:

Step 5: BibTeX Preparation (--format latex only)

If output format is LaTeX, following shared-references/citation-verification.md:

  1. Collect all \cite{key} citations
  2. For each key, attempt to fetch BibTeX: DBLP → CrossRef → S2
  3. Verified: record BibTeX
  4. Unverified: mark [UNCONFIRMED]
  5. Output list of BibTeX entries (can be appended to paper/references.bib)
  6. Report citation coverage

Step 6: Archive

  1. Generate slug:

```bash

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

```

  1. Write archive file:

Create 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


```

Body is the complete Related Work text.

If latex format: append BibTeX entries as an appendix.

  1. Add graph edges:

```bash

# output → each cited paper

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. Append log:

```bash

python3 tools/research_wiki.py log wiki/ \

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

```

  1. Terminal output: complete Related Work body text + citation coverage statistics

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.