docx

Create, edit, and extract text from .docx documents with tracked changes.

6|2|Updated Oct 2, 2025
One-click install
npx skills add https://github.com/lizTheDeveloper/ai_game_theory_simulation --skill docx-lizthedeveloper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/lizTheDeveloper/ai_game_theory_simulation/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/lizTheDeveloper/ai_game_theory_simulation --skill docx-lizthedeveloper

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandoc, docx, libreoffice, poppler-utils, defusedxml, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complex, error-prone process of editing Microsoft Word documents, especially for legal redlining, academic revisions, and business reports, saving significant time and ensuring accuracy and compliance.

Core Features & Use Cases

  • Tracked Changes (Redlining): Programmatically add insertions, deletions, and comments, mimicking human review with precise XML-level control.
  • Content Generation & Editing: Create new documents or modify existing ones while preserving complex formatting, styles, and document structure.
  • XML-level Control: Access and manipulate the underlying Office Open XML (OOXML) for fine-grained control over document elements, metadata, and tracked change properties.
  • Use Case: Automate the review of a contract by applying a series of pre-defined legal amendments as tracked changes, then adding specific comments for clauses requiring further human attention, ensuring all changes are properly attributed.

Quick Start

In the attached document 'master_service_agreement.docx', find the phrase "30 days" in Section 4.2. Change it to "90 days" and mark this as a tracked change. Add a comment to this change: "Updated per client's revised payment terms on 2024-01-15."

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automate tracked changes and redlining in Word documents?

Tracked changes automate the redlining process by programmatically inserting, deleting, and commenting within .docx files with XML-level precision. This Skill applies pre-defined amendments as tracked changes and attributes them properly, mimicking human review workflows for legal contracts, academic revisions, and business reports.

Can I extract text from .docx files while preserving tracked changes and comments?

Yes. This Skill extracts text via pandoc while retaining tracked changes metadata, and accesses raw OOXML to retrieve comments and revision history. This preserves the full edit context needed for legal document review and compliance workflows.

How do I create and edit .docx documents while maintaining formatting and structure?

Create new .docx files with docx-js and edit existing ones using Python's Document library, both preserving complex formatting, styles, and structure. Unpack/pack workflows provide full round-tripping, enabling content modification without losing document integrity.

What's the best way to manipulate Office Open XML (OOXML) for fine-grained document control?

Access the underlying OOXML structure directly to control document elements, metadata, and tracked change properties at the XML level. This enables precise modifications—like updating clause dates and attributing changes—impossible through standard document APIs.

Can I automate legal document workflows with contract amendment tracking?

Yes. Apply a series of pre-defined legal amendments as tracked changes with attributed comments and timestamps. This automates contract review, ensures compliance, and flags clauses requiring human attention without manual redlining.

Do I need external tools to work with .docx files in automation workflows?

This Skill integrates pandoc for text extraction, LibreOffice for document processing, poppler-utils for content analysis, and defusedxml for secure parsing. These dependencies enable complete .docx manipulation without manual document handling.