Agent skill · writing content · davila7
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', 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 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.
Why this skill is useful
Provides specific commands and scripts for creating, editing, and validating .docx files that the AI wouldn't reliably generate on its own.
What it needs
Requires npm, python installed locally. About 10k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.
What this skill does
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: Reading Content Converting to Images Accepting Tracked Changes To produce a clean document with all tracked changes accepted (requires LibreOffice): --- Creating New Documents Generate .docx files with JavaScript, then validate. Install: npm install -g docx Setup Validation After creating the file, validate it. If validation fails, unpack, fix the XML, and repack. Page Size Common page sizes (DXA units, 1440 DXA = 1 inch): Paper Width Height Content Width (1" margins) ------- ------- -------- --------------------------- US Letter 12,240 15,840 9,360 A4 (default) 11,906 16,838 9,026 Landscape orientation: docx-js swaps width/height internally, so pass portrait dimensions and let it handle the swap: Styles (Override Built-in Headings) Use Arial as the default font (universally supported). Keep titles black for readability. Lists (NEVER use unicode bullets) Tables CRITICAL: Tables need dual widths - set both columnWidths on the table AND width on each cell. Without both, tables render incorrectly on some platforms. Table width calculation: Always use WidthType.DXA — WidthType.PERCENTAGE breaks in Google Docs. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills davila7/docx