跳到正文
Skillpedia
PDF、Word 与幻灯片12k · #11564

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/docx/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Inspect the source document and identify the exact sections to preserve or change.
  2. Build a structured specification or edit plan. Do not approximate names, numbers, dates, citations, or legal wording.
  3. Generate or edit a new .docx.
  4. Run docx_validate.py.
  5. 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.
  6. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能