docx

Unpack, edit, and repack Word .docx XML documents.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Estom/aiflex --skill docx-estom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Estom/aiflex/tree/main/skills-repo/arthropic-skills/docx
Command: npx skills add https://github.com/Estom/aiflex --skill docx-estom

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Many document workflows require creating, inspecting, and precisely editing Word (.docx) files while preserving formatting, tracked changes, comments, images, tables, and schema validity. This Skill removes the manual, error-prone steps of unpacking DOCX XML, editing content, handling tracked changes and comments, and repacking or validating the file so the output is stable and professional.

Core Features & Use Cases

  • Read & Analyze: Unpack .docx archives to inspect raw XML, extract text (including tracked-changes-aware extraction), and access media files.
  • Create & Generate: Guidance and sample patterns for producing new .docx files (docx-js usage and page-size/style rules) that render consistently across Word, LibreOffice, and Google Docs.
  • Edit & Redline: Edit document XML safely, add or accept tracked changes, insert comments, manage runs, and preserve formatting and smart quotes.
  • Convert & Validate: Helpers to convert legacy .doc to .docx, accept tracked changes via LibreOffice macros, pack/unpack workflows, and run XSD/schema validation with auto-repair for common issues.
  • Use Case: Turn a markdown or draft into a US Letter report with proper headings, TOC, images, numbered pages, and correct table widths; or programmatically merge editorial tracked changes while keeping DOCX schema valid.

Quick Start

Use the docx skill to convert my draft into a polished US Letter .docx with a title page, headings, table of contents, two images, and page numbers.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I convert a markdown draft into a formatted Word document with a table of contents and page numbers?

You can convert markdown or drafts into a Word document by using the docx-js generation patterns to produce a .docx file with proper headings, a table of contents, images, and numbered pages.

Can I edit Word documents and manage tracked changes without breaking the DOCX schema?

You can edit document XML to add or accept tracked changes and insert comments, then run XSD schema validation with auto-repair to ensure the repacked DOCX remains valid.

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

Converting legacy .doc to .docx is handled by LibreOffice conversion helpers, which transform older Word files into the modern .docx format for subsequent XML unpacking and editing.

Does this approach require Python XML processing modules to validate Word documents?

Yes, DOCX schema validation requires Python modules such as defusedxml and lxml to process the unpacked XML structure and perform XSD validation with auto-repair for common issues.

Why do my generated Word documents look different when opened in LibreOffice or Google Docs?

Inconsistent rendering across Word, LibreOffice, and Google Docs occurs when page-size and style rules are misconfigured; this Skill leverages docx-js guidance to ensure documents render consistently across platforms.