docx

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

9|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/AbdullahMalik17/Hacathan_5 --skill docx-abdullahmalik17
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/AbdullahMalik17/Hacathan_5/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/AbdullahMalik17/Hacathan_5 --skill docx-abdullahmalik17

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with .docx files programmatically is difficult because they are ZIP archives of XML files, making tasks like editing content, adding tracked changes, or inserting comments error-prone without the right workflows and tooling. ## Core Features & Use Cases - Document Creation: Generate new Word documents from scratch using the docx-js JavaScript library with proper styles, tables, lists, images, and headers. - Editing & Redlining: Modify existing documents with tracked changes using a Python Document library that handles OOXML infrastructure, RSIDs, and validation automatically. - Content Analysis: Extract text via pandoc, access raw XML for comments and metadata, and convert documents to images for visual review. - Use Case: Review a legal contract by converting it to markdown, planning batched tracked changes, implementing them with the Document library, and verifying the final redlined document. ## Quick Start Use the docx skill to add tracked changes replacing "30 days" with "60 days" in the attached contract.docx file.

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 with JavaScript?▼

Use the docx npm library to build documents with Document, Paragraph, and TextRun components, then export with Packer.toBuffer(). Define custom styles, tables, lists, and images through the library's declarative API.

How do I add tracked changes to a docx file in Python?▼

Unpack the document with the pack/unpack scripts, then use the Document library's replace_node, suggest_deletion, revert_insertion, and revert_deletion methods. The library automatically injects RSIDs, author attributes, and validates the result on save.

How do I extract text from a Word document?▼

Convert the document to markdown using pandoc with the --track-changes=all flag to preserve insertions and deletions. For comments, embedded media, or complex formatting, unpack the file and read the raw XML in word/document.xml directly.

Can I add comments to an existing Word document programmatically?▼

Yes, the Document library's add_comment method anchors comments to start and end nodes, and reply_to_comment adds replies to existing comment threads. It automatically manages comments.xml, commentsExtended.xml, and people.xml infrastructure.

Why does my generated docx fail to open in Word?▼

Common causes include standalone PageBreak elements outside Paragraphs, missing ImageRun type parameters, unicode bullets instead of numbering configs, and table shading without ShadingType.CLEAR. Follow the documented formatting rules to produce valid OOXML.