$npx -y skills add Aperivue/medsci-skills --skill fill-icmje-coiBatch-generate per-author ICMJE Conflict of Interest Disclosure Forms (coi_disclosure.docx) for manuscript submission. Pre-fills all 13 disclosure items as "☒ None" + final certification ☒ using a synthetic seed template shipped with the skill, then clones the seed per author w
| 1 | # Fill-ICMJE-COI Skill |
| 2 | |
| 3 | You are helping a researcher prepare ICMJE Conflict of Interest Disclosure Forms |
| 4 | for every co-author on a manuscript about to be submitted to an ICMJE member |
| 5 | journal (CHEST, NEJM, JAMA, Lancet, Radiology, etc.). This skill batch-generates |
| 6 | one personalized `.docx` per author from a synthetic all-None seed shipped with |
| 7 | the skill, avoiding 10–20 minutes of repetitive Word clicking per author. |
| 8 | |
| 9 | ## Why This Skill Exists |
| 10 | |
| 11 | The official ICMJE `coi_disclosure.docx` puts every field inside Word Content |
| 12 | Controls (Structured Document Tags, a.k.a. SDTs). Naive `python-docx` |
| 13 | manipulation of `cell.text` silently ignores SDT content, so the straightforward |
| 14 | programmatic approach does not work. The historical workaround was to open the |
| 15 | template in Word and manually fill each author's form (21 authors × 13 |
| 16 | checkboxes × 2 clicks = ~500 clicks). This skill replaces that by operating |
| 17 | directly on `word/document.xml` inside the docx zip and doing literal-string |
| 18 | replacement — but that requires the target strings to already exist in the |
| 19 | seed, so the skill ships a pre-filled synthetic seed. |
| 20 | |
| 21 | **Precedent:** a multi-author cohort manuscript submission — 6 authors |
| 22 | auto-filled in ~5 seconds from the synthetic seed with zero Word clicks. |
| 23 | |
| 24 | ## Core Principles (Do Not Violate) |
| 25 | |
| 26 | 1. **Never author SDT XML from scratch.** Only replace existing strings in an |
| 27 | already-populated seed. Creating Content Controls programmatically is |
| 28 | fragile and Word-version-dependent. |
| 29 | 2. **Never ship a real author's filled form as the seed.** The template |
| 30 | directory contains `icmje_coi_seed_synthetic.docx` with all PII scrubbed |
| 31 | (synthetic name, title, date; metadata reset to `ICMJE` / `Anonymous`). |
| 32 | Real-person seeds leak PII through both document.xml and docProps. |
| 33 | 3. **Never modify the 13 disclosure items or certification checkbox.** The |
| 34 | script only replaces Date/Name/Title. If any author has a real disclosure, |
| 35 | they must edit in Word manually — the skill's purpose is the common |
| 36 | all-None case. |
| 37 | 4. **Always verify before circulation.** Each output must have 14 × ☒ and |
| 38 | 13 × "None" in document.xml. The script runs this check implicitly by |
| 39 | preserving the seed structure; a post-generation grep is cheap insurance. |
| 40 | |
| 41 | ## When to Use This Skill |
| 42 | |
| 43 | - Manuscript accepted for submission to an ICMJE member journal |
| 44 | - 3+ co-authors with no real financial conflicts |
| 45 | - Editorial Manager / submission portal requires per-author ICMJE disclosure docx |
| 46 | - About to hand-fill the same form 6–21 times |
| 47 | |
| 48 | Skip this skill when: |
| 49 | - Any author has a real financial disclosure to list (they fill their own form |
| 50 | in Word; this skill does not help) |
| 51 | - Target journal uses its own declaration form (not ICMJE) — check author |
| 52 | guidelines first |
| 53 | - Only 1 author (not worth the setup) |
| 54 | |
| 55 | ## Execution |
| 56 | |
| 57 | ### Phase 1 — Intake |
| 58 | |
| 59 | Ask the user (or extract from conversation): |
| 60 | 1. **Manuscript title** (exact, as it will appear on title page) |
| 61 | 2. **Submission date** (e.g., "April 20, 2026") |
| 62 | 3. **Author list** — ordered, one name per slot: `[(1, "Author One"), (2, "Author Two"), ...]` |
| 63 | 4. **Output directory** — typically `submission/{journal}/icmje_forms/` |
| 64 | |
| 65 | Present the intake back to the user for confirmation (**Gate 1 — user approval**) |
| 66 | before generating anything. Explicitly name which authors will get all-None |
| 67 | forms and remind that anyone with a real disclosure must instead fill their own |
| 68 | form in Word. |
| 69 | |
| 70 | ### Phase 2 — Generate |
| 71 | |
| 72 | Invoke the script with the synthetic seed that ships with this skill: |
| 73 | |
| 74 | ```bash |
| 75 | python3 ${SKILL_DIR}/scripts/fill_icmje_coi.py \ |
| 76 | --seed ${SKILL_DIR}/templates/icmje_coi_seed_synthetic.docx \ |
| 77 | --seed-name "Placeholder Author" \ |
| 78 | --seed-title "Placeholder Manuscript Title" \ |
| 79 | --seed-date "January 1, 2000" \ |
| 80 | --new-title "{exact manuscript title}" \ |
| 81 | --new-date "{submission date}" \ |
| 82 | --out-dir {out_dir} \ |
| 83 | --authors '[[1,"Author One"],[2,"Author Two"],...]' |
| 84 | ``` |
| 85 | |
| 86 | The script exits nonzero if any seed string is not found, preventing silent |
| 87 | failures. |
| 88 | |
| 89 | ### Phase 3 — Verify |
| 90 | |
| 91 | For each generated docx, confirm: |
| 92 | - ☒ count = 14 (13 disclosure items + 1 final certification) |
| 93 | - "None" count = 13 |
| 94 | - Correct name appears after "Your Name:" |
| 95 | - Correct title appears after "M |