Docx

Create, edit, and extract content from .docx files via OOXML.

4|1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/pynbj1001/alpha-sense --skill docx-pynbj1001
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Docx
Source: https://github.com/pynbj1001/alpha-sense/tree/main/.pai_runtime/.claude/skills/Documents/Docx
Command: npx skills add https://github.com/pynbj1001/alpha-sense --skill docx-pynbj1001

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word documents (.docx) are ubiquitous in professional workflows, but manual creation, editing, and tracking changes are tedious and error-prone.

Core Features & Use Cases

  • Create new .docx files with styled content, tables, and images.
  • Edit existing documents, apply tracked changes, and manage comments while preserving formatting and provenance.
  • Extract text or metadata from OOXML for analysis, reporting, or conversion to other formats.

Quick Start

Create a Word document with a title and sections, applying styles and tracked changes as needed.

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?

Automating Word document creation and editing is handled by internal scripts that generate .docx files with styled content, tables, and images while enforcing OOXML validity. You programmatically define content and apply styles to produce production-ready documents.

Can I apply tracked changes and manage comments in a .docx file programmatically?

Applying tracked changes and managing comments in a .docx file is supported through internal OOXML utilities. You can edit existing documents while preserving formatting and provenance, ensuring document integrity during automated review workflows.

Does this approach work for extracting text and metadata from OOXML documents?

Extracting text and metadata from OOXML documents is a core feature. Internal scripts unpack the .docx structure, parse the underlying XML, and provide raw content and metadata for downstream analysis, reporting, or format conversion.

What is the best way to generate Word reports without manual formatting errors?

Generating Word reports without manual formatting errors relies on a packing and unpacking workflow. Internal scripts enforce XML validity during creation, automatically applying styled content and tracked changes to produce error-free .docx files.

Do I need defusedxml to process Word documents and ensure XML validity?

Processing Word documents and ensuring XML validity requires the defusedxml dependency. It secures the OOXML parsing and unpacking workflow, preventing XML vulnerabilities while manipulating internal document structures.

Why does my .docx file break when I edit the OOXML structure directly?

Editing OOXML structure directly breaks .docx files when XML validity is not enforced. This Skill solves that by using internal utilities and a packing workflow to guarantee structural integrity during document creation and modification.