docx

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

Updated Jul 11, 2026
One-click install
npx skills add https://github.com/mukaddam-ali/Anadolu-Kitchen --skill docx-mukaddam-ali
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/mukaddam-ali/Anadolu-Kitchen/tree/main/skills/document-skills/docx
Command: npx skills add https://github.com/mukaddam-ali/Anadolu-Kitchen --skill docx-mukaddam-ali

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 styles, tables, lists, images, headers, and footers. - Editing & Redlining: Modify existing documents with tracked changes and comments 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 in OOXML with minimal precise edits, and verifying the final redlined document. ## Quick Start Ask the assistant to create a new Word document or 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(). It supports styles, tables, lists, images, headers, footers, and tables of contents.

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

Unpack the document with the provided unpack script, then use the Document library's replace_node, suggest_deletion, revert_insertion, and revert_deletion methods to wrap edits in w:ins and w:del tags. Pack the directory back into a .docx when finished.

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

Can I add comments to an existing Word document programmatically?

Yes, the Document library's add_comment method anchors comments to document nodes and automatically manages comments.xml, commentsExtended, and people.xml infrastructure. You can also reply to existing comments with reply_to_comment.

Why does my generated docx fail to open in Word?

Common causes include standalone PageBreak elements outside Paragraphs, unicode bullets instead of numbering config, missing ImageRun type parameters, or invalid tracked change nesting. Follow the documented critical rules and run validation on save.