DOCX creation, editing, and analysis

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files).

You say
Install this skill Read the source first Free Written by anthropics · unverified publisher
Context cost
4.8k tokensestimated from the bundle, loaded when it triggers
Bundle
8 files · 19.1 kB1 script among them — read before you run
Licence
Proprietary. LICENSE.txt has complete termsfree to use
Last change
no release on file
Servers it uses
Noneruns standalone

What it does

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word…

Installed, it changes the agent in these ways.

What this skill changes about the agent is not written down here yet. The listing was collected from its source, and the description is in its own SKILL.md.

Output format

Produces one artefact, exactly shaped.

content

The skill itself

This is the whole product. A skill is instructions the model reads, so there is nothing behind the listing you cannot see first — the front matter loads with every session, and the body below it loads when the skill triggers.

SKILL.md6.9 kB · 92 lines
--- name: docx description: "Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation." license: Proprietary. LICENSE.txt has complete terms ---
7# DOCX creation, editing, and analysis
8
9A .docx is a ZIP archive of XML files. Choose your approach by task:
10
11| Task | Approach |
12|---|---|
13| **Create** a new document | Write a docx (npm) script — see gotchas below |
14| **Edit** an existing document | unzip → edit word/document.xmlzip (docx-js cannot open existing files) |
15| **Read** content | pandoc -t markdown file.docx |
16
17> Script paths below are relative to this skill's directory.
18
19## Creating with docx-js — gotchas
20
21docx is preinstalled — do not run npm install first; write the script and require('docx') directly. Only if that require fails: npm install docx. The model knows the API; these are the footguns:
22
23- **Page size defaults to A4.** For US Letter set page: { size: { width: 12240, height: 15840 } } (DXA; 1440 = 1″).
24- **Landscape:** pass portrait dimensions and orientation: PageOrientation.LANDSCAPE — docx-js swaps width/height internally.
25- **Tables need dual widths:** set columnWidths on the table AND width on every cell, both in WidthType.DXA (PERCENTAGE breaks in Google Docs). Column widths must sum to the table width.
26- **Table shading:** use ShadingType.CLEAR, never SOLID (renders black).
27- **Lists:** never insert literally; use a numbering config with LevelFormat.BULLET.
28- **ImageRun requires type:** ("png", "jpg", …).
29- **PageBreak must be inside a Paragraph.**
30- **Never use \n** — use separate Paragraph elements.
31- **TOC:** headings must use built-in HeadingLevel.*; custom heading styles need outlineLevel set or they won't appear.
32- **Don't use a table as a horizontal rule** — use a paragraph bottom border instead.
33- **Dot-leader / right-aligned-on-same-line:** use PositionalTab (alignment: PositionalTabAlignment.RIGHT, leader: PositionalTabLeader.DOT) inside a TextRun, not literal . or space padding.
34
35## Verify the output
36
37After writing a .docx, render it and look at it:
38
39```bash
40python scripts/office/soffice.py --headless --convert-to pdf output.docx
41pdftoppm -jpeg -r 100 output.pdf page
42ls page-*.jpg # then Read the images
43```
44
45pdftoppm zero-pads page numbers to the width of the page count (page-01.jpgpage-12.jpg).
46
47## Editing existing documents
48
49Legacy .doc files must be converted first: python scripts/office/soffice.py --headless --convert-to docx file.doc.
50
51```bash
52unzip -q doc.docx -d unpacked/
53find unpacked -type l -delete # strip symlink entries — docx from external parties is untrusted
54python scripts/merge_runs.py unpacked/ # coalesce fragmented runs so text is findable
55# edit unpacked/word/document.xml in place — do NOT reformat or pretty-print
56(cd unpacked && rm -f ../out.docx && zip -Xr ../out.docx .)
57python scripts/office/validate.py out.docx --original doc.docx # XSD checks; --auto-repair fixes common issues
58# redlining? add --author "<the name you redlined under>" to check every edit is tracked
59```
60
61Word splits text across many <w:r> runs (revision ids, spell-check markers), so a phrase you can see in the document often doesn't exist as a contiguous string in the XML. merge_runs.py merges adjacent identically-formatted runs in word/document.xml without changing content or rendering; it also accepts a .docx directly (python scripts/merge_runs.py doc.docx -o merged.docx).
62
63**Tracked changes:** when redlining, validate with --author "<the name you redlined under>" (needs --original) — it reports any text you changed without a <w:ins>/<w:del> around it, which is easy to do by accident and invisible in the accepted view. Wrap runs in <w:ins>/<w:del> with w:id, w:author, w:date attributes. Inside <w:del>, the text element is <w:delText>, not <w:t>. A deleted paragraph mark (<w:pPr><w:rPr><w:del w:id=".." w:author=".." w:date=".."/></w:rPr></w:pPr>) means "merge this paragraph into the next" — so deleting a paragraph outright is that plus a <w:del> around every run. The <w:del/> must come before the rPr's other children; their order is schema-enforced.
64
65To produce a clean copy with all tracked changes accepted: python scripts/accept_changes.py in.docx out.docx.
66
67Accepting a deleted paragraph mark should join that paragraph to the one below it, so a paragraph whose runs are *all* deleted vanishes. Word does this; accept_changes.py and pandoc --track-changes=accept don't always. Both fail the same way — they strip the deleted text but leave the emptied paragraph behind, which reads as a stray empty bullet when it was auto-numbered:
68
69- pandoc --track-changes=accept never joins the paragraphs.
70- accept_changes.py (LibreOffice) joins them correctly, except when the deleted paragraph is followed by an empty spacer paragraph.
71
72An empty bullet in either view is an artifact of that view, not a defect in the document. Check paragraph deletions in the XML.
73
74## Comments
75
76Comments require six cross-linked files. Use the helper — directory mode when you'll also be editing document.xml (saves an unzip/rezip cycle), .docx-direct mode otherwise:
77
78```bash
79# Against an already-unpacked directory (preferred when also placing markers)
80python scripts/comment.py unpacked/ "Fees & expenses cap is too low"
81python scripts/comment.py unpacked/ "Agreed" --parent 0
82
83# Against a .docx directly
84python scripts/comment.py contract.docx "This cap is too low" -o annotated.docx
85```
86
87The script writes comments.xml, commentsExtended.xml, commentsIds.xml, commentsExtensible.xml, the relationships, and the content-type overrides. Comment IDs are auto-assigned. It then prints the <w:commentRangeStart>/<w:commentRangeEnd>/<w:commentReference> snippet to add to word/document.xml so the comment anchors to specific text — until you place those markers, the comment exists but is not visible.
88
89## Dependencies
90
91docx (npm, preinstalled — install only if require('docx') fails) · pandoc · LibreOffice (soffice) · pdftoppm (Poppler)
92
In the file
SKILL.md975 words
Files8
LicenceProprietary. LICENSE.txt has complete terms
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈230
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
4,545
on trigger
The instruction body and 7 supporting files, read only when the skill fires.
2.4%
of a 200k window
Ten skills this size would take about 24% of the window before you open a file.
050k100k150k200k context window

