Skip to content
Research
Skill

/write-paper

Use when drafting a medical research manuscript or any IMRAD section. Runs an 8-phase pipeline from outline to submission-ready draft for original articles, AI validation studies, case reports, meta-analyses, technical notes and more. Checking a draft is /self-review.

From plugin
medsci-skills
38162 skills

Claude Code

$ npx -y skills add Aperivue/medsci-skills --skill write-paper --agent claude-code

SKILL.md

write-paper.SKILL.md
name: write-paper
description: Use when drafting a medical research manuscript or any IMRAD section. Runs an 8-phase pipeline from outline to submission-ready draft for original articles, AI validation studies, case reports, meta-analyses, technical notes and more. Checking a draft is /self-review.
metadata:
  triggers: "write paper, manuscript, draft paper, start writing, write methods, write results, write discussion, write introduction"

Write-Paper Skill

8-Phase Pipeline

Phase 0: Init

Gather essential information from the user before any writing begins.

**Required inputs:** 1. **Title** (working title is fine) 2. **Paper type**: original article, AI validation, case report, case series, meta-analysis, technical note, animal study, NHIS cohort, cross-national 3. **Target journal**: load profile from `${CLAUDE_SKILL_DIR}/references/journal_profiles/` 4. **Research question / hypothesis** 5. **Available data**: what datasets, tables, analyses already exist

**Optional flags:**

  • `--no-llm-disclosure`: skip the LLM writing-assistance disclosure. Default is ON.
  • `--autonomous`: run Phases 0–7 without user gates (outline approval, T&F plan, discussion planning, section reviews all skipped). Default OFF.

**Actions:** 1. Load the journal profile. If none exists, ask for word limits, abstract format, citation style, figure/table limits, and special requirements. 2. Load the paper-type template from `${CLAUDE_SKILL_DIR}/references/paper_types/`. 3. Select the reporting guideline: diagnostic accuracy → STARD / STARD-AI · prediction model → TRIPOD+AI · radiology AI → CLAIM 2024 · RCT → CONSORT / CONSORT-AI · systematic review → PRISMA 2020 · observational → STROBE · educational → SQUIRE if applicable. 4. **AI/LLM design-stage reporting map** (AI validation, LLM/MLLM, NLP extraction, report generation): map every required AI-reporting item to a manuscript section *before* drafting — model/version/access date, input fields, prompt or fine-tuning protocol, same-backbone zero-shot/few-shot baseline if an adaptation claim is made, test-data independence/contamination, repeatability, and the Methods subsection each will land in. **If any item cannot be placed, halt for design clarification** rather than burying it as a Phase 7 limitation. 5. Create or confirm the project scaffold directory. 6. Record the `--no-llm-disclosure` and `--autonomous` flag states for Phase 1–7 gate logic. 7. **Identify a backbone article** — scan `manuscript/_src/refs.bib` first and propose proactively (ranking: Backbone ranking below); ask only as a fallback. Record the chosen citekey in `project.yaml::backbone_article`. Then gate on its full text — **a backbone whose full text is not extracted is a backbone in name only; the draft would follow an abstract:**

   python3 ${CLAUDE_SKILL_DIR}/scripts/gate_backbone_fulltext.py \
     --project project.yaml --refs manuscript/_src/refs.bib \
     --fulltext-dir pdfs/ --strict

A file in `--fulltext-dir` counts as the backbone when it is named `<citekey>.md` or names the backbone DOI/citekey *before* its References heading; a paper that only cites the backbone in its reference list does not count. Known limit: another paper that names the DOI in its own body still resolves — name the file `<citekey>.md` or pass `--fulltext` to remove the doubt.

`BACKBONE_FULLTEXT_MISSING` / `BACKBONE_FULLTEXT_THIN` → **stop and retrieve it** (`/lit-sync` Phase 2.7, then `/fulltext-retrieval` `pdf_to_md.py`). Do not begin Methods drafting until this passes. If the article is genuinely unavailable in full text, record that limitation and get user confirmation before proceeding on the abstract alone. 8. Summarize the setup — journal constraints, paper type, reporting guideline, backbone article, directory path, LLM-disclosure status — and confirm before proceeding.

