docx

Create, read, edit, and manipulate .docx files using docx-js and pandoc.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/Yezez9/Research-Agent --skill docx-yezez9
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Yezez9/Research-Agent/tree/main/scientific-skills/docx
Command: npx skills add https://github.com/Yezez9/Research-Agent --skill docx-yezez9

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx, pandoc, libreoffice, poppler-utils, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation, editing, and manipulation of Microsoft Word documents (.docx files), eliminating the need for manual formatting and complex scripting.

Core Features & Use Cases

  • Document Generation: Create professional Word documents from scratch using JavaScript libraries, including complex formatting like tables of contents, headers, footers, and custom styles.
  • Document Editing: Modify existing .docx files by unpacking, editing XML, and repacking, including handling tracked changes and comments.
  • Content Conversion: Convert documents between formats (e.g., .doc to .docx) and extract content into other formats (e.g., Markdown).
  • Use Case: Generate a quarterly report with specific branding, including a table of contents, page numbers, and embedded images, all programmatically.

Quick Start

Use the docx skill to create a new Word document with the title 'My Report' and a heading 'Introduction'.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I programmatically generate a Word document with complex formatting like tables of contents and images?

You can programmatically generate Word documents with complex formatting by using the docx-js library to create tables of contents, headers, footers, and embedded images from scratch. This approach eliminates manual formatting and complex scripting.

How do I edit an existing .docx file and handle tracked changes programmatically?

To edit an existing .docx file and handle tracked changes, you can unpack the document, directly manipulate its underlying XML structure, and repack it. This process includes robust validation and auto-repair capabilities to ensure schema compliance.

Can I convert older .doc files to .docx or extract document content into Markdown?

Yes, you can convert documents between formats such as older .doc files to .docx using command-line tools like pandoc and LibreOffice. These tools also enable extracting document content into other formats like Markdown.

Does this document generation approach support multi-column layouts and hyperlinks?

Yes, this document generation approach supports complex document structures including multi-column layouts, hyperlinks, lists, tables, and footnotes. It leverages JavaScript libraries to apply these custom styles programmatically.

What is the best way to automate quarterly report generation with specific branding and page numbers?

The best way to automate quarterly report generation with specific branding and page numbers is using JavaScript libraries to programmatically build the document. This enables automated creation of branded reports with custom styles, tables of contents, and embedded images.

Do I need pandoc and LibreOffice installed to manipulate Word documents effectively?

You need pandoc and LibreOffice installed to handle content conversion between formats and to extract text into Markdown. These dependencies complement the core docx-js library used for creating and editing document structures.