docx

Create, read, and edit Word .docx documents including tracked changes and comments.

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/TylerSimons1127/vibe --skill docx-tylersimons1127
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/TylerSimons1127/vibe/tree/main/skills/productivity/docx
Command: npx skills add https://github.com/TylerSimons1127/vibe --skill docx-tylersimons1127

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx, defusedxml, lxml, pandoc, libreoffice, poppler-utils, and includes scripts (resource) components.

What problem does it solve? Working with Word documents programmatically is error-prone: docx-js cannot open existing files, Word fragments text across XML runs, and tracked changes or comments require cross-linked XML parts. This Skill provides tested workflows and scripts for creating, reading, and surgically editing .docx files without corrupting them. ## Core Features & Use Cases - Document Creation: Generate reports, memos, and letters with docx-js, with guidance on page size, tables, lists, images, and tables of contents. - Surgical XML Editing: Unzip a .docx, merge fragmented runs, edit word/document.xml directly, rezip, and validate against XSD schemas. - Redlining & Comments: Add tracked changes with proper w:ins/w:del markup, insert threaded comments via a helper script, and accept all changes through LibreOffice. - Use Case: A contract needs redlining — unpack it, merge runs so clauses are findable, wrap edits in tracked-change elements, validate with the original for comparison, and render to PDF to visually verify every page. ## Quick Start Use the docx skill to create a Word report with a title page, headings, and a table, then render it to PDF so I can check the layout.

Frequently Asked Questions about docx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit an existing Word .docx file programmatically?▼

Unzip the .docx, edit word/document.xml in place, then rezip from inside the unpacked directory. The docx npm library cannot open existing files, so direct XML editing is the supported path, followed by XSD validation against the original.

How do I add tracked changes to a Word document?▼

Wrap edited runs in w:ins and w:del elements with w:id, w:author, and w:date attributes; deleted text uses w:delText instead of w:t. Validate with the --author flag against the original file to catch any edit missing tracked-change markup.

Why can't I find text in word/document.xml that I see in Word?▼

Word splits text across many w:r runs due to revision IDs and spell-check markers, so visible phrases rarely exist as contiguous strings. Run merge_runs.py to coalesce adjacent identically-formatted runs before searching or replacing.

Does docx-js support opening and editing existing documents?▼

No, docx-js only creates new documents from scratch. For existing files, unzip the archive, edit the XML directly, and rezip; legacy .doc files must first be converted to .docx with LibreOffice.

How do I verify a generated Word document looks correct?▼

Convert the .docx to PDF with LibreOffice headless, then use pdftoppm to render pages as images and inspect each one visually. Also run validate.py against the original to catch schema, relationship, and content-type errors.