Agent skill

Fill Protocol

by Aperivue in Aperivue/medsci-skills

A skill your agent uses when an institutional Word form (.doc/.docx IRB protocol, ethics application, grant template) must be filled without breaking its styles, tables, fonts or page layout.

MITAuto-check passedDocuments & Office

Install Fill Protocol

skills CLI
$ npx skills add Aperivue/medsci-skills --skill fill-protocol -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Aperivue/medsci-skills fill-protocol --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Aperivue/medsci-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fill-protocol .claude/skills/fill-protocol && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fill-protocol
GitHub stars
329
Token cost
~1.7k tokens
SKILL.md length
654 words
Files
11 (incl. scripts, references)
Skills in repo
54
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when an institutional Word form (.doc/.docx IRB protocol, ethics application, grant template) must be filled without breaking its styles, tables, fonts or page layout.

  • Works in 5 steps: Convert legacy .doc to .docx (if needed) → Inspect the template structure → Author a content YAML → …
  • An institutional Word form (.doc/.docx IRB protocol
  • SKILL.md covers Core Principles (Do Not Violate), Dependencies, Workflow and Known Limitations
  • Runs Shell and Python scripts from its folder; calls python3, bash and soffice

What it does

Fill Protocol is an agent skill from Aperivue/medsci-skills. Use when an institutional Word form (.doc/.docx IRB protocol, ethics application, grant template) must be filled without breaking its styles, tables, fonts or page layout. Renders content drafted by /write-protocol into the template; CJK-aware.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and reference files (for example `examples/example_irb_template.yaml`, `references/best_practices.md` and `scripts/doc_to_docx.py`).

It sits in Documents & Office, covering Word documents. It works with Microsoft Word and LibreOffice. The repository describes itself as: Agent Skills for medical research — literature search, reporting-guideline & citation checks, statistics, publication figures, submission. Works with Claude Code, Codex, Cursor &… The licence is MIT.

When your agent uses it

  • An institutional Word form (.doc/.docx IRB protocol
  • Ethics application
  • Grant template) must be filled without breaking its styles

Example prompts

  • “/fill-protocol”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Convert legacy .doc to .docx (if needed)
  2. Inspect the template structure
  3. Author a content YAML
  4. Run the fill
  5. Visual verification

What it can do on your machine

Read from SKILL.md and the folder at commit 3b14ae2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Shell and Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • bash
    • soffice
    • pandoc

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fill Protocol loads about 1.7k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 65 tokens; SKILL.md has 654 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Aperivue/medsci-skills at commit 3b14ae2, republished under its MIT licence (© Aperivue). 654 words, ~1,747 tokens.

Download SKILL.mdSave it as .claude/skills/fill-protocol/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
fill-protocol
description
Use when an institutional Word form (.doc/.docx IRB protocol, ethics application, grant template) must be filled without breaking its styles, tables, fonts or page layout. Renders content drafted by /write-protocol into the template; CJK-aware.
metadata.triggers
fill protocol, fill template, fill IRB form, IRB template, ethics template, grant template, 양식 채우기, 연구계획서 작성, 신청서 작성, 정부 양식, 병원 양식, 워드 템플릿

Fill-Protocol Skill

Core Principles (Do Not Violate)

  1. Open the existing template — never create from scratch. Use Document(template_path), not Document(): rebuilding loses the header logo, custom margins, footer placeholders and page numbering. Replace cell/paragraph text in place; never a single cell.text = "value" assignment, which erases run-level styles (bold, color, eastAsia font).
  2. Convert .doc → .docx via LibreOffice headless before any editing. pandoc -f doc is not supported; textutil corrupts table structure (merged cells dropped).
  3. Match cells by left-label text, not row/column coordinates such as table.cell(2, 1). 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, or Hangul/Kanji/Hanzi render in fallback fonts.
  6. Validate every fill operation: resolve every [MISS] line and every WARN: line ([TABLE-MISS], [SECTION-MISS], [RAW-NEWLINE]) before the filled form is submitted.

Dependencies

Python packages docxtpl python-docx pyyaml are always required. LibreOffice is needed only for a legacy .doc template (~700 MB on macOS). The bundled setup.sh detects what is missing:

bash
bash ${CLAUDE_SKILL_DIR}/setup.sh check     # report what's installed (read-only)
bash ${CLAUDE_SKILL_DIR}/setup.sh install   # install missing pieces (asks before each)

When invoking this skill on behalf of a user:

  1. Skip LibreOffice entirely if the template is already .docx.
  2. Before calling doc_to_docx.py, run setup.sh check. If LibreOffice is missing, ask the user before installing, because the cask is ~700 MB.
  3. Never pass --yes to setup.sh install unless the user has explicitly authorized unattended installation in this session, because it installs without prompting.
  4. If the user declines, ask them to convert the .doc manually (Word/LibreOffice/Pages → Save As → .docx) and re-run with the converted file.

Workflow

Step 1 — Convert legacy .doc to .docx (if needed)
bash
python3 ${CLAUDE_SKILL_DIR}/scripts/doc_to_docx.py path/to/template.doc path/to/template.docx
Step 2 — Inspect the template structure
bash
python3 ${CLAUDE_SKILL_DIR}/scripts/inspect_template.py path/to/template.docx

It lists every table, every cell (coordinates and content preview) and every top-level paragraph. Take the exact labels for the YAML from this output.

Step 3 — Author a content YAML

Start from ${CLAUDE_SKILL_DIR}/examples/example_irb_template.yaml. Three fill modes; all keys are optional.

yaml
protections:
  korean_font: "맑은 고딕"   # CJK font (set to "Noto Sans CJK KR", "SimSun",
                              # "MS Mincho", etc. for other locales)
  cant_split: true            # Apply <w:cantSplit/> to every filled row

  # Readability options (defaults shown)
  blank_between_paragraphs: true            # Enter between \n\n chunks
  blank_around_section_header: true         # Enter above/below filled sections
  blank_around_all_section_headers: false   # opt-in; also touches untouched sections
  normalize_page_breaks: true               # empty page-break paragraphs -> pageBreakBefore

# Mode 1 — table key/value (left-label cell → right value cell)
table_kv:
  "Study Title": "Multi-center prospective validation of ..."
  "Principal Investigator": "Last, First (Department)"
  "연구 목적": "본 연구는 ..."

# Mode 2 — section replacement (find numbered header, replace until next header)
section_replace:
  "1. Background":
    "Hepatocellular carcinoma is the third leading cause of ..."
  "4. 연구 배경 및 이론적 근거":
    "..."

# Mode 3 — single paragraph in-place text replacement
paragraph_replace:
  "Title:":
    "Title: Multi-center prospective validation of ..."

Read ${CLAUDE_SKILL_DIR}/references/best_practices.md (Readability knobs) before changing any readability option from its default.

Content rules: put a reference in only with a /search-lit-confirmed DOI or PMID, otherwise mark it [UNVERIFIED - NEEDS MANUAL CHECK]; mark any unconfirmed clinical definition, diagnostic criterion or guideline claim [VERIFY] and ask the user.

Show full SKILL.md (288 more words)Show less
Step 4 — Run the fill
bash
python3 ${CLAUDE_SKILL_DIR}/scripts/fill_form.py \
  --template path/to/template.docx \
  --content  content.yaml \
  --output   path/to/filled.docx

The CLI prints [OK] / [MISS] for every fill operation, a summary, then any WARN: lines. Investigate every [MISS] and WARN: before submitting (Principle 6).

Every value under table_kv, section_replace and paragraph_replace is written exactly as typed (012345, 12:30, 1.10, No stay text). An empty value or a list/mapping value stops the run with exit 2 and names the label; write '' to blank a field on purpose. A section_replace on a header with no later numbered header replaces everything to the end of the document, and its [OK] line says so with the number of paragraphs replaced. If a signature/date block or anything else follows the last section, bound it with section_end (header -> regex matched against the paragraph that starts the kept block):

yaml
section_end:
  "18. References": "^Investigator signature"
Step 5 — Visual verification
bash
soffice --headless --convert-to pdf path/to/filled.docx

Without LibreOffice (a .docx template skips it), export the PDF from Word instead. Open the PDF and confirm: page count is sensible, no table row was split across pages, no font fell back to Times New Roman, all required fields are populated.

Read ${CLAUDE_SKILL_DIR}/references/best_practices.md when a label or section header does not match, the template has no numbered section headers (section_end), a cell needs multi-line content, or cells are merged.

Known Limitations

  • HWP / HWPX input is not handled directly — convert it to .docx first.
  • Merged cells: filling a label cell that participates in a vertical merge may overwrite the merged region's content. Test on a copy first.
  • Embedded form fields (Word content controls): not supported; plain paragraph and table cell content only.
  • Right-to-left scripts (Arabic, Hebrew): untested.
  • Last section with no later header: replaced through the end of the document unless a section_end pattern is given; the filler cannot tell the section body from a trailing block.

© Aperivue, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts, references) in skills/fill-protocol of Aperivue/medsci-skills.

  • SKILL.md
  • examples/example_irb_template.yaml
  • references/best_practices.md
  • scripts/doc_to_docx.py
  • scripts/fill_form.py
  • scripts/inspect_template.py
  • setup.sh
  • skill.yml
  • tests/test_fill_form.sh
  • tests/test_fill_form_integrity.sh
  • tests/test_fill_form_newlines.sh

