docx

Create and edit Word .docx files via JavaScript and XML manipulation.

730|133|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/microclaw/microclaw --skill docx-microclaw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/microclaw/microclaw/tree/main/microclaw.data/skills/docx
Command: npx skills add https://github.com/microclaw/microclaw --skill docx-microclaw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx, pandoc, soffice.py, unpack.py, pack.py, validate.py, accept_changes.py, comment.py, pdftoppm, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the creation, editing, and manipulation of Microsoft Word (.docx) documents, automating complex formatting and content management tasks.

Core Features & Use Cases

  • Document Generation: Create new .docx files from scratch using JavaScript, with support for complex formatting, tables, images, headers, and footers.
  • Content Editing: Modify existing .docx files by unpacking, editing XML, and repacking, including accepting tracked changes and adding comments.
  • Format Conversion: Convert between .doc and .docx formats, and extract content to other formats like Markdown or images.
  • Use Case: Generate a professional client report with custom branding, tables, and a table of contents, or automatically accept all tracked changes in a collaborative document.

Quick Start

Use the docx skill to create a new Word document with a title, a heading, and a paragraph of text.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I programmatically generate Word documents with complex formatting?

To accept tracked changes in .docx files, this Skill unpacks the document to modify its underlying XML structure and repacks it, providing automated collaborative document finalization without manual review of each edit.

Can I convert .doc files to .docx format or extract content to Markdown?

Yes, you can convert .doc to .docx format and extract content to Markdown. This Skill leverages pandoc and soffice.py scripts to handle document format conversion and content extraction tasks.

What is the best way to edit existing Word documents by modifying their XML structure?

The best way to edit existing Word documents by modifying XML structure is through unpacking the .docx file, applying targeted XML manipulation via Python scripts, and repacking it, ensuring precise control over document content and formatting.

Does this approach support adding comments to Word documents programmatically?

Yes, this approach supports adding comments to Word documents programmatically. The Skill includes dedicated comment.py scripts to insert annotations directly into the document XML during the unpacking and repacking workflow.

How do I validate a .docx file after editing its underlying XML structure?

To validate a .docx file after editing its XML structure, the Skill utilizes a validate.py script to check the integrity of the repacked document, ensuring the modified Word document opens correctly without corruption.