This is a comprehensive workflow for creating, reading, and editing Word documents through their underlying OOXML structure. It shines when you need to implement tracked changes professionally, the kind you'd see in legal or business document reviews. The redlining workflow is well thought out: convert to markdown with pandoc to plan your edits, batch changes strategically, then use the Document library to inject precise tracked change XML that only marks what actually changed. It includes docx-js for creating new documents from scratch and detailed patterns for unpacking the ZIP structure to access comments, formatting, and metadata directly. The batching strategy and minimal edit principle show real world experience with document review workflows.
$ npx -y skills add rysweet/amplihack --skill docx --agent claude-codeInstalls into .claude/skills of the current project.
A user may ask you to create, edit, or analyze the contents of a .docx file. A .docx file is essentially a ZIP archive containing XML files and other resources that you can read or edit. You have different tools and workflows available for different tasks.
Use "Text extraction" or "Raw XML access" sections below
Use "Creating a new Word document" workflow
Your own document + simple changes Use "Basic OOXML editing" workflow
Someone else's document Use "Redlining workflow" (recommended default)
Legal, academic, business, or government docs Use "Redlining workflow" (required)
If you just need to read the text contents of a document, you should convert the document to markdown using pandoc. Pandoc provides excellent support for preserving document structure and can show tracked changes:
Sponsors