docx

Create, edit, and analyze Word .docx documents via docx-js and OOXML manipulation.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/Protremix/EvolvixOS --skill docx-protremix
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Protremix/EvolvixOS/tree/main/knowledge/experts/office-automation/skills/docx
Command: npx skills add https://github.com/Protremix/EvolvixOS --skill docx-protremix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx, defusedxml, lxml, and includes scripts (resource) components.

What problem does it solve? Working with Word documents programmatically is error-prone: .docx files are ZIP archives of XML with strict schema rules, and naive edits produce corrupt files. This Skill provides a complete workflow for creating professional Word documents from scratch and safely editing existing ones, including tracked changes, comments, tables, images, and table of contents. ## Core Features & Use Cases - New Document Creation: Generate .docx files with the docx-js library, including styled headings, bullet/numbered lists, tables with correct DXA widths, images, headers, footers, page numbers, and tables of contents. - Existing Document Editing: Unpack the .docx ZIP, edit the XML directly (tracked insertions/deletions, comments with replies, image insertion), then repack with automatic validation and repair. - Document Analysis & Conversion: Extract text with pandoc, convert legacy .doc to .docx, accept all tracked changes via LibreOffice, and render pages to images. - Use Case: A user asks for a contract review. The Skill unpacks the .docx, adds tracked changes and comments as redlines, validates the XML against OOXML schemas, and repacks a clean, non-corrupt document. ## Quick Start Ask the assistant to create a professional Word report with a title page, table of contents, and formatted tables, or to add tracked changes and comments to an existing .docx file.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I create a Word document programmatically with JavaScript?▼

Use the docx npm library (docx-js) to build a Document object with paragraphs, tables, images, and headers, then call Packer.toBuffer to write the .docx file. Always set explicit page dimensions in DXA units and validate the output afterward.

How do I add tracked changes to a .docx file?▼

Unpack the .docx into its XML parts, then wrap inserted text in w:ins elements and deleted text in w:del elements with w:delText, including author and date attributes. Repack the directory and validate against the OOXML schema to avoid corruption.

Why does my generated docx table render incorrectly in Google Docs?▼

Tables fail when using WidthType.PERCENTAGE or when columnWidths do not match cell widths. Always use WidthType.DXA, set width on both the table and every cell, and ensure columnWidths sum exactly to the table width.

Can I convert old .doc files to .docx for editing?▼

Yes, use LibreOffice in headless mode with the soffice --convert-to docx command. Legacy .doc files must be converted before any XML-based editing, since the binary .doc format cannot be unpacked as ZIP/XML.

What tools are needed to accept all tracked changes in a Word document?▼

LibreOffice can accept all tracked changes headlessly via a Basic macro that dispatches the AcceptAllTrackedChanges command. The accept_changes.py script automates macro setup and execution, producing a clean output document.