docx

Create, edit, validate, and comment on DOCX and DOTX documents via Open XML.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires defusedxml, lxml, docx, pandoc, libreoffice, poppler, and includes scripts (resource) components.

What problem does it solve?

This Skill removes the friction of creating, editing, validating, and reviewing Word documents and templates, especially when precision formatting or Open XML structure matters.

Core Features & Use Cases

  • Create polished DOCX files: Generate professional documents with tables, headings, lists, page settings, and images.
  • Edit existing Word files safely: Unzip, modify XML, merge fragmented runs, and preserve tracked changes and comments correctly.
  • Validate and repair documents: Check XML well-formedness, relationship integrity, schema compliance, unique IDs, and whitespace preservation.
  • Comment and redline workflows: Add comments, replies, and tracked changes support for collaborative document review.
  • Use case: Turn a draft report or contract into a clean, validated Word document with comments, redlines, and consistent formatting.

Quick Start

Ask the skill to create, edit, validate, or comment on a DOCX file and provide the source document plus the exact formatting or revision outcome you want.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I edit a Word document and preserve tracked changes and comments?

To edit a Word document while preserving tracked changes and comments, you can manipulate the Open XML package structure to modify content, merge fragmented runs, and ensure schema correctness. This approach safely maintains all existing revisions and formatting.

How do I validate a DOCX file for XML well-formedness and schema compliance?

You validate a DOCX file by checking its Open XML package structure for XML well-formedness, relationship integrity, schema compliance, unique IDs, and whitespace preservation. This process identifies and helps repair document corruption issues.

What is the best way to programmatically add comments and replies to a DOCX file?

The best way to add comments and replies to a DOCX file is by directly manipulating the Open XML package structure. This allows precise insertion of comment threads and tracked changes for collaborative redline workflows.

Do I need LibreOffice and pandoc to generate and format Word documents?

Yes, generating and formatting Word documents requires LibreOffice and pandoc, along with lxml, defusedxml, and poppler. These dependencies are necessary to preserve formatting and maintain Open XML schema correctness.

Why does my Word document have formatting issues after modifying the XML?

Formatting issues occur when modifying XML because of fragmented runs or broken relationship integrity. You can fix this by validating the document structure, checking unique IDs, and merging runs to restore schema correctness.

Can I create a Word document with tables, headings, and images from scratch?

You can create a DOCX file with tables, headings, lists, page settings, and images by generating the necessary Open XML package structure. This produces a professional, fully formatted Word document without manual formatting.