docx

Create and modify Word documents with tracked changes and comments.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/quany/skills --skill docx-quany
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/quany/skills/tree/main/docx
Command: npx skills add https://github.com/quany/skills --skill docx-quany

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates Word (.docx) document creation, modification, and review by programmatically manipulating OOXML, enabling tracked changes, comments, and content extraction while preserving formatting.

Core Features & Use Cases

  • Create and edit .docx templates and documents programmatically.
  • Apply tracked changes and insert comments to support collaboration and reviews.
  • Extract text and structure from Word files for archival, reporting, or data processing.
  • Use Case: A legal team auto-revises a contract template by applying redlines and exporting a clean version for final approval.

Quick Start

Load an unpacked Word document workspace and run the editor workflow to create or modify content. For example, initialize the editor with a working directory containing word/document.xml and apply a set of tracked changes and comments, then save and re-pack.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automate Word document editing with tracked changes and comments?

Apply tracked changes and insert comments in Word documents by programmatically manipulating OOXML. Unpack the .docx workspace, modify word/document.xml, and repack while preserving formatting for collaborative reviews.

Can I extract text and structure from .docx files for data processing?

Extract text and structure from .docx files by parsing internal OOXML. This captures document content for archival, reporting, or data processing without altering original formatting.

Do I need Python libraries like lxml to modify Word documents programmatically?

Modifying Word documents programmatically requires Python libraries including defusedxml and lxml, plus the internal ooxml package. These handle secure XML parsing and structural manipulation of .docx files.

What is the best way to auto-revise contract templates and apply redlines?

Auto-revise contract templates by loading an unpacked Word document workspace and running an editor workflow to apply redlines as tracked changes. Export a clean version for final approval.

How does OOXML manipulation handle formatting preservation when creating Word documents?

OOXML manipulation preserves formatting by directly modifying the underlying XML structure within the .docx package. Document creation, modification, and tracked changes maintain original styling and layout.

Are there limitations when using LibreOffice soffice for Word document validation?

LibreOffice soffice provides optional validation for Word documents during OOXML manipulation. It is not required for core editing but verifies document integrity after repacking.