MCPInstall

docx

Create, edit, review, and read Word documents (.docx), including tracked changes (redlines), comments, footnotes, tables, images, headers and page setup. Use when a task produces or modifies a .docx, reviews or redlines one, or needs its text, comments or tracked changes read.

Installs
1.3K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/appautomaton/document-skills --skill docx
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads docx automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Word documents

You already know Word's features. This skill adds what you can't see from the code: a library that makes tracked changes and comments correctly, validation that catches untracked edits, a way to see pages as a reader will, and the docx-js and OOXML behaviours that silently produce broken files.

Running scripts

<skill> is the directory containing this file. Run bundled scripts by absolute path from the user's working directory, so relative paths to their files keep working:

uv run <skill>/ooxml/scripts/unpack.py contract.docx unpacked

Run Python you write with its dependencies declared, either uv run --with defusedxml script.py or a PEP 723 header. Run Node scripts as NODE_PATH=<skill>/node_modules node build.js; if <skill>/node_modules is missing, run npm install in <skill> once. Rendering pages needs LibreOffice (soffice) and poppler (pdftoppm); reading needs pandoc.

Choosing a workflow

TaskUse
Read the textpandoc --track-changes=all file.docx -t markdown. It also shows tracked changes and comments. Use accept or reject instead of all to see either outcome.
Create a documentdocx-js: read docx-js.md first. It covers the page size, style and image behaviours that otherwise break the file.
Edit someone else's document, or anything legal, academic, business or officialTracked changes, so every edit is reviewable: the redlining workflow below.
Small edits to a document you created in this sessionThe same library, untracked. Make the edits, then call doc.save(require_tracking=False), which still checks the schema. For larger changes, regenerate the file with docx-js.
Comments, metadata, embedded media, raw structureUnpack and read the XML; ooxml.md has the patterns.

Redlining workflow

  1. Read. Convert the document with pandoc (above) and list every change you will make. Locate each one by its surrounding text, never by markdown line numbers, which have no relation to the XML.
  2. Unpack. uv run <skill>/ooxml/scripts/unpack.py contract.docx unpacked prints a suggested RSID. Pass it as Document(..., rsid=...) so the session's edits share one revision ID.
  3. Edit. Read ooxml.md, then write a script that uses the Document library. tracked_replace(old, new) handles most edits: it finds text across runs and marks only the words that differ. Work in batches of related changes, a few to a dozen per script, so a failure is easy to locate. Grep unpacked/word/document.xml again before each batch, because line numbers move after every save.
  4. Save. doc.save() refuses to write a document with untracked edits, or with XML that breaks the schema, and prints what differs. Fix the script rather than skipping validation.
  5. Pack. uv run <skill>/ooxml/scripts/pack.py unpacked reviewed.docx repacks the file and checks that LibreOffice can open it.
  6. Verify. Run pandoc --track-changes=all reviewed.docx -t markdown and confirm every intended change appears and nothing else changed. Then check the output (below).

To accept or reject existing changes, call doc.accept_all_changes() or doc.reject_all_changes() before making edits of your own.

Checking the output

  1. Validate. uv run <skill>/ooxml/scripts/validate.py reviewed.docx --original contract.docx checks the schema, and that every change from the original is tracked; doc.save() runs the same checks. Pass --author NAME to let that author's earlier insertions be edited directly. For a document generated from scratch, leave out --original to check the schema alone.
  2. Look. uv run <skill>/ooxml/scripts/render.py reviewed.docx pages prints one PNG path per page (--pages 2-4 for a range). Read them before delivering a document you created or restructured. LibreOffice renders a docx-js table of contents empty; Word fills it in when it opens the file.

Pitfalls that fail silently

  • Partial edits inside other authors' changes. To remove text inside someone else's insertion, nest your <w:del> inside it. Never edit their text directly.
  • pandoc as an editor. It rewrites the whole document and drops formatting, comments and tracked changes. Use it to read, never to produce the deliverable.

FAQ

What does the docx skill do?

Create, edit, review, and read Word documents (.docx), including tracked changes (redlines), comments, footnotes, tables, images, headers and page setup. Use when a task produces or modifies a .docx, reviews or redlines one, or needs its text, comments or tracked changes read.

How do I install docx?

Run npx skills add https://github.com/appautomaton/document-skills --skill docx in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/docx/ (personal) or .claude/skills/docx/ (project).

Which AI agents can use docx?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is docx safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains docx?

It is published by appautomaton in appautomaton/document-skills. It has 1,288 recorded installs.

More from appautomaton/document-skills

View all →

xlsx

appautomaton/document-skills

Create, edit, analyze, and recalculate Excel workbooks (.xlsx, .xlsm) with live formulas, formatting, and charts. Use when a task produces or modifies a spreadsheet file, turns CSV/TSV data into one, or needs values, formulas, or formatting read from one.

Data & Databases1.3K installs

pptx

appautomaton/document-skills

Create, edit, and analyze PowerPoint decks (.pptx). Build new decks from HTML slides, fill an existing template, duplicate or reorder slides, edit slide XML, and read or write speaker notes. Use when a task produces or modifies a .pptx file, or needs text, layout, or notes read from one.

Docs & Writing839 installs

pdf

appautomaton/document-skills

Read, create, fill, and transform PDF files. Covers extracting text and tables, OCR of scanned pages, filling fillable and flat forms, and flattening, merging, splitting, rotating, stamping and encrypting. Use when a task takes a .pdf as input or must produce one.

Docs & Writing704 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs