docx
Installation
SKILL.md
Word Document Processing
Overview
Word document processing involves creating, reading, editing, and manipulating .docx files programmatically. This skill should be invoked when generating Word documents, reports, letters, or any document that requires proper formatting and structure.
Core Principles
- Library Selection: Use python-docx for Python or docx-js for JavaScript
- Structure First: Build document structure before content
- Style Consistency: Use consistent styles throughout
- XML Understanding: Understand .docx is ZIP of XML files
Preparation Checklist
- Choose library (python-docx, docx-js, docx4j)
- Identify document structure (headings, paragraphs, tables)
- Plan styling requirements
- Handle special elements (images, headers, footers)