Documents & OfficeOfficial · anthropics

Docx skill for Claude

The docx skill by anthropics: Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

Docx SKILL.md

A preview of the skill file from anthropics/skills (Complete terms in LICENSE.txt).

DOCX creation, editing, and analysis

A .docx is a ZIP archive of XML files. Choose your approach by task:

TaskApproach
Create a new documentWrite a docx (npm) script — see gotchas below
Edit an existing documentunpack → edit word/document.xml → zip (docx-js cannot open existing files)
Read contentpandoc -t markdown file.docx

Script paths below are relative to this skill's directory.

Creating with docx-js — gotchas

docx is preinstalled — do not run npm install first; write the script and require('docx') directly. Only if that require fails: npm install docx. The model knows the API; these are the footguns:

  • Page size defaults to A4. For US Letter set page: { size: { width: 12240, height: 15840 } } (DXA; 1440 = 1″).
  • Landscape: pass portrait dimensions and orientation: PageOrientation.LANDSCAPE — docx-js swaps width/height internally.
  • Tables need dual widths: set columnWidths on the table AND width on every cell, both in WidthType.DXA (PERCENTAGE breaks in Google Docs). Column widths must sum to the table width.
  • Table shading: use ShadingType.CLEAR, never SOLID (renders black).
  • Lists: never insert • literally; use a numbering config with LevelFormat.BULLET.
  • ImageRun requires type: ("png", "jpg", …).
  • PageBreak must be inside a Paragraph.
  • Never use \n — use separate Paragraph elements.
  • Headings: style every level you use (title, heading1, heading2…) in styles.default: heading1: { run: { font: "Arial", size: 32, bold: true }, paragraph: { spacing: { before: 240, after: 120 }, keepNext: true } }. Every level needs its own font (even with a document default), before and after (even if 0) and keepNext: the built-in styles set none of them.

Read the full SKILL.md on GitHub →

How to install the docx skill

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit anthropics/skills/skills/docx#main ~/.claude/skills/docx

Codex

npx degit anthropics/skills/skills/docx#main ~/.codex/skills/docx

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What is the docx skill?

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

+How do I install the Claude docx skill?

Copy the skill folder into ~/.claude/skills/docx, for example with "npx degit anthropics/skills/skills/docx#main ~/.claude/skills/docx". Claude Code loads it automatically and uses it when a task matches.

+Does Docx work with ChatGPT or Codex?

Yes. Docx uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/docx. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Docx free?

Docx is published on GitHub by anthropics under the Complete terms in LICENSE.txt license; check the license terms before using it.

Related documents & office skills

  1. Pdf

    Official

    Use this skill whenever the user wants to do anything with PDF files.

    anthropics/skills★ 197k
  2. Pptx

    Official

    Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both.

    anthropics/skills★ 197k
  3. Slides

    Create strategic HTML presentations with Chart.js, design tokens, responsive layouts, copywriting formulas, and contextual slide strategies.

    nextlevelbuilder/ui-ux-pro-max-skill★ 151k
  4. Markitdown

    Converts heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion.

    K-Dense-AI/scientific-agent-skills★ 58k
  5. Xlsx

    Official

    Use this skill any time a spreadsheet file is the primary input or output.

    anthropics/skills★ 197k
  6. Liteparse

    Local document and PDF parsing that returns spatial text with bounding boxes.

    K-Dense-AI/scientific-agent-skills★ 58k
  7. Office Hours

    Founder advice after six YC-style questions. Use whenever a founder is stuck or unsure what to ask, or /c-level-agents:office-hours.

    alirezarezvani/claude-skills★ 30k
  8. Wowerpoint

    Turn one document into a kawaii NotebookLM slide deck. Use for "wowerpoint this", "make a deck about <file>", "turn this report into…

    thedotmack/claude-mem★ 118k
  9. Docx

    Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text…

    ComposioHQ/awesome-claude-skills★ 80k

See all documents & office skills →

More skills from anthropics

  1. Mcp Builder

    Official

    Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through…

    anthropics/skills★ 197k
  2. Claude Api

    Official

    Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model…

    anthropics/skills★ 197k
  3. Webapp Testing

    Official

    Toolkit for interacting with and testing local web applications using Playwright.

    anthropics/skills★ 197k

All skills by anthropics →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.