ClaudeBeginnerFreeEditorial

DOCX Document Skill

Create, read, and edit Microsoft Word (.docx) documents with formatting, tables of contents, tracked changes, and images — directly from Claude.

No reviews
A
Anthropic
146,09700

Overview

Anthropic's official DOCX skill teaches Claude to create, read, edit, and manipulate Microsoft Word (.docx) documents — generating polished, professionally formatted files or surgically editing existing ones.

What is the DOCX skill?

The DOCX skill is one of the document-creation skills that powers Claude's file capabilities. A .docx file is a ZIP archive of XML, and this skill gives Claude the exact workflows, scripts, and library patterns to work with that format reliably. It covers three jobs: reading and analyzing content, creating new documents from scratch with docx-js (the JavaScript docx library), and editing existing documents by unpacking the XML, changing it, and repacking. It is purpose-built for Word files and explicitly not for PDFs, spreadsheets, or Google Docs.

What it does

  • Creates professional Word documents with headings, a table of contents, page numbers, headers/footers, letterheads, and multi-column layouts
  • Reads and extracts text, including tracked changes, using pandoc (pandoc --track-changes=all)
  • Edits existing .docx files by unpacking to raw XML, making minimal edits, and repacking with validation
  • Adds, accepts, and rejects tracked changes and inserts threaded comments with a named author
  • Inserts and replaces images, builds tables with correct DXA widths, footnotes, hyperlinks, and bookmarks
  • Performs find-and-replace across document XML and converts legacy .doc files to .docx

How it works

Claude loads the skill's SKILL.md and follows its decision table. For new documents it uses docx-js, setting page size explicitly (the library defaults to A4, so US Letter is 12,240 x 15,840 DXA), defining heading styles with outlineLevel so the TableOfContents populates, and using LevelFormat.BULLET numbering instead of unicode bullet characters. Tables always use WidthType.DXA (percentages break in Google Docs) with matching columnWidths and cell widths. For edits, it runs unpack.py to pretty-print and protect smart quotes, edits the XML directly with string replacement, then runs pack.py to validate and rebuild. Tracked insertions use <w:ins> and deletions use <w:del>/<w:delText>, authored as "Claude" by default. Generated files are validated with validate.py before delivery.

Who it's for

Anyone who uses Claude to produce or revise Word documents: analysts writing reports, legal and ops teams handling contracts with tracked changes and comments, recruiters and consultants building templates, memos, and letters, and developers automating document generation. It runs wherever Claude has a code/file environment — Claude.ai (paid plans), Claude Code, and the Claude API.

What you can build

  • Branded letterheads and memos with headers, footers, and page numbers
  • Long reports with an auto-generated table of contents, footnotes, and hyperlinks
  • Redlined contract drafts using tracked changes and reviewer comments
  • Data-rich documents with formatted tables and embedded images
  • Reusable Word templates populated programmatically

Why it matters

Word remains the default format for professional deliverables, and getting .docx right — TOC fields, valid table widths, schema-compliant tracked changes — is genuinely hard. This skill is the same document logic Anthropic uses in production, so Claude produces files that open cleanly in Microsoft Word and Google Docs instead of corrupt or malformed output. It turns "write me a polished Word doc" into a reliable, repeatable result.

What's Included

  • SKILL.md workflows for reading, creating, and editing .docx files
  • docx-js recipes for headings, tables of contents, tables, images, footnotes, and page numbers
  • Unpack/pack scripts for safe XML editing with smart-quote preservation
  • Tracked-changes and threaded-comment patterns authored as a named reviewer
  • Validation tooling that checks generated documents before delivery
  • Legacy .doc to .docx conversion and pandoc-based text extraction

Installation

1. Install in Claude Code

Register the Anthropic skills marketplace, then install the document skills plugin:

/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skills

Or install just this skill with the skills CLI:

bash
npx skills add anthropics/skills --skill docx

2. Use it

On Claude.ai paid plans these document skills are already available. Just ask:

Use the DOCX skill to create a 3-page report with a table of contents and a letterhead.

Or for edits: "Open contract.docx and change the term from 30 to 60 days as a tracked change."

Requirements

  • Claude.ai paid plan, Claude Code, or Claude API access
  • A code/file execution environment for running the skill scripts
  • Node.js with the docx package and Python with pandoc for full functionality

Changelog

v1.0.02026-06-01

Initial listing of the official Anthropic docx skill.

FAQs

Reviews

Sign in to leave a rating and review.

No reviews yet. Be the first to review this skill!