Phase 0 Gate: Citekey-only references

Citekey discipline turns citation fabrication into a **visible placeholder the submission gate can block**.

1. **Every in-text citation MUST be `[@citekey]`**, with `citekey` present in `manuscript/_src/refs.bib`. Pandoc/Quarto style only — no "(Smith et al., 2024)" free text. 2. For a citation intended but not yet imported, use `[@NEW:short-topic]` (kebab-case, ≤30 chars, unique in the manuscript). 3. **Never** fabricate a citekey that "looks real" (`[@Smith_2024_AI]`) when the entry is not in `refs.bib`. `[@NEW:...]` is the *only* allowed placeholder. 4. All `[@NEW:...]` placeholders must be resolved before Phase 7 (`/search-lit` → `/lit-sync` imports verified entries; Better BibTeX refreshes `refs.bib`). Cite only references whose DOI or PMID `/search-lit` has confirmed; mark any other as `[UNVERIFIED - NEEDS MANUAL CHECK]`. 5. Pre-submission check — must return zero matches before `/sync-submission` may freeze a package:

   grep -E '\[@NEW:[^]]+\]|\[N\]|\[N–N\]' manuscript/index.qmd

Bare `[N]` / `[N–N]` markers mean a manuscript drafted outside this pipeline (no `refs.bib`) with method-load-bearing citations left unresolved. Block them exactly like `[@NEW:...]`.

If `refs.bib` is absent, create it empty with the comment `% refs.bib managed by /lit-sync via Zotero Better BibTeX. Do not hand-edit.`, record `reference_manager.required_for: project_owner` in `SSOT.yaml`, and proceed — early citations will all be `[@NEW:...]` until the first `/lit-sync` run.

**Read on demand — once the paper type is known (step 2), and only the row that matches:**

| File | Read it when | |---|---| | `references/phase0_init_detail.md` → **Case Report Mode** | paper type is `case report` — word/abstract/reference-limit overrides, the CARE 8-section outline, default figures | | `references/phase0_init_detail.md` → **Case Series Mode** | paper type is `case series` — the methods-light mini-cohort outline, all-cases summary table, counts-not-rates discipline | | `references/phase0_init_detail.md` → **Backbone ranking** | `refs

Read more
@aperivue
Ships withmedsci-skills

Created & maintained by Yoojin Nam, MD Department of Radiology and Research Institute of Radiology, University of Ulsan College of Medicine, Asan Medical Center, Seoul, Republic of Korea MedSci Skills is a set of Agent Skills for clinical research: literature

Stars on GitHub

Momentum

stars in total
381
Star history of Aperivue/medsci-skills on GitHub, a chart by star-history.com

Other skills on medsci-skills.

academic-aio

academic-aio

Use when a medical AI paper should be found and cited by AI search engines and RAG tools. Optimizes the title, abstract, summary…

add-journal

add-journal

Use when a target journal has no profile yet. Reads the journal's author guidelines and writes a detailed /write-paper profile…

analyze-stats

analyze-stats

Use when data needs statistical analysis. Runs reproducible Python/R code for Table 1, diagnostic accuracy, agreement,…

author-strategy

author-strategy

Use when analyzing a researcher's publication record from PubMed. Fetches an author's papers, classifies study types and author…

batch-cohort

batch-cohort

Use when one validated cohort analysis must be repeated across many exposure/outcome pairs. Generates one R/Python script per…

More skills from other plugins.

academic-paper-review

academic-paper-review

Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…

@bytedance@bytedanceInstall Skill
last30days

last30days

Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…

@mvanhorn@mvanhornInstall Skill

Questions about write-paper.

Which coding agents can use write-paper?
write-paper installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.