docx
Create and edit professional Word documents with perfect formatting, tables, and tracked changes instantly.
Create and edit professional Word documents with perfect formatting, tables, and tracked changes instantly.
Stop wrestling with broken Word formatting and manual edits that ruin your layout. This skill generates and edits .docx files using precise XML manipulation to ensure perfect tables, headers, and tracked changes every time. You receive professional reports, memos, and templates ready for immediate use without validation errors. Ideal for professionals requiring compliant, polished documents.
复制以下提示词,粘贴到 OpenClaw 中即可自动安装:
请根据 https://clawshelf.com/api/skills/anthropics-docx/install 的说明,下载并安装此技能到本地 ~/.openclaw/skills/ 目录。
包含文件
---
name: docx
description: "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."
license: Proprietary. LICENSE.txt has complete terms
---
# 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 |
### Converting .doc to .docx
Legacy `.doc` files must be converted before editing:
```bash
python scripts/office/soffice.py --headless --convert-to docx document.doc
```
### Reading Content
```bash
# 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
```bash
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):
```bash
python scripts/accept_changes.py input.docx output.docx
```
---
## Creating暂无评价,成为第一个评价者吧。
100% 原生支持 OpenClaw / Claude 等任何 AI 助手