docx

Create, edit, and analyze .docx documents with tracked changes and raw XML access.

77|9|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/henkisdabro/claudecode-marketplace --skill docx-henkisdabro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/henkisdabro/claudecode-marketplace/tree/main/skills/docx
Command: npx skills add https://github.com/henkisdabro/claudecode-marketplace --skill docx-henkisdabro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires defusedxml, docx, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Manually creating, editing, and redlining complex Microsoft Word documents is a time-consuming and error-prone process, especially for legal, academic, or business contexts. This skill automates comprehensive DOCX operations, including tracked changes and formatting preservation.

Core Features & Use Cases

  • Redlining Workflow: Systematically apply tracked changes (insertions, deletions) to documents, ideal for legal review.
  • Document Creation: Generate new Word documents from scratch using JavaScript/TypeScript with professional formatting.
  • Content Analysis: Extract text or access raw XML for detailed analysis of comments, formatting, and structure.
  • Use Case: A legal professional needs to redline a contract by changing "30 days" to "60 days" and adding a comment. This skill can unpack the document, apply the precise tracked changes, add the comment, and repack it, ensuring all changes are properly recorded for review.

Quick Start

Using the docx skill, unpack the attached document 'contract.docx' into a directory named 'contract_unpacked'.

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 and redlining can be automated by unpacking the DOCX file, applying insertions and deletions with rsid and author metadata, then repacking the document. This preserves all change semantics for legal review workflows.

Can I create and edit Word documents programmatically with Python or JavaScript?

Yes. The docx library enables you to create new DOCX files from scratch, modify existing content, manage formatting, add comments, and access raw WordprocessingML XML for detailed structural manipulation in both Python and JavaScript environments.

What's the best way to extract text and analyze document structure from DOCX files?

Unpack the DOCX package to access raw XML, then parse comments, formatting metadata, and structural elements. This approach lets you perform detailed content analysis and validation while preserving OOXML integrity.

How do I add comments and tracked changes to a contract during legal review?

Unpack the DOCX, apply tracked changes with author metadata, insert comments at specific locations, then repack the document. All changes remain visible and properly attributed for collaborative legal workflows.

Does this work with Office Open XML package validation and manipulation?

Yes. The skill provides tooling to pack and unpack DOCX files, validate WordprocessingML structure, and access or modify raw XML, enabling advanced OOXML operations beyond standard document editing.

What formatting and metadata does the skill preserve when editing documents?

The skill preserves OOXML structure, formatting, comments, tracked-change semantics, and all metadata including rsid and author attributes, ensuring documents remain valid and review-ready after programmatic modifications.