docx

Automate Word document creation, editing, redlining, commenting, and packaging in DOCX format.

2.9k|257|Updated Apr 7, 2025
One-click install
npx skills add https://github.com/invariantlabs-ai/mcp-scan --skill docx-invariantlabs-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/invariantlabs-ai/mcp-scan/tree/main/tests/skills/docx
Command: npx skills add https://github.com/invariantlabs-ai/mcp-scan --skill docx-invariantlabs-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word document creation, editing, and review tasks often involve complex OOXML handling, requiring careful tracking of changes, comments, and formatting. This Skill streamlines those workflows by providing a self-contained suite of tools to automate Word document operations.

Core Features & Use Cases

  • Automated Word document creation, editing, redlining, commenting, and final packaging into DOCX files.
  • Maintains tracked changes with author/date metadata and ensures comments reference the right ranges for collaborative reviews.
  • Use cases include contract drafting, policy updates, and multi-user review cycles where preserving formatting and change history is critical.

Quick Start

Create a redlined draft of a sample document, add a comment, and package into a 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 redlining with tracked changes?

Automate Word document creation and redlining by using a suite of scripts that applies tracked changes with author and date metadata, inserts comments with correct range references, and packages the result into a DOCX file.

Can I preserve comments and tracked changes when editing OOXML for contract drafting?

Yes, you can preserve comments and tracked changes when editing OOXML for contract drafting. The process maintains author and date metadata for tracked changes and ensures comments reference the correct ranges during collaborative reviews.

What's the best way to package edited Word documents into DOCX format while keeping formatting?

The best way to package edited Word documents into DOCX format while keeping formatting is to use document manipulation and validation scripts that ensure formatting and change history are preserved during the final packaging step.

Do I need Python libraries like lxml and defusedxml to automate DOCX workflows?

Yes, you need the Python libraries lxml and defusedxml to automate DOCX workflows. These dependencies handle the complex OOXML parsing and secure XML processing required for document manipulation, validation, and packaging.

Does this approach support multi-user review cycles for policy updates?

Yes, this approach supports multi-user review cycles for policy updates. It is designed for collaborative reviews where preserving formatting, tracked changes, and comment history across multiple authors is critical.

Why does editing OOXML directly require careful tracking of changes and formatting?

Editing OOXML directly requires careful tracking of changes and formatting because the underlying XML structure must maintain strict metadata for tracked changes and precise range references for comments to ensure document validity during collaborative reviews.