Automate common Word/WPS document operations on Windows via COM (read text, replace, insert, headings, headers/footers, page breaks, merge, split, export to PDF/TXT, add/replace images). Use for single-document actions (no batch).
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install tiangong-wps-word-automation或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install tiangong-wps-word-automation⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/tiangong-wps-word-automation/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: wps-word-automation description: Automate common Word/WPS document operations on Windows via COM (read text, replace, insert, headings, headers/footers, page breaks, merge, split, export to PDF/TXT, add/replace images). Use for single-document actions (no batch). ---
Use the bundled Python script to control Word or WPS via COM.
python -m pip install pywin32).python {baseDir}/scripts/wps_word_automation.py read --input "C:\path\file.docx"
python {baseDir}/scripts/wps_word_automation.py replace --input "C:\path\file.docx" --find "旧" --replace "新" --save "C:\path\out.docx"
python {baseDir}/scripts/wps_word_automation.py export --input "C:\path\file.docx" --format pdf --output "C:\path\out.pdf"
Extract plain text.
python {baseDir}/scripts/wps_word_automation.py read --input "C:\path\file.docx" --output "C:\path\out.txt"
Find/replace text.
python {baseDir}/scripts/wps_word_automation.py replace --input "C:\path\file.docx" --find "old" --replace "new" --save "C:\path\out.docx"
Insert text at start/end.
python {baseDir}/scripts/wps_word_automation.py insert --input "C:\path\file.docx" --text "Hello" --where start --save "C:\path\out.docx"
Apply Heading 1/2/3 to matching lines.
python {baseDir}/scripts/wps_word_automation.py headings --input "C:\path\file.docx" --level 1 --prefix "# " --save "C:\path\out.docx"
Set header/footer text.
python {baseDir}/scripts/wps_word_automation.py header-footer --input "C:\path\file.docx" --header "标题" --footer "页脚" --save "C:\path\out.docx"
Insert a page break at the end.
python {baseDir}/scripts/wps_word_automation.py page-break --input "C:\path\file.docx" --save "C:\path\out.docx"
Merge multiple docs into one.
python {baseDir}/scripts/wps_word_automation.py merge --inputs "a.docx" "b.docx" --output "merged.docx"
Split by page ranges (e.g., "1-3,4-6").
python {baseDir}/scripts/wps_word_automation.py split --input "C:\path\file.docx" --pages "1-3,4-6" --outdir "C:\out"
Export to PDF or TXT.
python {baseDir}/scripts/wps_word_automation.py export --input "C:\path\file.docx" --format pdf --output "C:\path\out.pdf"
python {baseDir}/scripts/wps_word_automation.py export --input "C:\path\file.docx" --format txt --output "C:\path\out.txt"
Add or replace image at the end.
python {baseDir}/scripts/wps_word_automation.py image --input "C:\path\file.docx" --image "C:\path\img.png" --save "C:\path\out.docx"
--app wps; otherwise default uses Word.--visible true if you need to watch the UI.安装 Word Automation 后,可以对 AI 说这些话来触发它
Create a WPS Writer report from this sales data and save it as a .docx file
Formats the data into a professional report with headers, tables, and charts, then saves it as a WPS-compatible .docx file
Read the WPS spreadsheet and summarize the key figures
Opens the WPS Spreadsheet file, identifies the main data columns, and returns a plain-English summary of the key metrics
Generate a 10-slide WPS Presentation from this outline
Creates a structured presentation with title slide, content slides, and a summary, formatted for WPS Presentation
将技能文件夹放到 ~/.claude/skills/tiangong-wps-word-automation/ 目录(个人级,所有项目可用),或 .claude/skills/tiangong-wps-word-automation/(项目级)。重启 AI 客户端后,用 /tiangong-wps-word-automation 主动调用,或让 AI 根据上下文自动发现并使用。
Word Automation 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Word Automation 可免费安装使用。请查阅仓库了解许可证信息。
Automate common Word/WPS document operations on Windows via COM (read text, replace, insert, headings, headers/footers, page breaks, merge, split, export to PDF/TXT, add/replace images). Use for single-document actions (no batch).
Word Automation 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。