docx

Create, edit, and analyze .docx files via Python scripts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automate end-to-end Word document workflows, including creation, reading, editing, and formatting of .docx files, reducing manual overhead.

Core Features & Use Cases

  • Build new documents from structured inputs using the docx tooling described.
  • Edit existing Word documents by unpacking, modifying word/document.xml, and repacking.
  • Manage rich formatting: tables, images, headers/footers, TOC, lists, footnotes, comments, and tracked changes.
  • Validate and repair DOCX content to ensure Office compatibility and clean output.
  • Integrate with LibreOffice for advanced conversions (DOCX to PDF) via helper scripts.

Quick Start

Create a sample Word document from your content using the pack tool to generate a DOCX with 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 creation and editing from structured inputs?

Automate Word document creation and editing by unpacking the .docx file, modifying the word/document.xml structure, and repacking it. This process supports deterministic document assembly and complex formatting for reports and templates.

Can I add tables, headers, footers, and tracked changes to a .docx file programmatically?

Yes, you can add tables, headers, footers, and tracked changes to a .docx file programmatically. The tooling manages rich formatting and XML-driven edits to ensure Office compatibility and clean output for complex documents.

Does this approach support validating and repairing DOCX content for Office compatibility?

Yes, validating and repairing DOCX content for Office compatibility is supported. The workflow checks the generated and modified files to ensure clean output and structural integrity across generation and modification processes.

What is the best way to convert a generated DOCX to PDF?

The best way to convert a generated DOCX to PDF is by integrating with LibreOffice. Advanced conversions are handled via helper scripts to transform the Word documents into the desired PDF format.

Do I need lxml and defusedxml to process Word documents?

Yes, you need lxml and defusedxml to process Word documents. These dependencies handle the XML parsing and modifications required for unpacking, editing, and repacking the internal document structure.