docx

Create and edit Word documents with tracked changes and comments using Python OOXML.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the creation, editing, and review of Word documents (.docx), including support for tracked changes, comments, and formatting preservation, to streamline professional document workflows.

Core Features & Use Cases

  • Document creation and editing: Generate new Word documents or modify existing ones while preserving formatting and structure.
  • Redlining and comments: Apply tracked changes, manage insertions and deletions, and attach comments to document sections for collaborative reviews.
  • Workflow integration: Integrate with templates and review processes to accelerate drafting, revision, and finalization of legal, technical, or business documents.

Quick Start

Use the docx skill to create a new Word document and apply a tracked change, or to load an existing document and add a comment.

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 creation and editing in Python?

You can automate Word document creation and editing by using Python OOXML tooling with libraries like lxml and defusedxml. This approach allows you to generate new .docx files or modify existing content while preserving the original formatting and document structure.

Can I apply tracked changes and comments to a docx file programmatically?

Yes, you can apply tracked changes and comments to a docx file programmatically. By manipulating WordprocessingML content directly, the skill supports applying redlining, managing insertions and deletions, and attaching comments for collaborative review workflows.

Does Python support modifying existing Word documents without losing formatting?

Python does support modifying existing Word documents without losing formatting. By leveraging internal OOXML utilities, you can load and edit .docx files while maintaining their original structural layout, styles, and embedded formatting elements.

What is the best way to integrate redlining into an automated document workflow?

The best way to integrate redlining into an automated document workflow is to use Python scripts that directly manipulate OOXML. This enables seamless integration with templates and review processes to accelerate drafting, revision, and finalization of legal or technical documents.

Do I need lxml and defusedxml to manipulate WordprocessingML content?

You do need lxml and defusedxml to manipulate WordprocessingML content effectively. These dependencies provide the necessary XML parsing and secure processing capabilities required to interact with the underlying OOXML structure of Word documents.

Why use OOXML tooling instead of standard Word automation for collaborative reviews?

Using OOXML tooling instead of standard Word automation for collaborative reviews allows you to apply tracked changes and comments directly to the XML structure. This avoids application overhead and provides precise control over document revisions for legal and business workflows.