Agent skill · writing content · claude-office-skills
docx-manipulation
Create, edit, and manipulate Word documents programmatically using python-docx
Why this skill is useful
Provides specific commands and patterns for manipulating Word documents using python-docx that the AI wouldn't reliably generate on its own.
What it needs
Requires python-docx installed locally. About 4k tokens when loaded. Last updated 2026-01-31. 363 stars on the source repository.
What this skill does
DOCX Manipulation Skill Overview This skill enables programmatic creation, editing, and manipulation of Microsoft Word (.docx) documents using the python-docx library. Create professional documents with proper formatting, styles, tables, and images without manual editing. How to Use 1. Describe what you want to create or modify in a Word document 2. Provide any source content (text, data, images) 3. I'll generate python-docx code and execute it Example prompts: "Create a professional report with title, headings, and a table" "Add a header and footer to this document" "Generate a contract document with placeholders" "Convert this markdown content to a styled Word document" Domain Knowledge python-docx Fundamentals Document Structure Adding Content Paragraphs & Headings Tables Images Formatting Paragraph Formatting Character Formatting Page Setup Headers & Footers Styles Best Practices 1. Structure First: Plan document hierarchy before coding 2. Use Styles: Consistent formatting via styles, not manual formatting 3. Save Often: Call doc.save() periodically for large documents 4. Handle Errors: Check file existence before opening 5. Clean Up: Remove template placeholders after filling Common Patterns Report Template Table from Data Mail Merge Pattern Examples Example 1: Create a Business Letter Example 2: Create a Report with Table Limitations Cannot execute macros or VBA code Complex templates may lose some formatting Limited support for advanced features (SmartArt, Charts) No direct PDF conversion (use separate tool) Track changes reading is limited Installation Resources python-docx Documentation GitHub Repository Office Open XML Spec
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills claude-office-skills/docx-manipulation