AI SummaryThe docx skill enables AI assistants to create, read, edit, and manipulate Word documents with professional formatting, tables of contents, images, and tracked changes. It's useful for developers and users who need to programmatically generate or process .docx files as part of their workflows.
Install
# Add to your project root as SKILL.md curl -o SKILL.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/docx/SKILL.md"
Description
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 produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx 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.
Overview
A .docx file is a ZIP archive containing XML files.
Quick Reference
| Task | Approach | |------|----------| | Read/analyze content | pandoc or unpack for raw XML | | Create new document | Use docx-js - see Creating New Documents below | | Edit existing document | Unpack → edit XML → repack - see Editing Existing Documents below |
Converting .doc to .docx
Legacy .doc files must be converted before editing: `bash python scripts/office/soffice.py --headless --convert-to docx document.doc `
Text extraction with tracked changes
pandoc --track-changes=all document.docx -o output.md
Quality Score
Good
87/100
Trust & Transparency
No License Detected
Review source code before installing
Verified Open Source
Hosted on GitHub — publicly auditable
Actively Maintained
Last commit 3d ago
79.2k stars — Strong Community
8.3k forks