This handles creating, reading, and editing Word documents through Claude. It's built around the docx-js library for generation and pandoc for reading, with solid coverage of the annoying parts: tracked changes, proper table formatting with dual width specs, page size defaults (watch out, docx-js defaults to A4 not Letter), and list numbering that actually works instead of unicode bullet hacks. The documentation is thorough on validation workflows and includes a Python helper for accepting all tracked changes via LibreOffice. Use this when you need programmatic Word document manipulation, not just text file generation. The XML unpacking approach for edits is old school but reliable.
- skills.sh installs
- 524
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill docx --agent claude-codeInstalls into .claude/skills of the current project.
Files
DOCX creation, editing, and analysis
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:
python scripts/office/soffice.py --headless --convert-to docx document.doc
Reading Content
# Text extraction with tracked changes
pandoc --track-changes=all document.docx -o output.md
# Raw XML access
python scripts/office/unpack.py document.docx unpacked/
Converting to Images
python scripts/office/soffice.py --headless --convert-to pdf document.docx
pdftoppm -jpeg -r 150 document.pdf page
Accepting Tracked Changes
To produce a clean document with all tracked changes accepted (requires LibreOffice):
python scripts/accept_changes.py input.docx output.docx
Creating New Documents
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Categories
- Documentation, Office & Documents
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Research Grants523
- Obsidian Markdown519
- Web Performance Optimization518
- Notion Knowledge Capture516
- Screenshot Feature Extractor514
- Skill Creation Guide514
- React Patterns503
- Executing Marketing Campaigns498
- React Dev498
- Knowledge Distillation497
- Rag Implementation497
- Coding Standards494
- Api Documentation Generator493
- Autonomous Agents492
- Backend Dev Guidelines492
- Database Schema Designer489
- Typescript Expert489
- Api Patterns486
- Skill Creator484
- Supabase Postgres Best Practices481
- File Organizer480
- Research Engineer478
- Llama Cpp475
- App Builder474