Open the folder on GitHubat commit 3b14ae2

Compare with similar skills

Fill Protocol next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fill Protocol compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fill Protocol this skillAperivue/medsci-skills329—~1.7kAutomated safety check: PassMIT
DOCX ToolkitXiaomiMiMo/MiMo-Code14k—~2.4kAutomated safety check: PassApache-2.0
Word DOCX ToolkitNousResearch/hermes-agent252k—~2.6kAutomated safety check: PassMIT
DOCXguyi-a/pi-ling106—~1.1kAutomated safety check: PassMIT
Z Md To Wordtjxj/z-skills545—~815Automated safety check: PassNone
LiteparsePrismer-AI/PrismerCloud1.6k—~2.1kAutomated safety check: PassMIT

Similar skills

  • DOCX Toolkit

    XiaomiMiMo/MiMo-Code

    Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.

    14k GitHub stars~2.4k tokensUpdated 4 days ago
    Documents & OfficeAuto-check passed
  • Word DOCX Toolkit

    NousResearch/hermes-agent

    Creates, reads, edits and templates Word .docx files with python-docx scripts, including tracked changes, comments, tables of contents and health checks.

    252k GitHub stars~2.6k tokensUpdated today
    Documents & OfficeAuto-check passed
  • DOCX

    guyi-a/pi-ling

    Word 文档(.docx)的日常处理:md → docx(生成简历/报告)、docx → PDF/图片(分享预览)、.doc → .docx(老格式升级)。触发场景:用户说"生成 Word 版" / "做份 Word 简历" / "把这份报告转 Word" / "这份 .doc 打不开" / "docx 转 PDF" 等。读 docx 内容走 agent 已有的…

    106 GitHub stars~1.1k tokensUpdated 21 days ago
    Documents & OfficeAuto-check passed
  • Z Md To Word

    tjxj/z-skills

    Convert local Markdown files into Word documents. An agent skill from tjxj/z-skills.

    545 GitHub stars~815 tokensUpdated 15 days ago
    Documents & OfficeAuto-check passed
  • Liteparse

    Prismer-AI/PrismerCloud

    Parse local document files into LLM-ready content on the daemon itself — PDFs → Markdown / structured JSON (with bounding boxes) / page screenshots via the bundled lit CLI.

    1.6k GitHub stars~2.1k tokensUpdated 7 days ago
    Documents & OfficeAuto-check passed
  • DOCX

    nexus-research-lab/nexus

    只要 Word 文档或模板(.docx、.dotx、旧版 .doc)是任务的输入或输出,或者需要被打开、 读取、创建、修改,就使用本 Skill。也适用于 Word 内的表格、图片、批注、修订和格式调整, 以及要求以 Word 交付的报告、备忘录、信函和模板。不用于 PDF、电子表格或不涉及 Word 文件的普通写作。

    150 GitHub stars~484 tokensUpdated yesterday
    Documents & OfficeAuto-check passed

