docx

Create, edit, and analyze Word .docx files programmatically via XML.

Updated Nov 29, 2025
One-click install
npx skills add https://github.com/thimslugga/agent-skills --skill docx-thimslugga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/thimslugga/agent-skills/tree/main/skills/documents/docx-official
Command: npx skills add https://github.com/thimslugga/agent-skills --skill docx-thimslugga

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word documents (.docx) are central to professional workflows, but repetitive formatting, templating, and content assembly are error-prone and time-consuming. This skill provides a programmatic capability to create, read, edit, and analyze .docx files, enabling repeatable document workflows.

Core Features & Use Cases

  • Create new Word documents from templates, including styling overrides, headers/footers, and Table of Contents.
  • Edit and update existing documents by modifying text, tables, images, and tracked changes while preserving styles.
  • Convert legacy .doc files to modern .docx, extract content, and validate document structure for consistent results.
  • Use cases include producing branded reports, client-ready proposals, and internal playbooks with repeatable formatting.

Quick Start

Provide a sample Word document and request a polished .docx output with branding, formatting, and a table of contents.

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 from a template?

Automate Word document generation by programmatically manipulating .docx structures and XML to apply styling overrides, headers, footers, and tables of contents to produce branded reports and proposals.

Can I edit existing .docx files and preserve the original styles?

Edit existing .docx files by modifying text, tables, images, and tracked changes programmatically while preserving styles and ensuring correct section structure and relationship integrity.

What is the best way to convert legacy .doc files to modern .docx?

Convert legacy .doc files to modern .docx by extracting content and validating document structure to ensure compatibility, correct styles, and consistent formatting results.

Does this approach to document editing work with XML manipulation libraries?

Document editing via XML manipulation works with dependencies like lxml and defusedxml to programmatically parse, validate, and modify internal structures for reliable .docx generation.

How do you validate document structure when generating Word files?

Validate Word document structure during generation by ensuring correct section structures, styles, and relationship integrity within the XML to meet compatibility requirements.