docx

Unpack, edit, validate, and repack DOCX files with XML-level repairs.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/GenEducation/GenedUIProject --skill docx-geneducation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/GenEducation/GenedUIProject/tree/main/.gemini/skills/docx
Command: npx skills add https://github.com/GenEducation/GenedUIProject --skill docx-geneducation

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill removes the friction of working with Word documents by handling reading, editing, conversion, validation, and cleanup in a reliable, repeatable way. It is especially useful when you need to preserve formatting, track changes, comments, images, and document structure without manually wrestling with Office XML.

Core Features & Use Cases

  • Document creation and editing: Build professional Word documents with headings, tables, images, page numbers, and layout control.
  • Reading and extraction: Convert document content into readable text or inspect the underlying XML when you need precise access to structure.
  • Tracked changes and comments: Add, accept, reject, and validate redlines and comments for collaborative editing workflows.
  • Repair and validation: Catch common document integrity issues, preserve whitespace, and verify relationship IDs and content types.
  • Use Case: A legal, business, or research team can use this Skill to turn a rough draft or annotated document into a clean, formatted, shareable Word file.

Quick Start

Use the docx skill to edit the attached Word document, preserve its formatting, and return a clean, validated version.

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 and preserve tracked changes, the Skill unpacks the DOCX file, manipulates the underlying XML to add or accept redlines, validates the structure, and repacks it while maintaining formatting and comment integrity.

What is the best way to extract text from a DOCX file without losing formatting?

Extracting text from a DOCX file without losing formatting involves unpacking the document and inspecting the underlying XML. This Skill uses pandoc and LibreOffice to accurately read content while preserving layout control and document relationships.

Can I validate and repair corrupted Word documents using XML?

Yes, you can validate and repair corrupted Word documents using XML. This Skill catches document integrity issues, verifies content types, preserves whitespace, and performs XML-level repairs to fix common structural problems in DOCX files.

Does this DOCX editing approach require LibreOffice and pandoc to work?

Yes, this DOCX editing approach requires LibreOffice and pandoc, along with defusedxml and lxml. These dependencies provide OpenXML-aware processing, format conversion, and secure XML parsing to ensure document relationships and formatting remain intact.

How do I create a Word document with headings, tables, and images programmatically?

You create a Word document with headings, tables, and images programmatically by utilizing the document creation features. It builds professional DOCX files by assembling the XML structure with layout control, page numbers, and image insertion capabilities.

Why does my Word document break after editing the XML directly?

Your Word document breaks after editing the XML directly because DOCX files rely on strict relationship IDs and content types. This Skill validates the OpenXML structure to prevent corruption, ensuring whitespace and document formatting integrity are maintained during repacking.