docx · anthropics — Claude Code skill: what it does, how to install
This skill creates, reads, and edits Word documents and templates. Use it for reports, letters, and files that need headings, tables, or page numbers.
/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skillsWhat docx does
docx lets an agent work with .docx documents and .dotx templates. It can create new files, extract or reorganize content, replace images, run find-and-replace, and handle comments or tracked changes. Use it when the deliverable must be a Word file rather than a PDF, spreadsheet, or general code output.
New documents are built with an npm script using docx; the package is preinstalled, so the script can call require('docx') directly. Existing files are handled by unpacking the archive, editing word/document.xml, and packing the document again. pandoc reads document content, while soffice and pdftoppm can render the result for inspection. Separate Python scripts support comments, run merging, validation, and tracked changes.
Install this skill if your agent regularly prepares or revises Word files. Skip it for PDFs, spreadsheets, or unrelated coding work.
What it helps with
- create a report as a
.docxfile - extract content from a Word document
- edit an existing file while keeping its structure
- replace images or text in a document
- inspect a Word file after PDF conversion
Example prompts for the agent
- Create `report.docx` with headings, a table of contents, and page numbers.
- Read `contract.docx`, find every mention of the term, and replace it.
- Edit `template.dotx`, add a comment to the disputed section, then render the result with `soffice`.
How to install docx
1Plugin marketplace
/plugin marketplace add anthropics/skills/plugin install document-skills@anthropic-agent-skillsThis installs the whole document-skills plugin with all its skills
2Skills CLI (Vercel)
npx skills add anthropics/skills --skill docx -a claude-code3Manually: put the files in place
~/.claude/skills/docx/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/docx/
Manually: put the files in place
.agents/skills/docx/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/docx/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install anthropics/skills docx2Manually: put the files in place
.github/skills/docx/SKILL.mdPlatform CLI
gemini skills install https://github.com/anthropics/skills --path skills/docxManually: put the files in place
.devin/skills/docx/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set23
The whole set →Other versions of docx
Similar
Questions about docx
How do I install docx in Claude Code?
Add the marketplace with /plugin marketplace add anthropics/skills, then run /plugin install document-skills@anthropic-agent-skills. You can also use npx skills add anthropics/skills --skill docx -a claude-code.
What does the docx skill do?
It helps the agent create, read, and edit .docx and .dotx files, including formatting, images, comments, and tracked changes. New documents use the docx npm package, while pandoc is used for reading.
Which tools are needed to inspect the generated document?
Rendering uses LibreOffice through soffice and pdftoppm from Poppler. Content reading requires pandoc.