docx

Create, modify, and analyze Word documents while preserving tracked changes and comments.

1|Updated Oct 9, 2025
One-click install
npx skills add https://github.com/omerakben/omer-akben --skill docx-omerakben
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/omerakben/omer-akben/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/omerakben/omer-akben --skill docx-omerakben

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates end-to-end Word document tasks (.docx) by enabling creation, editing, and analysis while preserving formatting, tracked changes, and comments. It reduces manual editing overhead and helps maintain document fidelity during complex review processes.

Core Features & Use Cases

  • Automated DOCX creation and editing with preserved formatting and tracked changes.
  • Comment handling, change tracking validation, and text extraction for analysis.
  • Use Case: When you need to generate a standard contract, apply edits and company-specific terms while keeping a complete changelog, then export or re-pack the document.

Quick Start

Use the docx skill to unpack a sample document, apply automated edits, and re-pack as edited.docx.

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 while preserving tracked changes and comments?

Automating Word document editing while preserving tracked changes and comments is done by unpacking the .docx file, applying Python-based XML processing to modify content, and re-packing the output to maintain formatting and review logs.

What is the best way to extract text from a .docx file for analysis across multiple edits?

Extracting text from a .docx file for analysis involves unpacking the document structure and using Python XML processing to parse the content, allowing you to capture text and review elements across multiple edits.

Can I use Python and lxml to repair and validate Word documents before repacking?

Yes, you can use Python with lxml and defusedxml to repair, validate, and re-pack Word documents, ensuring the final .docx output maintains structural integrity and document fidelity during complex review processes.

Does automating .docx creation with Python support standard contracts and company-specific terms?

Automating .docx creation with Python supports generating standard contracts and applying company-specific terms, enabling you to apply edits while keeping a complete changelog and exporting the validated document.

Why does my Word document lose formatting when applying automated XML edits?

Word documents lose formatting during automated XML edits if the internal structure is not properly validated, making it necessary to use specific script modules to repair, validate, and correctly re-pack the final .docx output.

Do I need defusedxml to safely process XML in Word document automation?

Yes, defusedxml is needed to safely process XML in Word document automation, providing protection against XML vulnerabilities while lxml handles the parsing and modification of the document's internal structure.