docx

Create, edit, and analyze DOCX files with Python and OOXML scripts.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/CaptainPhantasy/floyd-v5 --skill docx-captainphantasy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/CaptainPhantasy/floyd-v5/tree/main/extensibility/skills/data/docx
Command: npx skills add https://github.com/CaptainPhantasy/floyd-v5 --skill docx-captainphantasy

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automates the end-to-end DOCX workflow by enabling programmatic creation, modification, and analysis of Word documents, including tracking changes and managing comments.

Core Features & Use Cases

  • Create new .docx files with formatted content, tables, and sections.
  • Edit existing documents while preserving formatting and tracked changes, and attach comments for review.
  • Extract text and structural data from Word documents for analysis or archival workflows.

Quick Start

Create a sample Word document to verify the workflow by generating a simple document with a heading and a 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 generation with Python?

Automate Word document generation by using Python scripts and OOXML handling to create new .docx files with formatted content, tables, and sections. This approach enables programmatic document creation for professional workflows.

How do I apply tracked changes and comments to an existing .docx file?

Apply tracked changes and comments to a .docx file by executing Python OOXML scripts that modify existing documents while preserving formatting and attaching review annotations for professional archival workflows.

Can I extract text and structural data from Word documents for analysis?

Extract text and structural data from Word documents by running document analysis scripts that parse .docx file structures, yielding extracted content for analysis or archival workflow integration.

Do I need Python and OOXML handling to modify .docx files programmatically?

You need Python tooling and OOXML handling scripts, supported by lxml and defusedxml dependencies, to operate on .docx files and execute programmatic document edits, creation, and analysis.

What is the best way to edit Word documents while preserving formatting?

The best way to edit Word documents while preserving formatting is using OOXML scripts that directly manipulate .docx structures, ensuring original formatting and tracked changes remain intact during modifications.

Why does programmatic Word document creation require OOXML handling?

Programmatic Word document creation requires OOXML handling because .docx files are XML-based archives; parsing and modifying these structures with lxml ensures valid document generation without corrupting formatting.