docx

Create, edit, and analyze .docx files with Python OOXML tooling.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Holy-Pigeon/AIWorkflow --skill docx-holy-pigeon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Holy-Pigeon/AIWorkflow/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/Holy-Pigeon/AIWorkflow --skill docx-holy-pigeon

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automate the end-to-end management of Word documents (.docx) by programmatically creating, editing, redacting, annotating, and extracting content. This enables consistent formatting and auditable changes in professional document workflows without manual GUI interactions.

Core Features & Use Cases

  • Create new documents with structured content (titles, paragraphs, tables, images) while preserving Word styles.
  • Edit existing documents programmatically, applying formatting changes while maintaining layout integrity.
  • Perform tracked changes and comments (redlining) with RSID metadata, enabling auditable collaboration.
  • Extract and analyze text from documents for indexing, search, or data extraction tasks.
  • Integrate with Python OOXML tooling to automate batch processing, templating, and document workflows.

Quick Start

Create a sample Word document with a title and a paragraph using a minimal Python script and save it as example.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 creation and editing with Python?

You can automate Word document creation and editing by using Python OOXML tooling to generate, modify, and audit .docx files with structured content like titles, paragraphs, and tables while preserving native Word styles. This avoids manual GUI interactions.

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

Yes, you can perform redlining with tracked changes and comments programmatically. The tool applies RSID metadata to .docx files, enabling auditable collaboration and ensuring that document modifications are tracked throughout professional workflows.

What is the best way to extract text from .docx files for data indexing?

The best way to extract text from .docx files for indexing or search is to use Python OOXML tooling to analyze and extract content. This enables automated batch processing and data extraction directly from Word documents without manual effort.

Does this approach require defusedxml to process OOXML files safely?

Yes, the approach requires the defusedxml dependency to process OOXML files safely. It utilizes this Python library alongside OOXML tooling to generate, modify, and audit .docx files while protecting against XML-based vulnerabilities during document workflows.

How do I edit existing Word documents while maintaining formatting integrity?

To edit existing Word documents while maintaining formatting integrity, you can apply programmatic formatting changes using Python OOXML tooling. This modifies .docx file content and layout directly, ensuring layout preservation and consistent styling throughout the document.

What are the limitations of using Python OOXML tooling for .docx automation?

A key limitation of using Python OOXML tooling for .docx automation is that it requires Python scripting knowledge and operates entirely code-driven. It bypasses manual GUI interactions, meaning users must programmatically define all document structures, templates, and formatting rules.