docx

Create, edit, and analyze .docx files with tracked changes and comments.

Updated Jul 23, 2025
One-click install
npx skills add https://github.com/levanminhduc/LuongHoaThoNew --skill docx-levanminhduc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/levanminhduc/LuongHoaThoNew/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/levanminhduc/LuongHoaThoNew --skill docx-levanminhduc

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates complex Microsoft Word document editing, including legal redlining and collaborative feedback.

Core Features & Use Cases

  • Tracked Changes: Programmatically add insertions and deletions.
  • Comment Management: Add, reply to, and resolve comments in documents.

Quick Start

In the attached document 'contract_draft.docx', find the paragraph starting with "Section 3.1" and add a comment that says "Please verify this date with the legal team."

Frequently Asked Questions about docx

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

FAQPage Schema
How do I add tracked changes to a Word document programmatically?

Tracked changes in Word documents record insertions and deletions with author and timestamp metadata. This Skill enables programmatic addition of tracked changes by manipulating the underlying WordprocessingML structure, preserving RSIDs and author information so changes appear native in Microsoft Word.

Can I edit .docx files while preserving formatting and embedded media?

Yes. This Skill handles .docx editing by reading and writing OOXML-compliant WordprocessingML while maintaining all formatting, embedded media, whitespace, and document structure. Changes are written back to valid .docx format without data loss.

How do I add comments and replies to Word documents with code?

Comment management in Word requires coordinating comment ranges, comment references, and comment part XML. This Skill automates adding, replying to, and resolving comments programmatically, integrating them into the document's comment store and linking them to content.

What's the difference between redlining and tracked changes in Word automation?

Tracked changes are Word's native feature recording insertions, deletions, and formatting edits with author metadata. Redlining is the visual and legal practice of marking contract edits; this Skill implements tracked changes as the mechanism for automated redlining workflows.

Can I extract text and structure from .docx files without losing document metadata?

Yes. This Skill extracts text and structure from .docx files by parsing WordprocessingML while preserving document metadata, tracked changes, comments, and formatting information so downstream analysis retains full document context.

Do I need to understand XML to work with .docx documents programmatically?

This Skill provides abstraction over raw WordprocessingML, allowing document creation and editing without direct XML manipulation. Raw XML access is available for advanced use cases; basic tasks like adding tracked changes and comments work at a higher level.