4.8k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Heavy. Teams tend to install this one per project rather than globally, and load it only when the job comes up.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

Adoption
Installsnone yet
Ratingno reviews yet

The procedure it runs

The procedure has not been published here. It is in the skill’s own SKILL.md, which its author has not sent to the marketplace yet.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

It writes no files and reaches no network. All it changes is how the model reasons and writes.

What it asks for
Writes filesno
Network accessno

Read from the allowed-tools line of this skill’s own SKILL.md. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

8 files, 19.1 kB on disk. Mostly text — the instructions the model reads — with 1 script in it that your client would run only if the instructions tell it to.

  • LICENSE.txt1.5 kB
  • scripts/__init__.py0.1 kB
  • scripts/templates/comments.xml2.6 kB
  • scripts/templates/commentsExtended.xml2.6 kB
  • scripts/templates/commentsExtensible.xml2.7 kB
  • scripts/templates/commentsIds.xml2.6 kB
  • scripts/templates/people.xml0.1 kB
  • SKILL.md6.9 kB
What is not in it

A skill installs nothing and depends on nothing: it is a folder your client reads. This one carries 1 script beside the text, so the bundle is 8 files you can review in full before installing. The Proprietary. LICENSE.txt has complete terms licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

# DOCX creation, editing, and analysis · 4.8k tokens when loaded npx mcprush@latest skill add anthropics/docx-creation-editing-and-analysis

Writes to .claude/skills/docx-creation-editing-and-analysis/ in the current project. Add --global to put it in your home directory instead, for every project.

Which clients pick it up on their own

A skill is a folder of text. A client with a skills folder reads it without being told; everywhere else the same text works, it is just handed to the model rather than found.

Claude Code.claude/skills/
Claude Desktop
ChatGPT
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok.grok/skills/
Zed.agents/skills/
Windsurf.windsurf/skills/
Agent SDK.claude/skills/
HTTP / API
This release
Versionnot versioned
Publishedno release date on file
PriceFree
Referenceanthropics/docx-creation-editing-and-analysis

Versions

Its author publishes no version number, so there is nothing here to pin to: what you install is the folder as it stands today. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

v
  • No earlier releases have been published to the marketplace.
Pinning

Nothing to pin to: this skill carries no version number of its own. What you install is what the folder holds on the day you install it.

Reviews

no reviews yet · no installs yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Who can post

Only accounts that have had the skill installed for fourteen days, so a review is written after living with it rather than after reading it. Publishers may reply once.

Publisher
Servers0
Claim this skill