docx Claude Code Skill
Claude Code SkillClaude CodeDocuments & Content CreationThe explanation below is AI-generated. Please verify it against the sources.
This is a Claude skill for creating, reading, editing, and analyzing Word documents in .docx (and .dotx) format. It covers building new documents with the docx npm library, unzipping and editing the underlying XML of existing files, and reading content via pandoc. It also provides detailed guidance on common pitfalls (page size, tables, lists, images, page breaks, table of contents) and workflows for tracked changes, comments, and verifying output by rendering to PDF and images. All processing happens locally using command-line tools and scripts rather than through a connected online service.
What you can do with docx
- Generate new .docx files from scratch using the docx npm library, with guidance on page size, orientation, tables, lists, images, and table-of-contents setup
- Edit existing .docx/.dotx files by unpacking the archive, modifying the internal document.xml, merging fragmented text runs, and repacking
- Read and extract document content as markdown using pandoc
- Convert legacy .doc files to .docx format using LibreOffice before editing
- Insert, review, and validate tracked changes (insertions/deletions) with proper authorship and schema compliance, and produce a clean version with all changes accepted
- Add and anchor comments to specific text ranges using a helper script that manages the required comment-related XML files
- Verify generated or edited documents by converting them to PDF and rendering pages as images for visual inspection
Sources
History of docx
- Claude Code Skill Updated skill content (SKILL.md) of docx
- Claude Code Skill Updated the official description of docx