Claude Official Skill: DOCX — Word Document Creation
Claude Code skill for Word documents. Create, read, edit .docx files with formatting, tables, images, headers, and styles.
What it is
The DOCX skill is an official Claude Code skill that adds Word document capabilities. It enables Claude Code to create new .docx files, read existing ones, and edit documents with formatting, tables, images, headers, footers, and styles. The skill handles the python-docx library interaction so you get professionally formatted Word documents from natural language instructions.
This skill is designed for developers, technical writers, and business users who need to generate or modify Word documents as part of AI-assisted workflows.
How it saves time or tokens
Creating Word documents programmatically with python-docx requires understanding the library's API for styles, paragraphs, tables, and images. The DOCX skill encapsulates this knowledge so Claude Code can generate properly formatted documents from simple instructions. A report that would take an hour to format manually can be generated in seconds. The skill also handles reading existing documents, extracting structured data from tables, and making targeted edits.
How to use
- Install the skill in Claude Code:
claude skill install anthropics/skills/docx
Or manually copy the SKILL.md content to .claude/skills/docx/SKILL.md in your project.
- Ask Claude Code to create a document:
Create a project status report as a Word document with:
- Title: Q1 2026 Status Report
- A summary paragraph
- A table of milestones with columns: Milestone, Status, Date
- Save as status-report.docx
- Claude Code uses the skill to generate the document with proper formatting and styles.
Example
The skill generates code like this behind the scenes:
from docx import Document
from docx.shared import Inches, Pt
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document()
doc.add_heading('Q1 2026 Status Report', level=0)
doc.add_paragraph('This report summarizes project progress for Q1 2026.')
table = doc.add_table(rows=1, cols=3)
table.style = 'Table Grid'
hdr_cells = table.rows[0].cells
hdr_cells[0].text = 'Milestone'
hdr_cells[1].text = 'Status'
hdr_cells[2].text = 'Date'
for milestone, status, date in milestones:
row = table.add_row().cells
row[0].text = milestone
row[1].text = status
row[2].text = date
doc.save('status-report.docx')
Related on TokRepo
- Documentation tools — Browse tools for automated document generation
- Automation tools — Explore workflow automation tools
Common pitfalls
- Not having python-docx installed in your Python environment. The skill generates Python code that requires the python-docx package. Install it with
pip install python-docxbefore using the skill. - Expecting pixel-perfect layout. Word documents have inherent layout variability across viewers. Focus on structure and content rather than precise positioning.
- Forgetting that reading a .docx file extracts text content but may lose complex formatting. If you need to preserve exact formatting when editing, make targeted changes rather than regenerating the entire document.
Frequently Asked Questions
Yes. The skill can open existing .docx files, extract text content, read table data, and list document structure including headings, paragraphs, and images. This enables workflows like extracting data from a template document.
Yes. The skill can insert images into Word documents with specified dimensions. It uses python-docx's add_picture method, which supports common image formats like PNG, JPEG, and BMP.
Yes. You can provide an existing .docx file as a template. The skill opens the template and modifies it, preserving existing styles, headers, and footers while adding or changing content.
Yes. The skill generates Python code using python-docx, which is a pure Python library that works on any platform. You do not need Microsoft Word installed to create or read .docx files.
The DOCX skill focuses on .docx format. For PDF conversion, you would need an additional tool like LibreOffice (soffice --convert-to pdf) or a Python PDF library. The skill does not handle PDF conversion directly.
Citations (3)
- Anthropic Claude Code Documentation— Claude Code skills extend agent capabilities
- python-docx Documentation— python-docx library for Word document manipulation
- Claude Code Skills— Claude Code skill installation and management
Related on TokRepo
Source & Thanks
Created by Anthropic. Licensed under MIT. anthropics/skills
Discussion
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.