docx
它能做什么
该技能帮助智能体处理 Microsoft Word 文件。它可以阅读文件、制作新文件,并进行谨慎的编辑。适用于需要制作或更新 Word 文档的人。
适用场景
- ✓当你想根据你的内容创建一份新的 Word 文档时。
- ✓当你想修改 Word 文件,同时保持其格式不变时。
- ✓当你需要填写 Word 模板,或审阅修订记录和批注时。
技能链接
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/docx/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用我清单中的客户信息,填写这个 Word 模板中的占位符。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先检查文件,然后使用小型辅助脚本进行读取、编辑、添加批注、填写模板或检查结果。默认情况下,它会保存为新副本,而不是覆盖原文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Word documents
Use this Skill for .docx work. Preserve the user's content and formatting intent, and make the smallest change that satisfies the request.
Start here
Call skill_view for this Skill before using its resources. It returns baseDirectory; every bundled helper below lives under <baseDirectory>/scripts.
Default to a new output file. Replace the input only when the user explicitly asks for an in-place edit. Before changing a document, inspect it with docx_read.py and keep a recoverable original.
Core dependency:
python3 -m pip install python-docx lxml
Do not install dependencies silently. Check availability first and explain any missing dependency that blocks the task.
Helpers
- docx_read.py: extract paragraphs, headings, tables, links, comments, headers, footers, and document metadata.
- docx_create.py: create a document from structured JSON.
- docx_edit.py: perform targeted text, paragraph, table, image, header, and footer edits.
- docx_template.py: inspect placeholders and populate a template.
- docx_comments.py: add, list, or remove comments.
- docx_revisions.py: inspect, accept, or reject tracked revisions.
- docx_validate.py: validate the resulting package and report structural problems.
Run helpers with terminal_exec, passing python3 as the command and arguments as an array. Use --help when a helper's exact arguments are unclear.
python3 <baseDirectory>/scripts/docx_read.py input.docx --json
python3 <baseDirectory>/scripts/docx_create.py spec.json -o output.docx
python3 <baseDirectory>/scripts/docx_edit.py input.docx edits.json -o output.docx
python3 <baseDirectory>/scripts/docx_validate.py output.docx
For tracked changes and comments, read references/revisions-and-comments.md through skill_view before editing them.
Workflow
- Inspect the source document and identify the exact sections to preserve or change.
- Build a structured specification or edit plan. Do not approximate names, numbers, dates, citations, or legal wording.
- Generate or edit a new .docx.
- Run docx_validate.py.
- When layout matters, convert the result to PDF with LibreOffice if available, render the relevant PDF pages with the bundled pdf Skill, and inspect the images with view_image. Check clipping, page breaks, tables, headers, footers, and image placement.
- Return the final absolute path and summarize material changes.
If LibreOffice is unavailable, still perform structural validation and clearly state that visual rendering was not available.
Safety
- Never discard comments or tracked revisions unless the user requested that operation.
- Treat accept-all/reject-all revisions and remove-all comments as destructive transformations; confirm the intended scope when it is ambiguous.
- Do not execute macros or embedded objects.
- Avoid copying sensitive document text into external services unless the user requested a workflow that requires it.
常见问题
它会覆盖我的原始文件吗?
不会。默认情况下它处理的是新的输出文件,只有在你明确要求时才会编辑原文件。
它能处理修订记录吗?
能。该技能包含用于检查、接受或拒绝修订的辅助工具。
它需要额外的软件吗?
它需要 python-docx 和 lxml Python 包,智能体会在开始前检查这些包是否已安装。
详情
作者的原始描述
Create, inspect, edit, validate, and visually verify Microsoft Word .docx documents, including templates, comments, tracked revisions, tables, images, headers, and footers.
repo: EKKOLearnAI/ekko-studio
热度
- GitHub 星标
- 12k
- 排名
- #11564
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
1password
12k帮你的智能体使用 1Password CLI 为命令和配置文件获取机密信息,同时不在聊天、日志或已保存的文件中显示这些信息。
apple-notes
12k帮你的智能体在 Mac 上使用 memo 命令行工具创建、搜索、阅读、编辑、移动或删除 Apple 备忘录。
apple-reminders
12k帮你的智能体在 Mac 上使用 remindctl 工具列出、创建、编辑、完成或删除 Apple 提醒事项及提醒列表。
document-to-action-items
12k帮你的智能体把文档、会议记录或一组笔记,整理成一张清晰的任务、负责人、截止日期和决定的表格。