docx

Automate DOCX editing with tracked changes and comments via OOXML manipulation.

7|3|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/Zpankz/mcp-skillset --skill docx-zpankz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Zpankz/mcp-skillset/tree/main/office/docx
Command: npx skills add https://github.com/Zpankz/mcp-skillset --skill docx-zpankz

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a Python-based toolkit to automate complex DOCX document workflows, including creating, editing, tracking changes, and commenting, enabling consistent, auditable document transformations without manual XML tweaking.

Core Features & Use Cases

  • Tracked changes & redlining: Programmatically apply insertions and deletions while preserving formatting and author metadata for professional review.
  • Comments & collaboration: Add, reply to, and manage comments across document ranges to support collaborative edits.
  • Document automation: Create and modify Word documents programmatically, including handling of complex OOXML structures and formatting preservation.
  • Use Case: Legal or corporate teams can automate redlines on contract drafts, ensuring traceability and auditability throughout review cycles.
  • Use Case: Technical writers can script standardized edits across multiple DOCX templates to enforce formatting and content guidelines.

Quick Start

Install the package and initialize Document with the path to an unpacked DOCX directory to begin applying tracked changes and comments.

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?

Automate tracked changes in Word documents by using Python-based OOXML manipulation to programmatically insert and delete content while preserving formatting and author metadata for auditable redlining.

What is OOXML manipulation for DOCX redlining?

OOXML manipulation for DOCX redlining is the process of directly editing the underlying XML structure of Word files to apply insertions, deletions, and comments while maintaining document integrity and formatting.

Can I programmatically add comments to a DOCX file for collaboration?

Yes, you can programmatically add comments to a DOCX file by leveraging OOXML manipulation to annotate specific document ranges, supporting collaborative review workflows and reply threads.

Does this Python approach preserve formatting when applying tracked changes?

Yes, this Python approach preserves formatting when applying tracked changes by validating edits against OOXML patterns and relationships, ensuring document integrity is maintained throughout the transformation.

What is the best way to script standardized edits across multiple DOCX templates?

The best way to script standardized edits across multiple DOCX templates is using a Python-based Document stack to automate content modifications and enforce formatting guidelines without manual XML tweaking.

Do I need lxml to automate DOCX document editing?

Yes, you need lxml and defusedxml installed to parse and manipulate the OOXML structures required for automating DOCX document editing, tracked changes, and comment workflows.