Skip to main content
ClaudeWave
Skill146 repo starsupdated yesterday

write-paper

Full-pipeline medical/scientific paper writing. 8-phase IMRAD workflow from outline to submission-ready manuscript. Supports original articles, case reports, meta-analyses, AI validation studies, animal studies, and technical notes. Do NOT trigger for self-checking (use self-review instead).

Install in Claude Code
Copy
git clone --depth 1 https://github.com/Aperivue/medsci-skills /tmp/write-paper && cp -r /tmp/write-paper/skills/write-paper ~/.claude/skills/write-paper
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Write-Paper Skill

You are helping a medical researcher write scientific manuscripts for journal submission.
You orchestrate the full writing pipeline from initial outline through submission-ready
polish, producing publication-quality prose that reads as if written by an experienced
academic physician.

## Key Directories

- **Journal profiles (built-in)**: `${CLAUDE_SKILL_DIR}/references/journal_profiles/`
- **Paper type templates**: `${CLAUDE_SKILL_DIR}/references/paper_types/`
- **Section templates**: `${CLAUDE_SKILL_DIR}/references/section_templates/`
- **Section guides**: `${CLAUDE_SKILL_DIR}/references/section_guides/` (on-demand per phase)
- **Manuscript workspace**: determined at Phase 0 (typically `7_Manuscript/{PaperN}/`)

---

## 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, 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 LLM writing assistance disclosure. Default is ON (disclosure included). See [LLM Disclosure](#llm-writing-disclosure) section below.
- `--autonomous`: Run the full pipeline without user gates. All interactive checkpoints (outline approval, T&F plan approval, discussion planning, section reviews) are skipped. The pipeline executes Phases 0-7 sequentially without pausing. Default is OFF (all gates active). Intended for AI Manuscript Quality Study Arm A and `/orchestrate --e2e` mode.

**Actions:**
1. Load the journal profile. If no profile exists, ask the user for: word limits, abstract format, citation style, figure/table limits, special requirements.
2. Load the paper type template from `${CLAUDE_SKILL_DIR}/references/paper_types/`.
3. Select the appropriate reporting guideline(s):
   - Diagnostic accuracy study: STARD / STARD-AI
   - Prediction model: TRIPOD+AI
   - AI study in radiology: CLAIM 2024
   - RCT: CONSORT / CONSORT-AI
   - Systematic review: PRISMA 2020
   - Observational study: STROBE
   - Educational study: no standard checklist (use SQUIRE if applicable)
4. **AI/LLM design-stage reporting map**: for AI validation, LLM/MLLM, NLP extraction, or report-generation papers, map each required AI-reporting item to a manuscript section before drafting. At minimum record 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 assessment, repeatability/stochasticity handling, and the Methods subsection where each will appear. 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. Check for `--no-llm-disclosure` flag. If absent, LLM disclosure is ON by default.
   Check for `--autonomous` flag. If present, record autonomous mode as ON.
   Record both flag states for use in Phase 1-7 gate logic.

#### Case Report Mode

When paper type is "case report":
1. Load `${CLAUDE_SKILL_DIR}/references/paper_types/case_report.md` (CARE structure).
2. Override word limits: total 1000-1500 words (excl. abstract, references, legends).
3. Override abstract limit: 150 words, structured (Introduction, Case Presentation, Conclusion).
4. Override reference limit: 15 references maximum.
5. Apply CARE 2016 reporting guideline (mandatory).
6. Modify Phase 1 outline to CARE 8-section structure:
   Title, Abstract, Introduction, Case Presentation (Patient Information, Clinical Findings,
   Timeline, Diagnostic Assessment, Therapeutic Intervention, Follow-up and Outcomes),
   Discussion, Learning Points, Conclusion, Patient Consent Statement.
7. In Phase 2, default figures:
   - Figure 1: Key imaging findings (annotated, typically 3-6 panels)
   - Figure 2: Clinical timeline (if complex course)
   - Table 1: Laboratory and clinical data at presentation
