← ClaudeAtlas

docxlisted

Use this skill whenever the user wants to create or edit .docx (Microsoft Word) files. This includes creating new Word documents from scratch, editing existing Word documents, extracting content from Word files, converting between formats, adding images or other content to Word files, or manipulating Word file structure. If the user mentions .docx, Word, DOCX, or wants to produce a Word document, use this skill.
ur-grue/autopunk-media-skills · ★ 9 · Data & Documents · score 79
Install: claude install-skill ur-grue/autopunk-media-skills
# DOCX Processing Guide ## Overview This guide covers creating, editing, and analyzing Word documents (.docx files). Use this skill when you need to programmatically create new Word documents, make targeted edits to existing files, or extract content. ## Creating Documents Use the `docx` JavaScript library for programmatic document creation. The library provides a powerful API for building Word documents with full formatting control. ### Page Sizing Always explicitly set page size — `docx-js` defaults to A4 (11,906 × 16,838 DXA), not US Letter. Specify dimensions using DXA units, where 1 inch = 1440 DXA. For US Letter (8.5" × 11"): - Width: 12,240 DXA - Height: 15,840 DXA - With standard 1" margins: content area is 10,240 × 13,840 DXA For landscape orientation, pass portrait dimensions with `landscape: true` — the library handles internal conversion: ```javascript const doc = new Document({ sections: [{ properties: { pageHeight: 15840, // Portrait height pageWidth: 12240, // Portrait width landscape: true, // Library rotates internally } }] }); ``` ### Tables Tables require dual width specifications. Always specify both `columnWidths` array AND individual cell `width` properties, with all values using `WidthType.DXA` (percentage widths break in Google Docs). Table width must equal the sum of column widths: ```javascript const columnWidths = [3000, 4000, 3000]; // Total: 10000 const table = new Table({ columnWidths: columnWidth