docx

Create and edit Word documents with tracked changes via Python OOXML.

3|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/imvladikon/dot-claude --skill docx-imvladikon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/imvladikon/dot-claude/tree/main/skills/document-skills/docx
Command: npx skills add https://github.com/imvladikon/dot-claude --skill docx-imvladikon

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automate Word document workflows by enabling programmatic creation, editing, and tracking of changes with preserved formatting and integrated commenting.

Core Features & Use Cases

  • Create and edit DOCX files programmatically while preserving formatting and styles.
  • Manage collaboration with tracked changes, insertions, deletions, and comments during reviews.
  • Support for redlining workflows, extraction, and packaging edits back into a valid .docx for sharing.

Quick Start

Run the OOXML editor on a sample document to create, modify, and output a finished .docx.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automate tracked changes in Word documents using Python?

Yes, you can programmatically edit DOCX files while preserving existing formatting and styles. The Skill manipulates the underlying OOXML structure to apply text changes, add comments, and track revisions without corrupting the original document layout.

What is the best way to add comments to a Word document programmatically?

To package edited OOXML back into a valid DOCX file, the Skill applies your programmatic modifications, injects necessary metadata, and compresses the XML components into the final .docx archive format. This ensures the output document opens correctly in standard Word processors.

Does lxml support deterministic changes in Word docx files?

Yes, lxml supports deterministic changes in Word DOCX files by parsing the OOXML structure directly. Combined with defusedxml for safe parsing, the Skill ensures precise text modifications, tracked changes, and metadata injection without unpredictable formatting shifts.

Can I extract tracked changes from a DOCX file without opening Microsoft Word?

You can extract tracked changes from a DOCX file without Microsoft Word by parsing the OOXML structure with Python. The Skill reads insertion, deletion, and comment elements directly from the XML, allowing automated review and extraction workflows.

Why does my Python script corrupt the DOCX file when adding tracked changes?

Scripts corrupt DOCX files when adding tracked changes if the OOXML structure and metadata are not properly managed. This Skill prevents corruption by using lxml to correctly inject RSID and author metadata, ensuring the final packaged .docx remains valid.