More from Aperivue/medsci-skills

All 54 skills in this repo
  • Model Assessment

    Aperivue/medsci-skills

    A skill your agent uses when validating or evaluating a trained medical-imaging model.

    329 GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Obsidian Paper Vault

    Aperivue/medsci-skills

    A skill your agent uses when turning a folder of research PDFs into Obsidian notes, even if Obsidian is not named.

    329 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Radiomics ML

    Aperivue/medsci-skills

    A skill your agent uses when building or auditing a radiomics or tabular clinical-ML prediction model with a classical learner (LASSO, SVM, random forest, XGBoost and similar).

    329 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Clean Data

    Aperivue/medsci-skills

    A skill your agent uses when a clinical CSV/Excel dataset needs profiling and cleaning before analysis (missing values, outliers, duplicates, type mismatches).

    329 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Design Study

    Aperivue/medsci-skills

    A skill your agent uses when checking a radiology or medical AI study design before drafting or submission.

    329 GitHub stars~3.9k tokensUpdated 2 days ago
    Auto-check passed
  • Fill Icmje Coi

    Aperivue/medsci-skills

    A skill your agent uses when each author needs an ICMJE Conflict of Interest disclosure form (coidisclosure.docx) for submission.

    329 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed

Questions about Fill Protocol

What does Fill Protocol do?

