/install 8917-docx-official
8917-docx-official
定位
这是一个 工具型 / Generator skill。
它只负责一件事:
- 把已有内容转换为符合公文/正式格式要求的
.docx文档
它不是内容策划器,不负责采访补全,不负责审批流。
输入与输出
输入
- Markdown 文件
- 或已整理好的文本内容(建议先保存为
.md)
输出
.docx- 如用户明确需要,也可输出
.pdf
核心工作流
Step 1:确认输出格式
如果用户已经明确说了 .docx / .pdf / 两者都要,直接继续。
如果没说清,先确认:
- 只要
.docx - 只要
.pdf - 两者都要
Step 2:整理 Markdown
按以下规则准备输入内容:
- 标题不要手写编号(不要写
## 一、xxx) - 用 Markdown 层级控制公文标题层级
- 正文正常书写
Step 3:必要时读取格式规则
如果需要确认标题层级、公文排版细节或参数,读取:
references/official-format-rules.md
Step 4:执行转换脚本
调用:
scripts/md2docx.py
常见用法:
python scripts/md2docx.py input.md -o output.docx
输出 PDF:
python scripts/md2docx.py input.md -o output.pdf --pdf
同时输出 docx 和 PDF:
python scripts/md2docx.py input.md -o output.docx --pdf
Step 5:返回结果
返回:
- 输出文件路径
- 如转换失败,明确报错原因
Markdown 层级映射
| Markdown | 公文层级 | 自动编号示例 |
|---|---|---|
# |
文档标题 | 居中标题 |
## |
一级标题 | 一、主要任务 |
### |
二级标题 | (一)重点工作 |
#### |
三级标题 | 1.具体事项 |
##### |
四级标题 | (1)实施步骤 |
| 普通段落 | 正文 | - |
关键约束
- 名称固定为
8917-docx-official,这是唯一正式入口。 - 原
docx-official的有效实现应吸收入本 skill。 - 输出路径必须支持
-o参数,不允许硬编码到其他节点目录。 - 如果需要查看格式细节,读 references,不要把大段规范塞进
SKILL.md。
一句话原则
已有内容先整理成 Markdown,再交给 8917-docx-official 转成正式格式 docx。
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install 8917-docx-official - After installation, invoke the skill by name or use
/8917-docx-official - Provide required inputs per the skill's parameter spec and get structured output
What is 8917 DOCX Official?
将 Markdown 或其他已有内容转换为符合中国党政机关公文/正式文件格式的 `.docx` 文档;需要时也可输出 PDF。适用于:生成公文、报告、方案、通知、汇报、意见、纪要等正式文档,或用户要求把 Markdown/文本内容排版为公文格式 Word。触发词:公文格式、正式文件、官方格式、转成 docx、公文... It is an AI Agent Skill for Claude Code / OpenClaw, with 137 downloads so far.
How do I install 8917 DOCX Official?
Run "/install 8917-docx-official" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 8917 DOCX Official free?
Yes, 8917 DOCX Official is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 8917 DOCX Official support?
8917 DOCX Official is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 8917 DOCX Official?
It is built and maintained by 叶澄风 (@blicae8917); the current version is v0.1.1.