docx

Manipulate OOXML in .docx files to create, edit, and review Word documents.

11|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/moritalous/claude-code-on-agentcore --skill docx-moritalous
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/moritalous/claude-code-on-agentcore/tree/main/backend/assets/claude-agent/app/.claude/skills/docx
Command: npx skills add https://github.com/moritalous/claude-code-on-agentcore --skill docx-moritalous

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Claude automates creating, editing, and analyzing Word documents (.docx) by programmatically manipulating OOXML while preserving formatting and support for tracked changes and comments.

Core Features & Use Cases

  • Create new Word documents with precise styling and formatting preservation.
  • Edit existing documents, perform redlining with tracked changes, and add inline comments.
  • Analyze document structure, extract text, and maintain multi-turn collaboration notes.

Quick Start

Use the docx skill to load an unpacked .docx directory and apply a sample tracked change or comment, then save and re-pack the document.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I add inline comments and tracked changes to a Word document programmatically?

You can add inline comments and tracked changes to a Word document by programmatically manipulating the OOXML structure inside .docx files. This approach applies deterministic redlining for collaborative document review without altering existing formatting.

Can I edit an existing .docx file while preserving its original styling and formatting?

Editing an existing .docx file while preserving formatting is achieved by directly manipulating the underlying OOXML structure. This ensures that original document styling, tracked changes, and comments remain intact during automated text insertion or deletion.

What is the best way to automate Word document creation for contracts and reports?

Automating Word document creation for contracts and reports is best handled through OOXML manipulation within .docx files. This method allows precise styling control and enables features like tracked changes and inline comments for collaborative workflows.

Do I need Python and lxml to manipulate OOXML in .docx files?

You need Python and lxml, specifically the defusedxml library, to manipulate OOXML in .docx files. These dependencies provide the necessary XML parsing and secure processing required to insert, delete, or revert changes while preserving document formatting.

Does this approach to document editing support multi-turn collaboration notes?

This OOXML document editing approach supports multi-turn collaboration by maintaining inline comments and tracked changes across edits. You can analyze document structure, extract text, and manage collaboration notes directly within the .docx file format.

Why does manipulating OOXML directly work better for document redlining than standard text replacement?

Manipulating OOXML directly works better for document redlining because it preserves the exact Word document structure. Standard text replacement often breaks formatting, while OOXML manipulation ensures tracked changes and comments remain valid and visible.