docx-official

Create, edit, and analyze Word documents with tracked changes and comments.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/nperepichka/Antigravity --skill docx-official-nperepichka
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docx-official
Source: https://github.com/nperepichka/Antigravity/tree/main/config/skills/docx-official
Command: npx skills add https://github.com/nperepichka/Antigravity --skill docx-official-nperepichka

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with Microsoft Word (.docx) files programmatically is error-prone because they are ZIP archives of complex OOXML. This Skill provides structured workflows for reading, creating, and editing Word documents, including professional redlining with tracked changes and comments. ## Core Features & Use Cases - Text Extraction & Analysis: Convert .docx to markdown with pandoc, preserving tracked changes, or unpack raw XML for comments, media, and metadata. - Document Creation: Generate new Word documents with the docx-js JavaScript library, including styles, tables, lists, images, headers, and tables of contents. - Redlining & Editing: Apply precise tracked changes and comments to existing documents using a Python Document library with automatic RSID, validation, and batching support. - Use Case: Review a legal contract by converting it to markdown, planning batched edits, implementing tracked insertions and deletions in the XML, and verifying the final redlined document. ## Quick Start Use the docx skill to review the attached contract.docx and add tracked changes replacing all 30-day terms with 60-day terms.

Frequently Asked Questions about docx-official

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

FAQPage Schema
How do I extract text from a Word docx file?▼

Convert the document to markdown using pandoc with the --track-changes=all flag to preserve insertions and deletions. For comments, embedded media, or complex formatting, unpack the docx as a ZIP archive and read the raw XML files directly.

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

Use the Python Document library to wrap edits in w:ins and w:del elements at the paragraph level. The library auto-injects RSIDs, author, and date attributes, and validates the result so Word accepts the redlined file.

What library should I use to create Word documents in JavaScript?▼

Use the docx npm library with Document, Paragraph, and TextRun components, then export with Packer.toBuffer. Always use proper numbering configuration for lists and separate Paragraph elements instead of newline characters.

Can I convert a docx file to images for visual review?▼

Yes, convert the docx to PDF with LibreOffice headless mode, then use pdftoppm to render pages as JPEG or PNG images at a chosen DPI. You can limit conversion to specific page ranges with the -f and -l flags.

Why does my edited docx fail to open in Word?▼

Common causes include nesting w:ins or w:del inside w:r elements, standalone PageBreak elements, or missing relationship entries. The Document library's save validation catches schema violations before packing the final file.