docx

Generate, edit, and review .docx documents with tracked changes and comments.

3|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/M4n5ter/skills --skill docx-m4n5ter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/M4n5ter/skills/tree/main/docx
Command: npx skills add https://github.com/M4n5ter/skills --skill docx-m4n5ter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires defusedxml, lxml, and includes scripts (resource) components.

What problem does it solve?

docx enables automated creation, editing, and analysis of professional Word documents (.docx) while preserving formatting, tracked changes, and comments, reducing manual editing overhead.

Core Features & Use Cases

  • Create new Word documents with structured content (paragraphs, tables, and images) using code.
  • Edit existing documents programmatically, applying deterministic changes and retaining review metadata (RSID, authors, and timestamps).
  • Manage revisions and collaborate with comments by emitting tracked changes and comment blocks within the OOXML model.
  • Validate, pack, and convert documents into final .docx outputs as part of a repeatable workflow.

Quick Start

Create and customize a Word document from a template, apply tracked changes and comments, and export the final .docx.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automate Word document creation and editing while preserving formatting?

Automate Word document creation and editing by using the docx library and OOXML tooling to programmatically generate paragraphs, tables, and images while retaining original formatting, tracked changes, and comments throughout the workflow.

Can I programmatically insert comments and apply tracked changes to a .docx file?

Yes, you can programmatically insert comments and apply tracked changes to a .docx file by emitting OOXML revision blocks that preserve review metadata including RSID, author identities, and timestamps for collaborative editing.

Does this docx automation approach work with lxml for validating and packaging outputs?

Yes, docx automation leverages lxml and defusedxml dependencies to validate, pack, and convert documents into final .docx outputs, ensuring deterministic frontmatter-driven metadata is enforced across development pipelines.

What is the best way to script deterministic document edits without losing review metadata?

The best way to script deterministic document edits without losing review metadata is applying frontmatter-driven changes via script assets, which preserves revisions and comments within the OOXML model during automated workflows.

How do I validate and package final .docx outputs within a development pipeline?

Validate and package final .docx outputs within a development pipeline by applying deterministic frontmatter-driven metadata, using script assets for repeatable tasks, and enforcing OOXML validation rules before exporting the final documents.

Are there limitations when modifying existing Word documents through OOXML scripting?

Modifying existing Word documents through OOXML scripting requires maintaining strict XML structure integrity using lxml, as incorrect manipulation of revision blocks or comment structures can corrupt the final .docx packaging and formatting.