docx

Edit Word DOCX XML to apply tracked changes and comments.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Edit Word documents at the XML level with tracked changes, comments, and precise formatting, enabling audit-ready collaboration and automation.

Core Features & Use Cases

  • XML-level Word editing: create and modify documents (.docx) preserving layout while applying tracked changes and comments.
  • Audit-ready workflows: manage revisions with proper RSID, author, and date injection for insertions and deletions.
  • Real-world use: legal contracts, technical manuals, and research papers requiring precise edit history and formatting.

Quick Start

Unpack a sample DOCX and load word/document.xml to apply a tracked change to a targeted paragraph.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I add tracked changes to a Word DOCX document programmatically?

Tracked changes in a Word DOCX are added by editing the underlying XML to wrap text insertions and deletions with revision markup, injecting RSID, author, and date attributes for proper audit trails.

Can I insert comments into a DOCX file by modifying the XML directly?

Yes, comments can be inserted into a DOCX file by unpacking the container, modifying the targeted OOXML structures, and validating the changes against OOXML schemas for precise formatting control.

What is the best way to automate Word document editing for legal contracts with revision history?

Automating Word document editing for legal contracts is best handled through XML-level manipulation of the DOCX format, ensuring all modifications are wrapped as tracked changes with proper author and date injection for compliance.

Do I need lxml to apply tracked changes to OOXML documents?

Yes, lxml and defusedxml are required dependencies to parse and manipulate the OOXML structures safely, enabling the injection of tracked changes and comments while preserving the document layout.

Why does my automated DOCX tracked change lose the original author and date metadata?

Automated DOCX tracked changes lose metadata when the XML editing process fails to inject the required RSID, author, and date attributes into the revision wrappers during the document modification process.

How does XML editing work for Word documents in academic research papers?

XML editing for Word documents works by unpacking the DOCX file, loading the document.xml structure, and applying OOXML schema-validated modifications to paragraphs to maintain precise edit history for academic review.