docx

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

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/ramshan00/hackaton --skill docx-ramshan00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/ramshan00/hackaton/tree/main/Hackathon2-phase2/.claude/skills/docx
Command: npx skills add https://github.com/ramshan00/hackaton --skill docx-ramshan00

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with .docx files programmatically is difficult because they are ZIP archives of complex OOXML, making tasks like tracked changes, comments, and formatting preservation error-prone when done manually. ## Core Features & Use Cases - Document Creation: Generate new Word documents from scratch using the docx-js JavaScript library with styles, tables, lists, images, headers, and footers. - Editing & Redlining: Modify existing documents with tracked changes and comments using a Python Document library that handles RSIDs, validation, and OOXML infrastructure automatically. - Text Extraction & Analysis: Convert documents to markdown with pandoc, unpack raw XML for deep inspection, and render pages to images via LibreOffice and pdftoppm. - 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 .docx. ## Quick Start Ask the assistant to create a new Word report with headings and a table, or to add tracked changes and comments to an existing .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(). The docx-js.md reference covers styles, tables, lists, images, and page setup.

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 auto-injects RSIDs, author, and date attributes for valid tracked changes.

How do I extract text from a docx file?

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 directly.

Does the docx skill support comments and comment replies?

Yes, the Document library provides add_comment to anchor comments on elements and reply_to_comment for threaded replies. 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, or unicode bullets instead of numbering configs. The Document library's save method validates XML against the OOXML schema to catch such errors.