docx (MIT)

Create, edit and review .docx: tracked changes, comments, footnotes, tables, headers.

docx (MIT) is a local implementation: create, edit and review Word files with tracked changes and comments. Same name as Anthropic's docx, different implementation — downloadable and script-editable.

Office documentsagents 2MIT downloadable Scan upstream repo ↗

What it is

Creates, edits, reviews and reads .docx files: tracked changes, comments, footnotes, tables, images, headers and page setup. For anyone delivering a Word document that others must review. It does not replace Word layout experience, and it never uses pandoc to produce the deliverable.

Core workflow

StageContent
TriggerA task produces or modifies a .docx, someone else’s document needs redlining, or text, comments and tracked changes must be read
InputThe .docx, the locations to change (found by surrounding text, never markdown line numbers), the author name and RSID
StepsRead the whole file with pandoc --track-changes=all and list every change; unpack with unpack.py for a suggested RSID; script the Document library and use tracked_replace in small batches; validate with doc.save(); repack with pack.py; re-read with pandoc; then validate.py and render.py
OutputA redlined .docx, one PNG per page, and the schema plus “every change is tracked” check
BoundaryNeeds uv, LibreOffice, poppler, pandoc and Node; pandoc is for reading only; LibreOffice renders a docx-js table of contents empty

Getting started: Always take the redlining path for someone else’s document, and re-grep document.xml before each batch because line numbers move.

Traits

  • doc.save() validates itself: it refuses to write untracked edits or XML that breaks the schema, and prints the differences
  • tracked_replace matches text across runs and marks only the words that actually differ
  • render.py emits one PNG per page, so the reader’s view can be checked before delivery
  • accept_all_changes() and reject_all_changes() settle existing revisions before new edits

Who it is for and who it is not for

Good fitPoor fit
Contracts, papers, business and official documentsPlain text extraction, where one pandoc command suffices
Documents needing comments, footnotes and headersEnvironments without LibreOffice or poppler
Keeping every change another party made visibleMachines that cannot install uv or Node dependencies

How it differs

NeedUse
Create or redline a docx locally, page by pageappautomaton’s docx (this page)
Generate docx or pdf from a topic, accepting remote processingskywork-doc
Fill a PDF formappautomaton’s pdf
Generate a pptxappautomaton’s pptx

Source-level risks

RiskSourceImpact
Dependency installsnpm install runs in the skill directory and Python deps come from uv run --withExternal packages are pulled in, needing network and a trusted source
Untracked edits are refusedEditing inside another author’s insertion needs a nested <w:del> or doc.save() refuses to writeA wrong script fails the whole batch and must be redone
A rendering gapLibreOffice renders a docx-js table of contents emptyA visual check sees no TOC and may misjudge the file as missing content

Example: input and output

Input

Accept tracked changes in this contract and export a clean copy.

Output

Outputs a clean .docx plus a change summary.

本地运行,可改脚本。

FAQ

Difference from official docx?

This one is MIT, downloadable, local; the official is proprietary and index-only.

Dependencies?

Node.js with docx-js.

CategoryOffice documents
Version2026-11-28
Agent supportClaude Code, Generic (reads SKILL.md)
OSmacOS / Linux / Windows
DependenciesLibreOffice / poppler / pandoc(渲染与读取)、Node.js(docx-js)、Node.js(npm install 依赖)、Python(uv 运行)
Environmentnone
Scriptsreviewed: local files only, no network calls
LicenseMIT
Sourceappautomaton/document-SKILLs ↗
Verification✓ verified
Get itDownload zip
SHA256: db9e5fb08a59650a5f14376eb8ee16f2cfef514e9c5e8406c0a2e5191461fc8a · 0.2 MB

"Generic (agents that read SKILL.md)" means any agent that discovers and loads SKILL.md; support level (auto-discovery, manual config, script execution) varies by agent.

Install
unzip appautomaton-document-skills-docx-2026-11-28.zip -d ~/.claude/skills/

Skills directory example: ~/.claude/skills/ for Claude Code; other agents use wherever SKILL.md is discovered.