AGENT SKILL
doc_export_skill
Export solution content to a standard Word document (.docx). Use when the user says '输出word文档' / '导出Word' / '生成Word' / '下载Word'. Call generate_word_document with the current solution content, client name, and optional date.
- License 许可
- MIT
- 最近更新
- 2026-03-10
- Stars
- ★ 5
- Forks
- 2
01 前言 Front Matter
- name
- doc_export_skill
- description
- Export solution content to a standard Word document (.docx). Use when the user says '输出word文档' / '导出Word' / '生成Word' / '下载Word'. Call generate_word_document with the current solution content, client name, and optional date.
02 资源文件 2
- 脚本scripts/generate-docx.mjs4.6 KB
- 脚本scripts/tools.ts4.2 KB
03 SKILL.md 正文
Doc Export Skill(Word 文档导出)
当用户要求输出/导出/生成/下载 Word 文档时,调用 generate_word_document 工具,将当前会话中已生成的解决方案正文渲染为规范 .docx 文件。
何时使用
- 用户说:「输出word文档」「导出Word」「生成Word」「下载Word」「给我一份Word」等。
- 当前对话中已有完整或可用的解决方案正文(六章结构),且已知客户名称(可从需求或用户输入中获取)。
工具
| 工具 | 说明 |
|---|---|
| generate_word_document | 将方案正文(content)、客户名称(clientName)、日期(可选)写入标准 .docx,文件命名:解决方案_客户名称_日期.docx,返回生成文件的路径供下载。 |
参数
- content(必填):完整解决方案正文,建议为 Markdown 格式(含 # / ## / ### 标题与段落),与 document-structure 六章结构一致。
- clientName(必填):客户名称,用于文件名与封面。
- date(可选):日期,格式 YYYYMMDD;不传则使用当前日期。
- outputDir(可选):输出目录绝对路径;不传则使用当前工作目录。
流程
- 用户提供需求 → Agent 立即生成解决方案正文(六章)。
- 用户说「输出word文档」→ Agent 调用 generate_word_document,传入完整方案 content、客户名、日期。
- 工具返回生成文件的路径 → Agent 告知用户文件路径或下载方式。
故障排查
- 导出失败 / Cannot find module 'docx':在 solution_agent 目录下执行
npm install安装 docx 依赖后再试。 - 内容不完整:导出前确保方案正文已生成完整(六章及全部小节),勿传入被截断的 content。
04 同仓库更多 Skills
valid-skill
A valid skill for testing purposes.
★ 5
different-name
Name does not match parent directory.
★ 5
missing-description
暂无简介
★ 5
disable-model-invocation
Skill with disable-model-invocation true.
★ 5
web_skill
Fetch URL content or search the web. Use web_fetch for a known URL; use web_search when you need to find current information.
★ 5
todo_skill
会话内待办列表。复杂任务先拆成 todowrite,执行中用 todoread 查看、用 todowrite 更新状态(in_progress/completed),与 OpenCode 任务管理一致。
★ 5