1---2name: docx-high-fidelity3description: # DOCX High Fidelity Skill4---5# DOCX High Fidelity Skill67## Trigger89Use this skill when either condition is true:10111. User asks to generate a new Word document with high fidelity to a provided source `.docx` template.122. User asks to generate a Word document but no source template is provided (template-optional mode).1314## Fixed Pipeline1516Always execute in this order:17181. `extract` (OOXML parse + template-manifest/template-graph/slot-schema)192. `generate` (JSON-first slot fill + Annotated Markdown++)203. `validate` (annotation + slot-schema/style/numbering/table/media/layout)214. `repair` (annotation repair + slot-level JSON repair)225. `render` (source patch if source exists; deterministic render otherwise)236. `finalize` (`none` or `libreoffice`)247. `fidelity` (structure/layout/style/visual scoring + report)2526## Hard Constraints27281. JSON output must satisfy slot schema.292. Style IDs must come from template whitelist.303. Structure outside slots must stay unchanged in source patch mode.314. Annotated Markdown++ cannot contain HTML tags.325. All style tags must be paired.3334## Required Artifacts3536Every run must include:37381. `rendered/final.docx`392. `generated/slot-fill.validated.json`403. `generated/annotated.validated.md`414. `fidelity/fidelity-report.md`4243## CLI Examples4445```bash46pnpm tsx src/pipeline/run.ts \47 --source "/path/source.docx" \48 --template-mode source \49 --instruction "/path/instruction.txt" \50 --out "/path/runs/run_001" \51 --finalizer libreoffice52```5354```bash55pnpm tsx src/pipeline/run.ts \56 --template-mode auto \57 --instruction "Generate a project report with conclusions and risks" \58 --out "/path/runs/run_002" \59 --finalizer none60```6162```bash63pnpm tsx src/pipeline/benchmark.ts \64 --dataset "/path/10-doc-set" \65 --out "/path/runs/benchmark"66```
Run npx skillmds@latest add a17339529088/docx-high-fidelity in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
# DOCX High Fidelity Skill It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: executes scripts. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
a17339529088 (@a17339529088) published this skill. Their other Agent Skills are listed on their SkillMD profile.