fill-protocol

Featured

Fill institutional Word form templates (.doc/.docx) for IRB protocols, ethics applications, grant proposals, and other structured research documents while preserving the original styles, table layouts, fonts, and page geometry. Pairs with write-protocol — write-protocol drafts the scientific content, fill-protocol renders it into the institutional template. Korean-aware (CJK eastAsia font enforcement, table cantSplit) but works for any language template.

Data & Documents 292 stars 71 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
82
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Fill-Protocol Skill You are helping a researcher populate an institutional Word form (IRB protocol, ethics application, grant proposal, etc.) without breaking the original document formatting. This skill is the formatting counterpart to `write-protocol`: where `write-protocol` drafts content, `fill-protocol` lays that content into the institutional template. ## Why This Skill Exists Recreating institutional forms from scratch with `python-docx` reliably destroys table layouts, page breaks, and font consistency. The only safe approach is to **open the existing template** and replace cell/paragraph text in place. This skill enforces that pattern. ## Core Principles (Do Not Violate) 1. **Open the existing template — never create from scratch.** Use `Document(template_path)`, not `Document()`. 2. **Convert .doc → .docx via LibreOffice headless** before any editing. `pandoc -f doc` is not supported; `textutil` corrupts table structure. 3. **Match cells by left-label text**, not row/column coordinates. Templates evolve and coordinate matching breaks silently. 4. **Apply `cantSplit` to every filled row** so a row never breaks across pages. 5. **For CJK languages, set the `eastAsia` font attribute**, not just `run.font.name`. Hangul/Kanji/Hanzi will render in fallback fonts otherwise. 6. **Validate** every fill operation: report unmatched labels, count empty cells, and surface mismatches before saving. ## Dependencies If the template is already `.docx`, **Libr...

Details

Author
Aperivue
Repository
Aperivue/medsci-skills
Created
5 months ago
Last Updated
4 days ago
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Featured

lov-fill-form

Fill in Word document form templates (.docx) with user-provided data. Reads a template containing tables with label→value cell pairs, detects all fillable fields, and outputs a completed document. Handles CJK/Latin mixed text with proper font switching. Use this skill when the user wants to fill in a form template, complete an application form, populate a Word table form, or automate document filling. Also trigger when the user mentions "填表", "填写表格", "fill form", "fill template", "表格填写", "申请表", "登记表", or has a .docx template with blank fields to fill.

65 Updated today
lovstudio
Data & Documents Featured

render-pdf-doc

Render academic Markdown documents (English or Korean) to publication-quality PDF via pandoc + xelatex. Targets non-bibliography artifacts: research proposals, IRB cover letters, briefing handouts, anchor docs (Q&A grids), and reference tables. Auto-infers pipe-table column widths from content (label column shrinks to fit, data columns share remaining width). CJK-aware font fallback for Korean text (Apple SD Gothic Neo on macOS, Noto Sans CJK KR on Linux). NOT for: manuscripts with bibliography (use /manage-refs render_pandoc.sh), Word form filling (/fill-protocol), figures (/make-figures).

292 Updated 4 days ago
Aperivue
Data & Documents Listed

docx-template-filling

Fill DOCX template forms preserving 100% original structure - logos, footers, styles, metadata. Zero-artifact insertion. Output indistinguishable from manual entry.

47 Updated 1 months ago
belumume