docx

Create, read, edit, and format Word .docx documents with Python.

1|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/RussianRoulette84/agentic_project --skill docx-russianroulette84
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/RussianRoulette84/agentic_project/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/RussianRoulette84/agentic_project --skill docx-russianroulette84

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word document workflows—creating, formatting, and editing—are tedious, error-prone, and time-consuming. This skill automates key tasks to speed up drafting and ensure consistent output.

Core Features & Use Cases

  • DOCX creation, editing, and analysis: manipulate WordprocessingML to read, modify, and inspect content.
  • Advanced formatting automation: manage headers, tables, images, footnotes, and tables of contents with deterministic results.
  • Validation and repair: enforce correct content types, relationships, IDs, and whitespace preservation; support tracked changes for safe collaboration.

Quick Start

Create a new Word document (.docx) with a basic header and a simple table to verify formatting.

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 formatting across multiple files?

Automating Word document formatting across multiple files involves manipulating WordprocessingML to manage headers, tables, images, footnotes, and tables of contents with deterministic results. This ensures consistent structure and formatting across all generated documents.

What is the best way to edit existing .docx files programmatically?

Editing existing .docx files programmatically requires parsing and modifying WordprocessingML content to read, update, and inspect document elements. This approach enforces correct content types, relationships, and IDs to preserve document integrity.

Does Python work for generating Word documents with tracked changes?

Python works for generating Word documents with tracked changes by validating and repairing WordML content while preserving whitespace. This requires specific Python tooling like defusedxml and lxml to safely manipulate the underlying XML structure.

Can I create professional Word documents with tables and headers without manual formatting?

Creating professional Word documents with tables and headers without manual formatting is possible by automating the drafting process. This skill handles advanced formatting automation to build documents with consistent structure, tables, and images deterministically.

Why does my automated .docx generation break when adding complex structures like footnotes?

Automated .docx generation breaks when adding complex structures like footnotes due to incorrect content types, relationships, or IDs within the WordML. Validation and repair mechanisms are required to enforce correct structural elements and preserve whitespace.