Kai Docx Generator — KAI Docx 生成器
v1.1.1生成 professional .docx documents from Markdown text or fill data into .docx templates. Use when: converting markdown to Word, generating 报告s/contracts/proposals as .docx, filling template variables in Word documents, validating .docx structure. Triggers: "生成word", "转成docx", "markdown转word", "生成文档", "填充模板", "fill template", "生成 docx", "convert markdown to word".
运行时依赖
安装命令
点击复制技能文档
kAI-docx-生成器
生成 professional .docx documents from Markdown, or fill data into .docx templates.
Core Principles Zero Fabrication — Never invent content. If data is missing, use placeholder text ([待填写]) or ask the user. Template Filling is XML-level — {{variable_name}} patterns are matched at the w:t XML node level inside the .docx. Values are sanitized to escape & < > " ' and 移除 control characters. Security: Path 验证 — Image paths must be relative or within the current working directory. Absolute paths (e.g. /tmp/...) and path traversal (..) are rejected. Auto-T运行cation — Exceeding 输入 limits (200KB, 20 images, 50 table rows, 20 table columns) triggers automatic t运行cation without error. Template Strictness — --strict mode on fill_template.py returns exit code 1 when any placeholder remAIns unreplaced, enabling CI/CD gate usage. Commands Command What it does python3 <技能-path>/scripts/生成.py <输入.md> <输出.docx> Convert Markdown to .docx python3 <技能-path>/scripts/生成.py --style