docx

Create, edit, and validate .docx files while preserving formatting and tracked changes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill removes the friction of creating, reading, editing, and validating Microsoft Word documents, especially when formatting, tracked changes, or document structure must be preserved accurately.

Core Features & Use Cases

  • Document creation: Build professional .docx files with headings, tables, images, headers, footers, page numbers, and tables of contents.
  • Document editing: Update existing Word files by unpacking, modifying XML safely, and repacking without breaking structure.
  • Text extraction and analysis: Read document content, convert legacy .doc files, and inspect tracked changes or raw XML when needed.
  • Validation and repair: Check Office Open XML integrity, fix common whitespace and ID issues, and ensure generated files remain compatible.
  • Use case: A legal or business user can turn an outline into a polished Word brief, then revise it later with tracked changes and preserve the final formatting.

Quick Start

Use the docx skill to create or edit a professional Word document from my outline and preserve headings, tables, and page numbering.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I create Word documents with tracked changes and preserved formatting?

To create Word documents with tracked changes, this Skill unpacks and modifies Office Open XML safely, preserving formatting, tables, headers, and footers while scripting the packaging to generate compatible .docx files.

How do I edit existing .docx files without breaking the document structure?

Editing existing .docx files requires unpacking the package, modifying the underlying XML safely, and repacking it. This Skill performs schema-aware validation to ensure the document structure remains intact and compatible.

What is the best way to convert legacy .doc files and extract text from Word documents?

Converting legacy .doc files and extracting text is handled through LibreOffice and pandoc dependencies. This Skill reads document content, converts formats, and inspects raw XML to extract text accurately.

Why does my generated Word document have XML validation errors or broken formatting?

XML validation errors and broken formatting in Word documents often stem from whitespace or ID issues. This Skill validates Office Open XML integrity, fixes common structural problems, and repairs the file packaging.

Can I use LibreOffice and pandoc with this Skill for document conversion?

Yes, you can use LibreOffice and pandoc with this Skill for document conversion. These dependencies support converting legacy .doc files, extracting text content, and transforming outlines into polished Word briefs.

Do I need GCC and lxml installed to validate and repair Office Open XML files?

Yes, GCC and lxml are required dependencies to validate and repair Office Open XML files. They provide the necessary parsing and schema-aware validation environment to fix whitespace and ID issues in .docx workflows.