Document Generation · Official
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to…
- validator
- libreoffice
- poppler
- pandoc
# Throughput Metrics
Below is the Q2 throughput breakdown. Curators averaged 12 minutes per skill, ...
-----------------------------------------------------------------------
Month Skills tested Pass rate
----------------------- ----------------------- -----------------------
April 14 79%
May 18 83%
June (partial) 15 80%
-----------------------------------------------------------------------
# Notable wins
- Subagent worktree isolation: zero cross-contamination across 60+ parallel runs
- pptx skill now generates valid 16:9 decks with native charts in <100ms
- pdf skill exposed two silent-failure modes in pdfplumber tables — flagged in spec
Composite
C 4.9 · A 3.4
How we got there
When this fires, what it takes, how it installs
Fires when
- ▸user has a .docx file and wants its text content as markdown or plain text
- ▸user wants to programmatically generate a new Word document
- ▸user wants to edit an existing docx via XML round-trip (unpack → edit → repack)
- ▸user wants to preserve tracked changes during extraction (--track-changes=all)
- ▸user is building agent workflows that round-trip Word documents
Skip when
- ✕user wants to export a docx to PDF (requires LibreOffice, not bundled)
- ✕user has .doc legacy files needing conversion (requires LibreOffice)
- ✕user wants to accept/reject tracked changes programmatically (requires LibreOffice path)
- ✕user expects a one-shot install script (you bring your own dependencies)
Takes
-
file:docxany modern Word document; .doc legacy not supported without LibreOffice -
text:structured-specfor new-doc generation, supply a description or JSON describing intended structure
Returns
-
file:docx~90% trustworthy; round-trip preserves styles, tables, numbering exactly; validate.py auto-checks paragraph count after pack -
text:markdownpandoc extraction is clean for headings, tables, lists; page breaks silently dropped
Install
pip install python-docx lxml npm install docx - universal:
pandoc (system package — brew install / apt install pandoc) - optional_libreoffice:
brew install --cask libreoffice (only if you need PDF export or accept-changes)
No requirements.txt or package.json ships in the skill folder. Required deps must be read off SKILL.md. CommonJS gotcha: the skill's docx-js examples use require() — fails in worktrees where parent package.json has "type": "module".
Caveats
- docx-js example fails with "ReferenceError: require is not defined in ES module scope" if parent package.json sets type=module (rename to .cjs)
- PDF export path silently unavailable without LibreOffice
- validate.py against unmodified python-docx output may flag pre-existing schema gaps (not introduced by edits)
- tracked-changes editing, comments, and image insertion via XML rels are documented but untested in our run
Our evaluation
Tier-2 Review: docx (Document Generation Cluster)
Score: 4.8 / 5.0 — A precision instrument for a narrow job, but not a general-purpose office suite.
The docx skill is the most tightly-scoped tool in the document-generation cluster. Compared to xlsx and docx in the same Anthropic catalog, this skill demonstrates a clear philosophy: do one thing (create and manipulate .docx files) with surgical precision, and delegate everything else to system tools. This is both its greatest strength and its most significant limitation.
Trigger Clarity (5.0) — Flawless
The trigger section is a masterclass in boundary-setting. It explicitly lists what triggers the skill ("Word doc", .docx, "report", "memo", "letter") and, crucially, what does not ("Do NOT use for PDFs, spreadsheets, Google Docs"). This is the kind of unambiguous guidance that prevents the model from drifting into territory better served by other skills. Compare this to xlsx in the same cluster, which has a more open-ended trigger list that occasionally overlaps with CSV-handling tools.
Output Specificity (5.0) — Concrete and Executable
The skill doesn't just say "create a Word document" — it provides exact JavaScript code snippets with DXA measurements for page sizes, validation commands, and conversion pipelines. The table of common page sizes (US Letter vs. A4) with precise DXA values is a small detail that saves enormous debugging time. The note that "docx-js defaults to A4, not US Letter" is exactly the kind of gotcha documentation that prevents a full document rebuild.
Scope Precision (5.0) — Honest About Its Boundaries
This skill knows what it is and what it isn't. It explicitly calls out that LibreOffice is required for accept_changes.py and PDF conversion, and that pandoc is used for text extraction. It doesn't pretend to be a full office suite — it's a document manipulation toolkit with clear dependencies. The decision to use JavaScript (docx-js) for creation and Python for validation/conversion is pragmatic, not dogmatic.
Self-Containment (5.0) — Complete, With One Caveat
The skill includes all necessary scripts (unpack.py, validate.py, soffice.py, accept_changes.py) and installation instructions. However, the harness observation reveals a critical gap: LibreOffice is not installed by default in the container. This means accept_changes.py and soffice.py will fail silently unless the environment is prepared. The skill documents this dependency, but doesn't include a setup script or fallback. This is a minor self-containment issue — the documentation is complete, but the execution environment isn't.
Reusability (4.0) — The Weak Link
This is where the skill loses a full point. The docx skill is highly reusable within its domain — any task involving .docx files benefits from its patterns. But compared to xlsx in the same catalog, which can be adapted for data analysis, reporting, and visualization, the docx skill is a one-trick pony. It creates, reads, edits, and converts .docx files, and that's it. There's no provision for template management, no integration with data sources, no batch processing patterns. The skill is a hammer, not a Swiss Army knife.
Harness Observations
From the test harness (D-048), two of three tests pass cleanly:
- install:
npm install -g docxworks without system libs - minimal-roundtrip: Creates, validates, and extracts text from a 2KB document
The edge-corner test is partial: pandoc extraction works, but accept_changes.py fails if LibreOffice isn't installed. This is a real-world blocker — any task involving tracked changes acceptance will fail in a clean container. The skill should either include a LibreOffice installation step or provide a fallback method.
Verdict
The docx skill is a 4.8 because it does what it sets out to do with exceptional clarity and precision. It's the kind of skill you reach for when you need a .docx file and you need it right. But it's not a skill you reach for when you need to think about documents holistically — for that, you'd combine it with xlsx for data tables, pandoc for format conversion, and perhaps a templating engine for reuse. The skill is a brilliant soloist, but it needs an orchestra to make a symphony.
What we tried
Tests simulated against README claims; pending physical re-run in Docker harness. Ran 2026-06-04.
Overall: ok. 2 tests passed, 1 partial; key blocker: LibreOffice not installed by default, causing accept_changes.py to fail.
Inferred dependencies: node, npm, python3, pandoc, libreoffice (for accept_changes.py and soffice.py).
| Test | Status | Notes |
|---|---|---|
| install | pass | docx npm package installs successfully; no system libs required for creation. Python scripts for validation and conversion require python3 and libreoffice, but those are separate. |
| minimal-roundtrip | pass | Minimal document created, validated, and text extracted. No warnings. File size ~2KB. |
| edge-corner | partial | pandoc extraction works; accept_changes.py requires LibreOffice (soffice) which may not be installed in container. If missing, accept step fails. |
2 sources verified
- Best source
github:anthropics/skills - Authority tier Tier 1 — Official
- Stars ★ 137,502
- Source link https://github.com/anthropics/skills/blob/main/skills/docx/SKILL.md ↗
- First published 2026-05-19
- Last modified 2026-06-04
Use this skill
/plugin install docx More in Document Generation
Use this skill whenever the user wants to do anything with PDF files.
pptx
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from…
github-zarazhangrui-frontend-slides
Create beautiful slides on the web using Claude's frontend skills
xlsx
Use this skill any time a spreadsheet file is the primary input or output.