Claude Code skill: drive a research topic to a submission package through machine-checked gates…
topic-to-paper
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Claude Code skill that drives a research topic to a submission package through machine-checked gates. You say one sentence; Claude runs every script.
- **Research branch** P0–P8: venue selection → literature + innovation scan → preregistration (locked by sha256) → build audit (leakage, effective config, silent fallbacks) → experiments (traceability, seeds, ablation resolution, anomaly triage) → figures → writing (must-write checklist, family-specific shape) → review loop → submission package.
- **Survey branch** S0–S6: protocol, search log, screening sheet, codebook, PRISMA counts, claim-to-row traceability.
- Every gate is a script with a FAIL/WARN/PASS verdict. Rules were calibrated on 275 published papers (CVPR, NeurIPS, ICML, MICCAI, TPAMI, TIP, IJCV, Nature Communications/Medicine/BME/MI) and validated on real manuscripts (see references/validation-*.md).
Install
Claude Code loads skills from either of two folders:
| Scope | Folder | When |
|---|---|---|
| Just you, every project | ~/.claude/skills/topic-to-paper/ | personal use |
| One repository, every collaborator | /.claude/skills/topic-to-paper/ | commit it; teammates get it on clone |
doctor checks the three required Python packages and that every script answers --help under a GBK console (the default on Chinese Windows). python -m pytest tests -q runs the regression suite: two fixture projects on which every offline gate must PASS, plus one mutation per failure mode each gate exists for (see tests/README.md). Optional: pdflatex (table compile check), a local PDF corpus for the zero-token literature index (see below).
Use
In Claude Code, inside the project folder, say one of:
- 用 topic-to-paper 开始 / start a paper on → research branch from P0
- 帮我做一篇 的综述 / write a survey on → survey branch from S0
- 这是我的稿子 ,帮我过一遍 → runs the writing gates on an existing LaTeX/PDF/markdown draft
- resume → continues from the first failed gate in research-state.yaml (t2p.py check writes every gate's status back into it; t2p.py status reads it)
A project can start anywhere: t2p.py init --entry have_draft (or have_results, have_reviews) marks the gates whose inputs do not exist yet as N/A instead of PENDING, so "check my draft" is not sent back to literature search.
Claude replies with a status board (one line per gate) and a short "what I need from you" list. The four things it will stop for: credentials (data portals, compute allocations, journal systems), a choice between materially different readings of the request, changing a locked preregistration, and authorship/submit.
What it checks (short list)
| Gate | What would otherwise go wrong |
|---|---|
| G1b innovation source | claim not traceable to a recurring gap, a stated assumption in a prior paper, or a transferred method's failure point; direction has no "no-go" exit |
| G2 preregistration | metric/denominator/window changed after seeing results; no failure branch; no pre-stated signs |
| G3 build audit | target-domain labels leak into training; an args.beta=0.1 that never took effect; a missing input directory silently disabling a modality |
| G4 results | numbers not traceable to eval files; stale evals; mixed hardware in one table; ablation cells inside seed noise read as effects; anomalies patched instead of recorded |
| G5 figures | dpi measured on screen not at print width; fonts unreadable after the figure is scaled into a half column; expected figure types (overview, qualitative, comparison, ablation) missing without a stated reason; dual-axis plots |