docx

Edit and audit .docx files with tracked changes and comments.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/fantay0312/fantayspec --skill docx-fantay0312
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/fantay0312/fantayspec/tree/main/shared/skills/skills-all/docx
Command: npx skills add https://github.com/fantay0312/fantayspec --skill docx-fantay0312

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables programmatic creation, editing, and analysis of Word documents (.docx), including support for tracked changes, comments, and formatting preservation.

Core Features & Use Cases

  • Create new Word documents and modify existing content while maintaining OOXML structure.
  • Apply tracked changes and insert comments programmatically, enabling audit trails and collaborative reviews.
  • Preserve formatting, tables, and images during automated edits and extract textual content when needed.

Quick Start

Create a new Word document, apply edits with tracked changes, and export the final file as a .docx.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I programmatically edit a Word document and apply tracked changes?

You can programmatically edit a Word document and apply tracked changes by leveraging Python OOXML tooling to modify paragraphs, runs, and tables while preserving formatting and ensuring valid WordprocessingML structure.

Can I insert comments into a .docx file automatically using Python?

Yes, you can insert comments into a .docx file automatically. The Skill modifies OOXML structure directly to add comments programmatically, enabling audit trails and collaborative reviews for legal, academic, or business workflows.

How do I extract text and tables from a Word document without losing formatting?

To extract text and tables from a Word document without losing formatting, the Skill parses the OOXML structure to preserve tables, images, and formatting during automated edits while extracting the textual content you need.

Does this approach require lxml to modify OOXML files?

Yes, modifying OOXML files with this approach requires lxml and defusedxml dependencies. These libraries provide the XML parsing and secure validation utilities needed to ensure valid WordprocessingML structure during document editing.

What is the best way to automate Word document creation for business workflows?

The best way to automate Word document creation for business workflows is using Python OOXML tooling that programmatically generates .docx files while maintaining valid WordprocessingML structure for paragraphs, tables, and images.

Why do my automated Word document edits corrupt the file structure?

Automated Word document edits corrupt the file structure when OOXML validation is bypassed. Using dedicated validation utilities ensures your modifications to paragraphs, runs, and tables maintain valid WordprocessingML structure and prevent corruption.