docx

Create, edit, and validate .docx documents with OpenXML formatting.

2|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/augustscl/awesome-xiawang-skills --skill docx-augustscl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/augustscl/awesome-xiawang-skills/tree/main/docx
Command: npx skills add https://github.com/augustscl/awesome-xiawang-skills --skill docx-augustscl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, matplotlib, numpy, lxml, defusedxml, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Enables reliable, production-grade creation, editing, and verification of Microsoft Word (.docx) documents so you can deliver studio-quality proposals, reports, contracts, and redlines without corrupting formatting or losing revision history.

Core Features & Use Cases

  • Preserve and manipulate OpenXML formatting by unzipping and editing document XML to keep styles, headers/footers, TOC, comments, and track changes intact.
  • Create new documents with the OpenXML SDK (C#) including covers, native charts, backgrounds and accessible templates; edit existing documents with Python tooling supporting precise tracked changes, threaded comments, and validation.
  • Validate and auto-fix common OpenXML issues (element order, table grid consistency, image aspect ratio), run pandoc verification, and optionally run a platform-specific OpenXML validator for final compliance.

Quick Start

Ask the skill to generate or edit a .docx: describe the document purpose, language, page count, and whether to use tracked changes or comments.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I programmatically edit a .docx file and keep track changes intact?

To programmatically edit a .docx file while keeping track changes intact, the skill unzips the document and directly manipulates the OpenXML structure to preserve tracked changes, threaded comments, headers, and footers without corrupting the original formatting.

What is the best way to generate professional Word documents with native charts and TOC?

The best way to generate professional Word documents with native charts and TOC is using this skill's OpenXML SDK approach, which creates covers, backgrounds, and accessible templates while enforcing strict element ordering for compliance.

Does this approach support validating OpenXML element ordering and table grid consistency?

Yes, this approach supports validating OpenXML by automatically checking and fixing element ordering, table grid consistency, and image aspect ratios, plus running pandoc-based content verification for final compliance.

How do I add threaded comments to an existing Word document without breaking the formatting?

To add threaded comments to an existing Word document without breaking formatting, the skill edits the document XML directly and synchronizes comment files to ensure the OpenXML structure remains valid and styles are preserved.

Can I use Python to automate contract redlining and track changes in .docx files?

Yes, you can use Python to automate contract redlining in .docx files, as the skill provides Python tooling for precise tracked changes, threaded comments, and validation specifically designed for professional redlining workflows.

Why does my generated .docx file fail validation in Microsoft Word?

Your generated .docx file may fail validation due to incorrect OpenXML element ordering, table grid inconsistencies, or image aspect ratio issues, which this skill automatically detects and fixes using pandoc verification and optional dotnet validation.