docx

Edit Word documents with tracked changes and comments via Python OOXML.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/aleph23/Natasha --skill docx-aleph23
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/aleph23/Natasha/tree/main/skills/document-skills/docx
Command: npx skills add https://github.com/aleph23/Natasha --skill docx-aleph23

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Manually editing and reviewing Word documents is error-prone and time-consuming; this Skill automates complex OOXML tasks such as applying tracked changes, inserting comments, and preserving formatting for reproducible document workflows.

Core Features & Use Cases

  • Programmatic Word document editing with tracked changes and comments for auditable revision trails.
  • Support for creating, modifying, and redlining content while preserving styling and layout integrity.
  • Use cases span legal, academic, and corporate review processes where precise document revision history is required.

Quick Start

Process a sample .docx to apply a tracked change and add a comment to a target paragraph.

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 editing with tracked changes in Python?

You can automate Word document editing with tracked changes using Python OOXML tooling to programmatically insert revisions and comments while preserving formatting. This ensures reproducible auditable document workflows for legal, academic, and corporate review processes.

Can I programmatically insert comments and redline content in a .docx file?

Yes, you can programmatically insert comments and redline content in a .docx file by manipulating the underlying OOXML structure. This allows you to create auditable revision trails while maintaining the document's original styling and layout.

Does Python OOXML tooling preserve formatting when applying tracked changes to Word documents?

Python OOXML tooling preserves formatting when applying tracked changes by strictly following OOXML patterns during scripted edits. It maintains RSIDs, author metadata, and validates document integrity to ensure precise formatting preservation for reproducible workflows.

What is the best way to create auditable revision trails in Word documents for legal review?

The best way to create auditable revision trails in Word documents for legal review is automating OOXML tasks to apply tracked changes and comments. This programmatic approach ensures precise document revision history and reproducible document workflows.

Do I need lxml and defusedxml to manipulate Word documents with tracked changes?

Yes, you need lxml and defusedxml dependencies to securely parse and manipulate the OOXML structure of Word documents. These libraries provide the necessary XML processing capabilities to apply tracked changes and insert comments programmatically.