docx

Create and edit .docx files with XML handling and validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill removes the friction of working directly with Word documents by helping you create, read, edit, validate, and package .docx files reliably and consistently.

Core Features & Use Cases

  • Document Creation: Generate polished Word documents with headings, tables, images, headers, footers, page numbers, and proper page sizing.
  • Document Editing: Unpack existing .docx files, update the underlying XML, manage tracked changes, comments, and redlines, then repack the file safely.
  • Document Analysis: Extract content, inspect structure, validate relationships, and check schema compliance to catch corruption before delivery.
  • Use Case: A legal, operations, or consulting workflow can turn a draft into a formatted report, preserve revisions, and return a clean Word file ready to share.

Quick Start

Use the docx skill to create or revise the attached Word document and return a polished .docx file with the requested formatting and change tracking.

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 without manual XML handling?

You can edit a Word document by unpacking the .docx file, updating the underlying XML, managing tracked changes and redlines, then repacking the file safely to preserve revisions without manual XML handling.

How do I generate a Word document with headings, tables, and page numbers programmatically?

You generate a Word document with headings, tables, headers, footers, and page numbers by using the Skill's document creation workflow, which structures the XML and packages a formatted .docx file automatically.

How do I validate a .docx file for schema compliance and relationship corruption?

You validate a .docx file by unpacking the document, inspecting its structure, validating relationships, and checking schema compliance to catch corruption before delivery.

Can I use lxml and defusedxml to parse and modify Word document XML safely?

Yes, the Skill relies on defusedxml and lxml to parse and modify Word document XML safely, applying schema validation and whitespace preservation while managing tracked changes and comments.

What is the best way to extract content and comments from an existing .docx file?

The best way to extract content and comments from a .docx file is to unpack the document, parse the XML, and retrieve the text, structure, and comment annotations for analysis or conversion.

How do I clean up redlines and comments from a Word document before delivery?

To clean up redlines and comments from a Word document, the Skill unpacks the .docx file, removes tracked changes and comment annotations from the XML, and repacks a clean file ready to share.