docx

Generate, edit and analyze Word .docx/.dotx files via XML-based operations.

4|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/mymx2/foreman --skill docx-mymx2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/mymx2/foreman/tree/main/.qoder/skills.collected/skills/docx
Command: npx skills add https://github.com/mymx2/foreman --skill docx-mymx2

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill solves the complexity of programmatically generating, editing, and analyzing Word documents, which are inherently complex ZIP archives of XML files.

Core Features & Use Cases

  • Document Generation: Create professional reports, memos, and templates using the docx-js library with precise control over formatting, tables, and images.
  • Advanced Editing: Perform surgical edits on existing documents by manipulating the underlying XML structure, including merging fragmented text runs and managing tracked changes.
  • Collaboration Tools: Automate the insertion of comments and replies into documents, facilitating programmatic review workflows.

Quick Start

Use the docx skill to create a new report named project_summary.docx with a table of contents and a custom letterhead.

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 custom formatting and tables?

Programmatic Word document generation is achieved by constructing .docx files through XML-based operations using the docx-js library, enabling precise control over formatting, tables, images, and templates. It supports creating professional reports and memos with custom letterheads.

Can I add tracked changes and comments to an existing .docx file for automated redlining?

Yes, automated redlining is supported by manipulating the underlying XML structure of existing .docx files to insert tracked changes, manage comments, and facilitate programmatic review workflows without opening Word.

What dependencies are required to manipulate Word document XML structures?

Manipulating Word document XML requires dependencies including docx, pandoc, libreoffice, pdftoppm, defusedxml, and lxml to parse, generate, and validate the complex ZIP archives of XML files that comprise .docx and .dotx files.

Why does my Word document automation break when editing fragmented text runs in the XML?

Fragmented text runs in Word document XML cause automation breaks because .docx files store text in split XML nodes. The skill performs surgical edits by merging these fragmented runs to ensure structural integrity during programmatic editing.

Does this approach work with .dotx template files or only standard .docx documents?

This XML-based manipulation approach works with both standard .docx documents and .dotx template files, allowing programmatic generation, editing, and structural validation across both Word file formats.

What is the best way to extract content from a Word document for programmatic analysis?

The best way to extract content for programmatic analysis is parsing the underlying XML structure of the .docx ZIP archive directly, which allows surgical extraction of text, tables, and document structure while validating formatting integrity.