科研 Skill
机构Word表单内容填充
fill-protocol
Fills an institutional Word form, such as an IRB protocol, without breaking its layout. Use when drafted content must be rendered into a CJK-aware .docx template.
SKILL.md
Fill-Protocol Skill
Core Principles (Do Not Violate)
- Open the existing template — never create from scratch. Use
Document(template_path), notDocument(): rebuilding loses the header logo, custom margins, footer placeholders and page numbering. Replace cell/paragraph text in place; never a singlecell.text = "value"assignment, which erases run-level styles (bold, color, eastAsia font). - Convert .doc → .docx via LibreOffice headless before any editing.
pandoc -f docis not supported;textutilcorrupts table structure (merged cells dropped). - Match cells by left-label text, not row/column coordinates such as
table.cell(2, 1). Templates evolve and coordinate matching breaks silently. - Apply
cantSplitto every filled row so a row never breaks across pages. - For CJK languages, set the
eastAsiafont attribute, not justrun.font.name, or Hangul/Kanji/Hanzi render in fallback fonts. - Validate every fill operation: resolve every
[MISS]line and everyWARN: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 setup.sh check # report what's installed (read-only)
bash setup.sh install # install missing pieces (asks before each)
When invoking this skill on behalf of a user:
- Skip LibreOffice entirely if the template is already
.docx. - Before calling
doc_to_docx.py, runsetup.sh check. If LibreOffice is missing, ask the user before installing, because the cask is ~700 MB. - Never pass
--yestosetup.sh installunless the user has explicitly authorized unattended installation in this session, because it installs without prompting. - If the user declines, ask them to convert the
.docmanually (Word/LibreOffice/Pages → Save As → .docx) and re-run with the converted file.
Workflow
Step 1 — Convert legacy .doc to .docx (if needed)
python3 scripts/doc_to_docx.py path/to/template.doc path/to/template.docx
Step 2 — Inspect the template structure
python3 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 examples/example_irb_template.yaml. Three fill modes; all keys are
optional.
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 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.
Step 4 — Run the fill
python3 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):
section_end:
"18. References": "^Investigator signature"
Step 5 — Visual verification
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 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
.docxfirst. - 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_endpattern is given; the filler cannot tell the section body from a trailing block.
示例提示词
帮我把这份研究方案内容填进医院的IRB申请Word模板里。
所属插件
安装该插件会一并获得同领域的 58 个 Skill / MCP。
同插件的其他科研 Skill
- 医学AI论文检索优化Optimizes a medical AI paper’s title, abstract and metadata for AI search engines. Use when a paper should be findable and citable by RAG tools and AI search.
- 临床数据统计分析与建模Generates reproducible Python or R code for clinical statistics and tables. Use when collected data needs Table 1, regression, survival or agreement analysis.
- 作者发表记录与策略分析Analyzes a PubMed author record to classify study types and authorship patterns. Use when planning a publication strategy from a researcher’s track record.
- 批量队列暴露结局分析Generates one cohort-analysis script per exposure-outcome pair from one template. Use when a validated method must run across many variable combinations at once.
- 样本量估算与检验效能Walks a decision tree to the right test and computes sample size with IRB text. Use when planning how many patients a study needs before data collection.
- 因果推断方法设计Runs DAG-based, instrumental-variable, difference-in-differences or RD analyses. Use when an association in observational data must support a causal claim.
- 报告规范逐条核查Audits a manuscript item by item against 49 reporting and risk-of-bias checklists. Use when checking a draft against STROBE, CONSORT, TRIPOD or similar guidelines.
- 临床数据清洗与画像Profiles a clinical dataset and generates cleaning code in staged, approved steps. Use when a CSV or Excel dataset needs missing-value and outlier checks before analysis.
- 跨国队列数据协调对比Harmonizes variables and runs parallel weighted analyses across national surveys like KNHANES and NHANES. Use when comparing one exposure-outcome link across countries.
- 变量定义与截断值溯源Maps exposure, outcome and covariate definitions to a cited guideline and DB columns. Use when variable cutoffs need a citable basis before the study protocol.
- 本地化临床数据脱敏Runs a local, network-free script that detects and removes identifiers from clinical data. Use when data may contain PHI and must be de-identified before LLM analysis.
- AI对标专家基准研究设计Plans the arms, rubrics, calibration probes and reviewer panel for an AI-vs-expert benchmark. Use before data collection when designing an AI-vs-human rating study.
- 放射影像AI研究设计审查Reviews a study’s analysis unit, cohort logic, leakage risk and reporting-guideline fit. Use when checking a clinical or medical-AI study design before drafting.
- 传染病仓室模型拟合Builds and fits SIR, SEIR and SEIHR compartmental models with Rt estimation. Use when an outbreak or epidemic’s spread needs mathematical modeling in Python.
- ICMJE利益冲突声明填写Clones a pre-filled synthetic ICMJE COI form, replacing only date, name and title. Use when each author on a submission needs a disclosure form filled quickly.
- 队列数据库选题挖掘Profiles a longitudinal cohort database and ranks research-topic proposals with gap evidence. Use when looking for a question an available cohort or registry can answer.
- 投稿期刊匹配推荐Matches a manuscript abstract against curated journal profiles and ranks candidates. Use when choosing where to submit, or re-targeting after a rejection.
- DOI全文批量获取Batch-downloads open-access PDFs for a list of DOIs via Unpaywall, PMC and OpenAlex. Use when full texts are needed for a screening set such as a meta-analysis.
- 数据集编码本自动生成Profiles every variable in a tabular dataset into a structured, citable codebook. Use when a CSV, Excel or Stata dataset needs a data dictionary before analysis.
- 全球卫生数据获取分析Accesses and analyzes global health data from WHO GHO, IHME GBD and Our World in Data. Use when DALYs, age-standardized rates or choropleth maps are needed.
- 医学AI项目基金申请书撰写Structures a grant proposal’s significance, innovation, approach, aims and milestones. Use when drafting a research funding proposal, including a Korean grant plan.
- 卫生经济学评价建模Builds Markov cohort models with QALYs, PSA and cost-effectiveness planes. Use when a health intervention needs a formal cost-effectiveness evaluation.
- AI写作痕迹识别改写Scans a manuscript for AI writing patterns and rewrites flagged passages carefully. Use when a draft or response letter reads as obviously AI-written.
- 医学影像数据集画像与预处理Profiles a DICOM or NIfTI dataset’s spacing, intensity and label integrity before modeling. Use when preparing an imaging dataset and auditing it for leakage.
常见问题
机构Word表单内容填充能做什么?
Fills an institutional Word form, such as an IRB protocol, without breaking its layout. Use when drafted content must be rendered into a CJK-aware .docx template。
如何安装机构Word表单内容填充?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「机构Word表单内容填充」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
机构Word表单内容填充需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
机构Word表单内容填充经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。