docx

Manage tracked changes and comments in DOCX files via a Python API.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/Victory-Hugo/S2-Agent-Skill --skill docx-victory-hugo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Victory-Hugo/S2-Agent-Skill/tree/main/skills/writing/document-skills/docx
Command: npx skills add https://github.com/Victory-Hugo/S2-Agent-Skill --skill docx-victory-hugo

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the management of tracked changes and comments in Word DOCX documents, enabling programmatic control over author metadata, RSIDs, and redlining workflows.

Core Features & Use Cases

  • Automated tracking: Create and review tracked changes and comments via a Python API that manipulates Word's OOXML structures.
  • Author metadata management: Inject RSIDs and author details across word/document.xml, settings.xml, and related parts to maintain audit trails.
  • Validation integration: Validate XML structure against OOXML schemas and ensure proper relationships, content types, and references during edits.
  • Use Case: A team collaborates on a large Word document; through the scriptable API, they apply edits, comments, and reviews with consistent metadata, then save and re-pack.

Quick Start

Use the Docx Document API to load an unpacked DOCX and start editing tracked changes and comments. For example:

  • Load: doc = Document('path/to/unpacked')
  • Add a comment: doc.add_comment(start_node, end_node, "Review note")
  • Save: doc.save()

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 and comments in Word DOCX files?

You can automate tracked changes and comments in Word DOCX files by using a Python API to directly manipulate OOXML structures like word/document.xml, ensuring consistent author metadata and redlining workflows.

Can I programmatically inject RSID and author metadata into OOXML documents?

Yes, you can programmatically inject RSID and author metadata into OOXML documents by modifying settings.xml and related parts to maintain a reliable audit trail for collaborative redlining.

How do I validate OOXML structures after modifying a Word document?

To validate OOXML structures after modifying a Word document, you can integrate with OOXML validators to ensure proper relationships, content types, and XML schema references are maintained during edits.

What dependencies are needed to script Word editing and redlining workflows?

To script Word editing and redlining workflows, you need the Python libraries defusedxml and lxml to securely parse and manipulate the underlying OOXML structures within the DOCX format.

What is the best way to manage reviews across a large collaborative Word document?

The best way to manage reviews across a large collaborative Word document is using a scriptable API to apply edits, comments, and author details with consistent metadata, then save and re-pack the DOCX.