Tooluck logoTooluck
SKILL.md

docx

Agent skill fromeigent-ai/eigent

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.

How to install docx

install docx
# install the eigent pack with the skills CLI
npx skills add eigent-ai/eigent

# or add only this skill to Claude Code: copy the folder

resources/example-skills/docx/

# into

~/.claude/skills/docx/ (all projects)

.claude/skills/docx/ (one project)

resources/example-skills/docx/SKILL.md

Apache-2.0Full file
1# DOCX creation, editing, and analysis
2
3## Overview
4
5A .docx file is a ZIP archive containing XML files.
6
7## Quick Reference
8
9| Task | Approach |
10|------|----------|
11| Read/analyze content | `pandoc` or unpack for raw XML |
12| Create new document | Use `docx-js` - see Creating New Documents below |
13| Edit existing document | Unpack → edit XML → repack - see Editing Existing Documents below |
14
15### Converting .doc to .docx
16
17Legacy `.doc` files must be converted before editing:
18
19```bash
20python scripts/office/soffice.py --headless --convert-to docx document.doc
21```
22
23### Reading Content
24
25```bash
26# Text extraction with tracked changes
27pandoc --track-changes=all document.docx -o output.md
28
29# Raw XML access
30python scripts/office/unpack.py document.docx unpacked/
31```
32
33### Converting to Images
34
35```bash
36python scripts/office/soffice.py --headless --convert-to pdf document.docx
37pdftoppm -jpeg -r 150 document.pdf page
38```
39
40### Accepting Tracked Changes
41
42To produce a clean document with all tracked changes accepted (requires LibreOffice):
43
44```bash
45python scripts/accept_changes.py input.docx output.docx
46```
47
48---
49
50## Creating New Documents
51
52Generate .docx files with JavaScript, then validate. Install: `npm install -g docx`
53
54### Setup
55```javascript
56const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, ImageRun,
57 Header, Footer, AlignmentType, PageOrientation, LevelFormat, ExternalHyperlink,
58 TableOfContents, HeadingLevel, BorderStyle, WidthType, ShadingType,
59…

Excerpt shown under the repository's Apache-2.0 license.

More skills in eigent

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates