docx

Generate and edit .docx files using Python and the docx JS library.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/erlebach/gordon --skill docx-erlebach
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/erlebach/gordon/tree/main/skills/docx
Command: npx skills add https://github.com/erlebach/gordon --skill docx-erlebach

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word document workflows are slow and error-prone when creating, reading, editing, or formatting .docx files. This skill automates those tasks, eliminating repetitive manual steps and enabling consistent document output.

Core Features & Use Cases

  • Create new Word documents with headings, tables, lists, and images.
  • Read, edit, and reorganize content in existing .docx files, including tracked changes and comments.
  • Convert or export Word content into polished deliverables (letterheads, templates, reports).

Quick Start

Create a polished Word document by telling the AI to generate a .docx using this skill.

Frequently Asked Questions about docx

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

FAQPage Schema
Can I read and edit existing .docx files including tracked changes and comments?

Yes, you can read and edit existing .docx files with tracked changes and comments using Python libraries defusedxml and lxml. The skill performs XML-level processing to reorganize content and manage document revisions deterministically.

What's the best way to generate template-ready Word reports or letters programmatically?

Generate template-ready Word reports and letters by orchestrating the docx JS library with Python toolchains to produce polished deliverables. The process follows deterministic steps: create, populate, format, and validate to ensure consistent output.

Does this approach require specific Python dependencies for XML-level document processing?

Yes, XML-level document processing requires defusedxml and lxml Python dependencies. These libraries handle the underlying XML structure of .docx files, enabling deterministic content manipulation and validation during the document automation workflow.

Why does my automated Word document formatting break when processing complex templates?

Complex template formatting issues often stem from skipping the deterministic validation step in the create, populate, format, validate workflow. Proper XML-level processing with lxml ensures document structure integrity before final output generation.