docx

Create, edit, and analyze Word .docx files via OOXML.

1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/Herxinsasa/Skills-Collector --skill docx-herxinsasa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Herxinsasa/Skills-Collector/tree/main/anthropics-skills/skills/docx
Command: npx skills add https://github.com/Herxinsasa/Skills-Collector --skill docx-herxinsasa

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Creating and editing professional Word documents programmatically is notoriously difficult due to the complex XML-based OOXML format. This skill eliminates the need to manually craft XML or wrestle with formatting inconsistencies, enabling reliable document generation, editing, and analysis through high-level instructions.

Core Features & Use Cases

  • Document Generation: Create new .docx files with proper formatting, styles, tables, images, headers, footers, and table of contents using the docx JavaScript library.
  • Document Editing: Modify existing documents by unpacking the OOXML package, making precise edits to the XML, and repacking with validation.
  • Tracked Changes & Comments: Accept tracked changes, add comments, and work with revision marks for collaborative workflows.
  • Format Conversion: Convert between .doc and .docx, extract text with pandoc, or render documents to PDF and images.
  • Use Case: A product manager needs to generate 50 customized quarterly reports from a template, updating names, dates, and data tables while preserving corporate branding and formatting.

Quick Start

Use the docx skill to generate a new Word document named quarterly_report.docx with a title heading, a summary paragraph, and a formatted table containing sales data.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I generate Word documents programmatically without writing XML?

You can generate Word documents programmatically by using high-level APIs that manage the underlying OOXML structure. This approach abstracts away manual XML crafting, enabling reliable creation of .docx files with styles, tables, images, and headers.

Can I accept tracked changes in a .docx file through an automated script?

Yes, you can accept tracked changes in a .docx file through an automated script. The workflow uses LibreOffice to process revision marks, enabling collaborative workflow integration and programmatic acceptance of document edits.

What is the best way to update a Word template with new data tables while preserving formatting?

The best way to update a Word template while preserving formatting is by unpacking the OOXML package, making precise XML edits, and repacking with schema validation. This maintains corporate branding and document styles.

Does pandoc work with .docx files for text extraction?

Yes, pandoc works with .docx files for text extraction. It is explicitly used within the workflow to pull text content from existing Word documents, complementing the docx JavaScript library used for new document creation.

Why does editing an existing .docx file require unpacking the OOXML package?

Editing an existing .docx file requires unpacking the OOXML package because Word documents are complex XML-based archives. Unpacking allows precise XML edits and schema validation before repacking, ensuring formatting consistency.

Do I need LibreOffice to convert a Word document to PDF?

Yes, you need LibreOffice to convert a Word document to PDF in this workflow. It handles rendering .docx files to PDF and images, while also managing tracked change acceptance for collaborative document processes.