openkursar/hello-halo/docx
- community
Checking that the SKILL.md file is still in the repository.
Work with Microsoft Word documents. Use whenever a .docx file is the input or the deliverable: reading or summarizing a Word document, creating a report/memo/letter/contract as a .docx, editing text in an existing .docx (find-and-replace, filling a template), or converting content into a polished Word document. Trigger on any mention of 'Word document', '.docx', or a deliverable that should open in Word. Do NOT use for PDFs, spreadsheets, or plain-text/markdown deliverables.
Install
npx vskill@latest install openkursar/hello-halo/docxSKILL.md
Word Documents (.docx)
A .docx is a ZIP of XML parts; the body lives in word/document.xml. All work is done by writing Node scripts run with halo-node. Preloaded libraries: docx (create), mammoth (read), jszip (raw OOXML). Never run npm install. Script paths are relative to this skill's directory.
| Task | Approach | |
|---|---|---|
| Read content | halo-node scripts/read-docx.cjs file.docx (--html when it has tables) | |
| Create new document | MANDATORY: read references/design.md, THEN write the docx script per references/creating.md | |
| Replace text in existing file | halo-node scripts/docx-replace.cjs in.docx "old" "new" -o out.docx | |
| Other edits to existing file | Unpack → edit word/document.xml → repack — see references/editing.md | |
| Inspect raw XML | halo-node scripts/ooxml.cjs cat file.docx word/document.xml |
The docx library cannot open existing files — it only creates. Editing therefore always goes through the OOXML path. Every script has --help.
Creating — essentials (details in references/creating.md)
Non-obvious rules that prevent broken output:
- Default page size is A4. For US Letter:
properties: { page: { size: { width: 12240, height: 15840 } } }(DXA units, 1440 per inch). - Never put `\n` in a TextRun — one
Paragraphper line. Page breaks are aPageBreakchild inside aParagraph. - Bullets/numbering need a `numbering` config on the Document; never type a literal bullet character. See
references/creating.md. - Tables: set
columnWidthson the Table AND a DXAwidthon every cell. - Font sizes are half-points (
size: 24= 12pt); indents and page geometry are DXA. - Images:
ImageRunrequires an explicittype('png','jpg') plus width/height intransformation.
Design is the default — not opt-in
When the user gives no styling requirements, that means "deliver a designed professional document", never "library defaults". Before writing any create script, read references/design.md and apply its standard: theme constants (one accent color), wider side margins, the heading hierarchy with explicit run colors/spacing, styled tables (accent header row, no default black grid), a cover page for reports, and the CJK font-pairing conventions for Chinese documents. Default headings/tables from the docx library render as an obviously unstyled draft — that output is not acceptable as a deliverable.
Editing — essentials (details in references/editing.md)
Word fragments visible text across many <w:r> runs, so a phrase you can read often does not exist as a contiguous string in the XML. docx-replace.cjs handles this — it matches across run boundaries within a paragraph and keeps the first run's formatting. Use it for all text substitution, including template filling (--all for every occurrence, --part word/header1.xml for headers/footers).
For structural edits (add/remove paragraphs, restyle) work on the unpacked XML:
Never pretty-print or reformat the XML — whitespace between <w:t> tags is content. Text with leading/trailing spaces needs xml:space="preserve" on its <w:t>.
Verification loop (required)
After every create or edit:
halo-node scripts/ooxml.cjs validate out.docx— zip integrity, XML well-formedness, relationship resolution.halo-node scripts/read-docx.cjs out.docx— read the extracted content and confirm the text, order, and headings are what you intended. For templates, grep the output for leftover placeholders (TODO,[insert,XXX,lorem).
There is no visual renderer here — text extraction plus XML validation is the verification standard. Say so if the user asks about visual fidelity.
Boundaries — say so, offer the alternative
- Legacy `.doc` cannot be read or written. Tell the user: "I can't open the old .doc format — please re-save it as .docx in Word, or paste the text; I can then produce a proper .docx."
- Track changes: cannot accept/reject revisions or author tracked edits. Offer a clean edited copy instead, with a summary of what changed.
- Comments cannot be added or read reliably. Offer inline bracketed notes or a separate notes section.
- No visual preview: layout is verified structurally, not by rendering. For pixel-accurate review the user must open the file in Word/WPS.
- Mammoth intentionally drops most styling when reading (it extracts semantic structure). Do not infer "the document is unstyled" from its output — check the XML if styling matters.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingresources/builtin-skills/docx/SKILL.md
Popularity
- 7-day trend score
- 0
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/openkursar/hello-halo/docx)