manor-os/manor-ai/docx
Claude Code and agent skill by manor-os/manor-ai
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install manor-os/manor-ai/docxSKILL.md
The same SKILL.md was published earlier as leonchaox/qinyan-academic-skills/docx.
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 | |
| Deliver the final file | Export under projects/<project>/exports/, render every page, pass scripts/docx_quality_gate.py - see Final Delivery 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. The sandbox installs the bundled docx dependency automatically before execution.
Setup
Validation
After creating the file, validate it. If validation fails, unpack, fix the XML, and repack.
Final Delivery (mandatory before save_result with artifact_role="final")
Manor reruns a machine quality gate server-side when a final DOCX is saved and binds the report to the exact file bytes. A final file outside the project layout, or without render and gate evidence, is refused; renaming or copying the file does not bypass the check. Use artifact_role="intermediate" for drafts and supporting files that must not go through the gate.
- Project layout. Write the final file to
/skill/projects/<project>/exports/<name>.docx (create the directories).
- Render every page after the last edit and look at the pages:
``bash python scripts/office/soffice.py --headless --convert-to pdf \ projects/<project>/exports/<name>.docx --outdir projects/<project>/qa/final-render pdftoppm -jpeg -r 110 projects/<project>/qa/final-render/<name>.pdf \ projects/<project>/qa/final-render/page ``
- Run the machine gate (exit code 1 or a score below 90 is a hard stop:
fix the source, re-export, re-render, rerun): ``bash python3 scripts/docx_quality_gate.py projects/<project>/exports/<name>.docx \ --project projects/<project> \ --render-dir projects/<project>/qa/final-render \ --min-score 90 \ --report projects/<project>/qa/docx-quality.json ` The gate checks the OOXML package and schema (scripts/office/validate.py), an empty body, unresolved placeholders ({{...}}, [INSERT ...], TODO, lorem ipsum), and that every page has fresh render evidence. Its repair_actions` are the next-pass instructions.
- Save with
sandboxactionsave_result,
file_path="/skill/projects/<project>/exports/<name>.docx", artifact_role="final".
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.
Width rules:
- Always use `WidthType.DXA` — never
WidthType.PERCENTAGE(incompatible with Google Docs) - Table width must equal the sum of
columnWidths - Cell
widthmust match correspondingcolumnWidth - Cell
marginsare internal padding - they reduce content area, not add to cell width - For full-width tables: use content width (page width minus left and right margins)
Images
Page Breaks
Hyperlinks
Footnotes
Tab Stops
Multi-Column Layouts
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/core/ai/skills/docx/SKILL.md
Popularity
- Repository stars
- 164
- Repository forks
- 52
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/manor-os/manor-ai/docx)