8. In Phase 5 (Discussion), call `/search-lit` with query: `"[condition]" AND "case report"[Publication Type]`.
   If 5 or more similar cases found, create a comparison table (Author, Year, Age/Sex, Presentation, Treatment, Outcome).
   If fewer than 5, state: "To our knowledge, only [N] similar cases have been reported in the English literature."
9. Skip Phase 5a Discussion Planning Gate — case reports are shorter; proceed directly to drafting.
10. For extended case reports with literature review, user can specify `--extended` to raise
    the word limit to 2000-3000 words and add a structured review section.

7. **Identify a backbone article (auto-proposal first, ask only as fallback)**:
   a. **Scan first** — if `manuscript/_src/refs.bib` exists, scan it for entries matching the current paper's study design (Phase 0 paper_type), imaging modality, and target journal (or comparable tier). Prefer entries whose Zotero record has a PDF attachment (full text locally available).
   b. **Rank candidates** by: PDF available locally (+2), recency within 5 years (+1), same target journal (+2), same study design + modality (+2).
   c. **Behavior**:
      - **One strong candidate (score ≥ 5)** — propose it proactively: *"I found a likely backbone article: [citation]. Full text appears available. I will use it as the structural backbone unless you prefer another."* Proceed once user confirms or stays silent for one turn.
      - **Multiple candidates** — present the top 3 ranked list with rationale and ask the user to choose.
      - **No refs.bib, or no candidates** — ask the user to provide a published study (legacy behavior).
   d. Record the chosen citekey in `project.yaml::backbone_article` so Methods, Tables, and Figures phases reuse it without re-aski
skillsSkill
academic-aioSkill

Medical AI paper optimization for AI search engines (Perplexity, ChatGPT web, Elicit, Consensus, SciSpace) and RAG-based literature tools. Applies when drafting or reviewing titles, abstracts, structured summary boxes (Key Points / Research in Context / Plain-Language Summary), manuscripts for high-impact medical AI journals (Lancet Digital Health, Radiology, Radiology-AI, npj Digital Medicine, Nature Medicine), preprints (medRxiv/arXiv), GitHub README + CITATION.cff + Zenodo archives, and Hugging Face model/dataset cards. Integrates TRIPOD+AI, CLAIM 2024, STARD-AI, TRIPOD-LLM, DECIDE-AI reporting requirements with generative engine optimization (GEO) principles. Produces a visible pass/fail checklist.

add-journalSkill

>

analyze-statsSkill

Statistical analysis for medical research papers. Generates reproducible Python/R code with publication-ready tables and figures. Supports diagnostic accuracy, inter-rater agreement, meta-analysis, survival analysis, survey data, group comparisons, regression, propensity score, and repeated measures.

author-strategySkill

PubMed author profile analysis. Author name → PubMed fetch → study type classification → visualization → strategy report.

batch-cohortSkill

Generate N analysis scripts from a single methodology template × multiple exposure/outcome combinations. The "80-person team" pattern — same validated method, swap variables only. Produces batch R/Python code + summary matrix.

calc-sample-sizeSkill

>

check-reportingSkill

Check manuscript compliance with medical research reporting guidelines. Supports 32 guidelines including STROBE, CONSORT, STARD, STARD-AI, TRIPOD, TRIPOD+AI, ARRIVE, PRISMA, PRISMA-DTA, PRISMA-P, CARE, SPIRIT, CLAIM, MI-CLEAR-LLM, SQUIRE 2.0, CLEAR, MOOSE, GRRAS, SWiM, AMSTAR 2, and risk of bias tools (QUADAS-2, QUADAS-C, RoB 2, ROBINS-I, ROBINS-E, ROBIS, ROB-ME, PROBAST, PROBAST+AI, NOS, COSMIN, RoB NMA). Generates item-by-item assessment with PRESENT/MISSING/PARTIAL status.