docx

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

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/miyake-san/sogo-agent-platform --skill docx-miyake-san
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/miyake-san/sogo-agent-platform/tree/main/skills/experimental/docx-official
Command: npx skills add https://github.com/miyake-san/sogo-agent-platform --skill docx-miyake-san

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 error-prone because they are ZIP archives of complex OOXML. This Skill provides structured workflows for reading, creating, and editing Word documents, including professional redlining with tracked changes and comments. ## Core Features & Use Cases - Text Extraction & Analysis: Convert .docx to markdown with pandoc, preserving tracked changes, or unpack raw XML for comments, media, and metadata. - Document Creation: Generate new Word documents with docx-js (JavaScript/TypeScript) using styles, tables, lists, images, headers, and TOC. - Redlining Workflow: Implement tracked changes and comments in existing documents via a Python Document library with automatic RSID, validation, and batching. - Use Case: Review a legal contract by converting it to markdown, planning batched edits, applying minimal tracked changes with the Document library, and verifying the final document. ## Quick Start Ask the assistant to review the attached contract.docx and propose tracked changes for all outdated terms.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I extract text from a docx file with tracked changes?

Use pandoc with the --track-changes=all flag to convert the .docx file to markdown while preserving insertions and deletions. Options include accept, reject, or all depending on how you want changes rendered.

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

Unpack the .docx with the provided unpack script, then use the Python Document library to wrap edits in w:ins and w:del elements. The library auto-injects RSIDs, author, and timestamps, and validates the document on save.

What tools create new Word documents from scratch?

The docx npm library (docx-js) creates new .docx files using JavaScript or TypeScript with Document, Paragraph, and TextRun components. Export the result with Packer.toBuffer and write it to a file.

Can I convert a Word document to PDF or images?

Yes, use LibreOffice headless mode (soffice --convert-to pdf) to produce a PDF, then pdftoppm from Poppler to render pages as JPEG or PNG images for visual analysis.

Why does my edited docx fail to open in Word?

Common causes include invalid XML such as nesting w:ins inside w:r elements, missing content-type entries, or broken relationships. The Document library validates on save and raises errors when the document structure is invalid.