A skill your agent uses when an institutional Word form (.doc/.docx IRB protocol, ethics application, grant template) must be filled without breaking its styles, tables, fonts or page layout. Fill Protocol is an agent skill from Aperivue/medsci-skills.docx IRB protocol, ethics application, grant template) must be filled without breaking its styles, tables, fonts or page layout.

When should I use Fill Protocol?

Fill Protocol fits situations like: an institutional Word form (.doc/.docx IRB protocol; ethics application; grant template) must be filled without breaking its styles.

How do I install Fill Protocol in Claude Code?

Run `npx skills add Aperivue/medsci-skills --skill fill-protocol -a claude-code`. Or copy the skill folder (skills/fill-protocol in Aperivue/medsci-skills) into .claude/skills/fill-protocol in your project. Claude Code loads it when a task matches its description.

How do I install Fill Protocol in Codex?

Run `npx skills add Aperivue/medsci-skills --skill fill-protocol -a codex`. Or copy the skill folder (skills/fill-protocol in Aperivue/medsci-skills) into .agents/skills/fill-protocol in your project. Codex loads it when a task matches its description.

Can I use Fill Protocol in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Aperivue/medsci-skills --skill fill-protocol -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fill-protocol, .gemini/skills/fill-protocol, .github/skills/fill-protocol and .opencode/skills/fill-protocol in your project.

What does Fill Protocol need to run?

Going by SKILL.md and its folder, Fill Protocol needs a shell and Python for the scripts in its folder and the command-line tools its instructions call (python3, bash, soffice and pandoc). Our summary lists: Python 3; A Bash shell.

Does Fill Protocol access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fill Protocol safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Fill Protocol use?

Fill Protocol is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fill Protocol use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.

What are the alternatives to Fill Protocol?

Skills that share tags, products or a category with Fill Protocol: DOCX Toolkit (XiaomiMiMo/MiMo-Code, 14k stars), Word DOCX Toolkit (NousResearch/hermes-agent, 252k stars), DOCX (guyi-a/pi-ling, 106 stars) and Z Md To Word (tjxj/z-skills, 545 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fill Protocol?

Aperivue (a GitHub organization) maintains it in Aperivue/medsci-skills, which has 329 GitHub stars. The repository holds 54 skills in this directory. The repository was last updated on October 5, 2026.

Source: Aperivue/medsci-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.