Agent skill
Word / Docx
Read and generate Word documents with correct structure, styles, and cross-platform compatibility.
Install this agent skill to your Project
npx add-skill https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/word-docx
Metadata
Additional technical details for this skill
- clawdbot
-
{ "os": [ "linux", "darwin", "win32" ], "emoji": "\ud83d\udcd8" }
SKILL.md
Structure
- DOCX is a ZIP containing XML files—
word/document.xmlhas main content,word/styles.xmlhas styles - Text splits into runs (
<w:r>)—each run has uniform formatting; one word may span multiple runs - Paragraphs (
<w:p>) contain runs—never assume one paragraph = one text block - Sections control page layout—headers/footers, margins, orientation are per-section
Styles vs Direct Formatting
- Styles (Heading 1, Normal) are named and reusable—direct formatting is inline and overrides style
- Removing direct formatting reveals underlying style—useful for cleanup
- Character styles apply to runs, paragraph styles to paragraphs—they layer together
- Linked styles can be both—applying to paragraph or selected text behaves differently
Lists & Numbering
- Numbering is complex:
abstractNumdefines pattern,numreferences it, paragraphs referencenumId - Restart numbering not automatic—need explicit
<w:numPr>with restart flag - Bullets and numbers share the numbering system—both use
numId - Indentation controlled separately from numbering—list can exist without visual indent
Headers, Footers, Sections
- Each section can have different headers/footers—first page, odd, even pages
- Section breaks: next page, continuous, even/odd page—affects pagination
- Headers/footers stored in separate XML files—referenced by section properties
- Page numbers are fields, not static text—update on open or print
Track Changes & Comments
- Track changes stores original and revised in same document—accept/reject to finalize
- Deleted text still present with
<w:del>wrapper—don't assume visible = all content - Comments reference ranges via bookmark IDs—
<w:commentRangeStart>to<w:commentRangeEnd> - Revision IDs track who changed what—metadata persists even after accepting
Fields & Dynamic Content
- Fields have code and cached result—
{ DATE \@ "yyyy-MM-dd" }vs displayed date - TOC, page numbers, cross-references are fields—update fields to refresh
- Hyperlinks can be fields or direct
<w:hyperlink>—both valid - MERGEFIELD for mail merge—placeholder until merge executes
Compatibility
- Compatibility mode limits features to earlier Word version—check
w:compatsettings - Page size defaults vary by tool and region—set US Letter vs A4 explicitly or pagination and table widths can drift
- LibreOffice/Google Docs: complex formatting may shift—test roundtrip
- Embedded fonts may not transfer—fallback fonts substitute
- DOCM contains macros (security risk); DOC is legacy binary format
Common Pitfalls
- Empty paragraphs for spacing—prefer space before/after in paragraph style
- Manual page breaks inside paragraphs—use section breaks for layout control
- Images in headers: relationship IDs are per-part—same image needs separate relationship in header
- Copy-paste brings source styles—can pollute style gallery with duplicates
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
audit-website
Audit websites for SEO, performance, security, technical, content, and 15 other issue cateories with 230+ rules using the squirrelscan CLI. Returns LLM-optimized reports with health scores, broken links, meta tag analysis, and actionable recommendations. Use to discover and asses website or webapp issues and health.
firecrawl
Web search and scraping via Firecrawl API. Use when you need to search the web, scrape websites (including JS-heavy pages), crawl entire sites, or extract structured data from web pages. Requires FIRECRAWL_API_KEY environment variable.
computer-use
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag, etc). Unlike OpenClaw's browser tool, operates at the X11 level so websites cannot detect automation. Includes VNC for live viewing.
social-media-analyzer
Social media campaign analysis and performance tracking. Calculates engagement rates, ROI, and benchmarks across platforms. Use for analyzing social media performance, calculating engagement rate, measuring campaign ROI, comparing platform metrics, or benchmarking against industry standards.
business-growth-skills
4 production-ready business and growth skills: customer success manager with health scoring and churn prediction, sales engineer with RFP analysis, revenue operations with pipeline and GTM metrics, and contract & proposal writer. Python tools included (all stdlib-only). Works with Claude Code, Codex CLI, and OpenClaw.
contract-and-proposal-writer
Contract & Proposal Writer
Didn't find tool you were looking for?