name: Word / DOCX description: Create, read, and edit Word documents (.docx) with support for templates, tables, and styling. metadata: {"clawdbot":{"emoji":"📘","os":["linux","darwin","win32"]}}
User needs to create, read, or edit Word documents (.docx). Supports template filling, table generation, and professional styling.
This skill uses python-docx for DOCX manipulation. All processing happens locally.
| Topic | File |
|---|---|
| Generate Quotation | scripts/generate_quotation_docx.py |
When generating documents repeatedly (quotations, proposals), use templates with placeholder text that gets replaced.
Use glob wildcards or pathlib for Chinese filename compatibility:
from pathlib import Path
for f in Path(".").glob("*.docx"):
doc = Document(str(f))
Word tables require explicit border and cell styling. Use Table Grid style as baseline.
Page margins, orientation, and headers/footers are controlled at section level:
for section in doc.sections:
section.left_margin = Cm(2.5)
section.right_margin = Cm(2.5)
Text formatting happens at run level. A paragraph can contain multiple runs with different styles.
doc.add_page_break()pip3 install python-docx
Data that stays local: - All file processing happens locally - No external services called
This skill does NOT: - Send data to external endpoints - Require network access
read-docx — Read-only DOCX extractionexcel-xlsx — Excel file handlingpdf-text-extractor — PDF text extractionclawhub star word-docxclawhub sync这个 Skill 专门用于生成专业的 Word 报价单,支持自动计算金额、添加表格和设置样式。文档说明清晰,容易上手,代码组织规范。主要不足是功能比较单一,只适合生成报价单类型的文档,缺少插入图片、页眉页脚等常见功能。作为命令行工具,对非技术用户有一定门槛。整体质量中规中矩,适合需要批量生成报价单的用户使用。