Skills

DOCX

Use this skill whenever the user wants to create, read, edit, or manipulate Word...

Install

npx skills add melandlabs/openloomi --skill docx -g -a claude-code -y
Category
Documents
Updated
1mo ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
Yes, review before use

What it does

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.

DOCX creation, editing, and analysis

Overview

A .docx file is a ZIP archive containing XML files.

Quick Reference

TaskApproach
Read/analyze contentpandoc or unpack for raw XML
Create new documentUse docx-js - see Creating New Documents below
Edit existing documentUnpack → edit XML → repack - see Editing Existing Documents below

Converting .doc to .docx

Legacy .doc files are auto-converted on read and write, no manual step needed:

# Reading .doc (auto-converted to .docx internally)
python scripts/office/unpack.py legacy.doc unpacked/

# Writing .doc (auto-converted from .docx)
python scripts/office/pack.py unpacked/ output.doc

LibreOffice is used for the conversion, with automatic sandbox-friendly socket handling.

Reading Content

# Text extraction with tracked changes
pandoc --track-changes=all document.docx -o output.md

# Raw XML access
python scripts/office/unpack.py document.docx unpacked/

Converting to Images

python scripts/office/soffice.py --headless --convert-to pdf document.docx
pdftoppm -jpeg -r 150 document.pdf page

Accepting Tracked Changes

To produce a clean document with all tracked changes accepted (requires LibreOffice):

python scripts/accept_changes.py input.docx output.docx

Creating New Documents

Generate .docx files with JavaScript, then validate. Install: npm install -g docx

Setup

Read the whole SKILL.md on GitHub

More in Documents