docx

Generate and edit .docx files using JavaScript and Python XML scripts.

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

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 streamlines the creation, editing, and manipulation of Word documents (.docx files), handling complex formatting and content management tasks efficiently.

Core Features & Use Cases

  • Document Generation: Create new .docx files from scratch using JavaScript with precise control over layout, styles, tables, images, and more.
  • Document Editing: Modify existing .docx files by unpacking, editing XML, and repacking, including managing tracked changes and comments.
  • Use Case: Generate a professional business letter with a custom header, footer, specific fonts, and a table of contents, all programmatically.

Quick Start

Use the docx skill to create a new document with a title "Project Proposal".

Frequently Asked Questions about docx

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

FAQPage Schema
How do I generate a Word document with advanced formatting like tables and headers?

To generate Word documents with advanced formatting, use the JavaScript docx library to programmatically create .docx files containing tables, lists, images, headers, footers, and tables of contents.

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

To edit an existing .docx file and manage tracked changes, the Skill unpacks the document XML, modifies the content directly, and repacks it, using specific XML entities to handle author attribution and comments.

Do I need Node.js and Python to create and manipulate Word documents?

Yes, you need Node.js to run the docx JavaScript library for document generation, and Python to execute the XML processing scripts required for manipulating existing .docx files.

What is the best way to modify the XML inside a Word document without breaking it?

The best way to modify XML inside a Word document is by unpacking the .docx file, editing the raw XML content with Python scripts to manage smart quotes and entities, and then repacking it into a valid document.

Can I programmatically add a table of contents to a Word document?

Yes, you can programmatically add a table of contents to a Word document during generation by utilizing the docx JavaScript library's advanced layout capabilities to structure your content hierarchy.