docx

Create, edit, and analyze Word documents with tracked changes, comments, and formatting control.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/tmtgroupbot/lptracker-deploy --skill docx-tmtgroupbot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/tmtgroupbot/lptracker-deploy/tree/main/skills/docx
Command: npx skills add https://github.com/tmtgroupbot/lptracker-deploy --skill docx-tmtgroupbot

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with .docx files programmatically is complex because they are ZIP archives of XML files. This Skill provides complete workflows for creating professional Word documents, editing existing files with tracked changes, adding review comments, and extracting content without corrupting the document structure. ## Core Features & Use Cases - Document Creation: Generate studio-quality Word documents using docx-js with covers, tables of contents, headers, footers, charts, and professional color palettes. - Redlining & Tracked Changes: Edit legal, academic, or business documents with proper tracked changes using a Python OOXML Document library, with batching and validation. - Comments & Review: Add review comments via python-docx or low-level OOXML, with support for comment replies and author attribution. - Content Extraction & Analysis: Convert documents to Markdown with pandoc, or to PDF/images via LibreOffice and pdftoppm for visual inspection. - Use Case: A lawyer uploads a contract draft and asks for revisions. The Skill unpacks the document, implements tracked changes in batches, verifies them against the original, and returns a redlined .docx ready for review in Word. ## Quick Start Ask the assistant to create a new Word report with a cover page and table of contents, or to review and redline an uploaded .docx contract with tracked changes.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I create a Word document programmatically with JavaScript?

Use the docx-js library with Document, Paragraph, and TextRun components, then export with Packer.toBuffer(). The Skill recommends running it with bun and reading the docx-js.md reference for formatting rules before generating files.

How do I add tracked changes to a Word document in Python?

Unpack the .docx with the provided unpack script, then use the Document library from scripts/document.py to insert w:ins and w:del elements around changed text. Pack the directory back into a .docx and verify changes by converting to Markdown with pandoc.

python-docx vs OOXML for adding comments to Word documents?

python-docx is recommended for adding comments because it works directly on .docx files without unpacking and produces reliable results. The OOXML method offers lower-level XML control and suits workflows already handling unpacked documents or tracked changes simultaneously.

Can this handle legacy .doc files?

Legacy .doc files are not processed directly. Convert them first with libreoffice --convert-to docx, then apply the standard creation, editing, or extraction workflows on the resulting .docx file.

Why does my generated table of contents appear empty in Word?

Word TOC fields are not populated until updated. Run the add_toc_placeholders.py script after generation to insert placeholder entries, and instruct users to right-click the TOC and select Update Field to refresh page numbers.