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:
- Title (working title is fine)
- Paper type: original article, AI validation, case report, meta-analysis, technical note, animal study, NHIS cohort, cross-national
- Target journal: load profile from
${CLAUDE_SKILL_DIR}/references/journal_profiles/ - Research question / hypothesis
- 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 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 --e2emode.
Actions:
- Load the journal profile. If no profile exists, ask the user for: word limits, abstract format, citation style, figure/table limits, special requirements.
- Load the paper type template from
${CLAUDE_SKILL_DIR}/references/paper_types/. - 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)
- Create or confirm the project scaffold directory.
- Check for
--no-llm-disclosureflag. If absent, LLM disclosure is ON by default. Check for--autonomousflag. 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":
-
Load
${CLAUDE_SKILL_DIR}/references/paper_types/case_report.md(CARE structure). -
Override word limits: total 1000-1500 words (excl. abstract, references, legends).
-
Override abstract limit: 150 words, structured (Introduction, Case Presentation, Conclusion).
-
Override reference limit: 15 references maximum.
-
Apply CARE 2016 reporting guideline (mandatory).
-
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.
-
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
-
In Phase 5 (Discussion), call
/search-litwith 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." -
Skip Phase 5a Discussion Planning Gate — case reports are shorter; proceed directly to drafting.
-
For extended case reports with literature review, user can specify
--extendedto raise the word limit to 2000-3000 words and add a structured review section. -
Identify a backbone article (auto-proposal first, ask only as fallback): a. Scan first — if
manuscript/_src/refs.bibexists, 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_articleso Methods, Tables, and Figures phases reuse it without re-asking.
-
Summarize the setup to the user and confirm before proceeding.
Output: Setup summary with journal constraints, paper type, reporting guideline, backbone article, directory path, and LLM disclosure status (ON/OFF).
Phase 0 Gate: Citekey-only references
Before any section drafting begins, this skill enforces citekey-only entry into the manuscript. LLM-generated reference strings in prose are a primary source of citation fabrication.
Hard rules (v1.1.1 Phase 1A.4):
- Every in-text citation MUST be
[@citekey], wherecitekeyexists inmanuscript/_src/refs.bib. Pandoc/Quarto-style only. No "(Smith et al., 2024)" free text. - For a citation the user intends to add but has not yet imported to Zotero, use the placeholder form
[@NEW:short-topic](e.g.,[@NEW:chest-xray-llm],[@NEW:radbench-1]). The topic slug is kebab-case, ≤30 characters, and must be unique within the manuscript. - Never fabricate a citekey that "looks real" (e.g.,
[@Smith_2024_AI]) when the entry is not inrefs.bib. The[@NEW:...]form is the only allowed placeholder. - Before Phase 7 (Polish), ALL
[@NEW:...]placeholders must be resolved:- Owner runs
/search-lit→/lit-syncto import verified entries into Zotero; Better BibTeX auto-export refreshesrefs.bib; owner replaces[@NEW:topic]with the real citekey. - Collaborators notify the owner (per
docs/zotero_policy.md).
- Owner runs
- Phase 7 pre-submission check:
grep -E '\[@NEW:[^]]+\]' manuscript/index.qmdmust return zero matches before/sync-submissionis allowed to freeze a journal package.
Why this matters: PRISMA citation fabrication in MA projects and reference hallucination in solo manuscripts both traced back to LLM-generated citation strings inlined during drafting. Forcing the citekey discipline at Phase 0 redirects that failure mode into a visible placeholder the submission gate can block.
If refs.bib is absent (new project):
- Create an empty
manuscript/_src/refs.bibplaceholder with a comment:% refs.bib managed by /lit-sync via Zotero Better BibTeX. Do not hand-edit. - Record in
SSOT.yamlreference_manager.required_for: project_ownerper Zotero policy. - Proceed; all early citations will be
[@NEW:...]placeholders until the first/lit-syncrun.
Phase 1: Outline
Create a structured IMRAD outline with section-level word budgets that respect journal limits.
Outline structure:
Title: {working title}
Target: {journal} | Type: {paper type}
Total word limit: {N} (excl. abstract, references, legends)
1. Abstract ({N} words, struct