docx

Generate, edit, and validate Microsoft Word .docx documents via WordprocessingML.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandoc, libreoffice, poppler, docx-js, soffice, pdftoppm, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you generate, edit, and troubleshoot professional .docx (Word) documents without manually wrestling with formatting, Word XML structure, or fragile conversions.

Core Features & Use Cases

  • Create polished .docx files using docx-js with production-ready layout guidance (page size, headings, TOC compatibility).
  • Edit existing .docx files safely by unpacking to Word XML, making targeted XML changes (including tracked changes and comments), then repacking with validation/repair.
  • Convert and analyze documents by extracting content (pandoc / raw XML) and converting .docx to PDF/images for preview or downstream use.
  • Use-case example: Turn a messy Word draft into a clean, publication-ready memo with a proper heading hierarchy, tables with correct widths, page numbers in footers, and accepted tracked changes.

Quick Start

Use the docx skill to produce a clean DOCX memo with a table of contents and page numbers from the attached outline document.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I edit an existing Word document programmatically without breaking its formatting?

To edit a Word document safely, this Skill unpacks the .docx Office ZIP structure and manipulates the underlying WordprocessingML XML directly. It ensures schema and relationship integrity are maintained while applying targeted changes like table formatting or image insertion, then repacks the file with validation.

Can I accept tracked changes and extract comments from a .docx file automatically?

Yes, you can process tracked changes and comments within a .docx file by unpacking its XML structure. The Skill handles tracked changes acceptance and comment insertion or extraction workflows by updating the WordprocessingML safely and preserving valid IDs and xml:space constraints during the unpack and pack cycle.

What is the best way to generate a Word document with tables, images, and a table of contents?

Generating a polished Word document with tables, images, and a TOC is handled through docx-js with production-ready layout guidance. The Skill applies correct table widths, heading hierarchies, and page numbers in footers while ensuring the output validates against Word-specific correctness constraints.

Do I need LibreOffice or pandoc installed to convert and analyze .docx files?

Yes, converting and analyzing .docx files requires dependencies like pandoc for content extraction and LibreOffice for converting documents to PDF or images. These tools allow the Skill to extract raw XML content and generate previews or outputs for downstream use.

Why does my Word document break after direct XML edits to the DOCX structure?

Direct XML edits often break Word documents because they violate schema integrity, relationship IDs, or xml:space preservation rules. This Skill avoids corruption by interpreting and updating DOCX XML safely through controlled unpack and pack steps with built-in validation and repair.

Does the docx Skill support converting Word documents to PDF for previewing?

Yes, converting Word documents to PDF or images for previewing is supported using LibreOffice and poppler utilities. The Skill leverages these dependencies to transform .docx files into accessible formats for visual verification or downstream processing.