Skip to content
Skills Library
Documents & office · Conversion & formats

docx-delivery

/docx-delivery

把 Markdown/文本/报告/任务书转换成可编辑的 Word(.docx) 成品并做实际验证。适用:Markdown 转 DOCX;生成 Word 报告;将文本任务书/文档转换为 Word;生成带标题、表格、列表或图片的可编辑 Word。用户要求交付 Word/docx/文档成品时使用。不绑定任何具体项目。

Licence
MIT
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
4
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 4 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/md2docx.py, scripts/md2docx_img.py, scripts/md2docx_one.py, scripts/validate_docx.py

What it does and when to use it

把 Markdown/文本/报告/任务书转换成可编辑的 Word(.docx) 成品并做实际验证。适用:Markdown 转 DOCX;生成 Word 报告;将文本任务书/文档转换为 Word;生成带标题、表格、列表或图片的可编辑 Word。用户要求交付 Word/docx/文档成品时使用。不绑定任何具体项目。

Original author description

把 Markdown/文本/报告/任务书转换成可编辑的 Word(.docx) 成品并做实际验证。适用:Markdown 转 DOCX;生成 Word 报告;将文本任务书/文档转换为 Word;生成带标题、表格、列表或图片的可编辑 Word。用户要求交付 Word/docx/文档成品时使用。不绑定任何具体项目。

How it works

  1. 交付纪律
  2. 链路选择
  3. 验证(必做)
  4. 汇报
Original SKILL.md headings · 43 lines, 194 words
SKILL.md preview
---
name: docx-delivery
description: "把 Markdown/文本/报告/任务书转换成可编辑的 Word(.docx) 成品并做实际验证。适用:Markdown 转 DOCX;生成 Word 报告;将文本任务书/文档转换为 Word;生成带标题、表格、列表或图片的可编辑 Word。用户要求交付 Word/docx/文档成品时使用。不绑定任何具体项目。"
---

# docx-delivery:Markdown → Word 成品交付

本 Skill 里的两条转换链来自长期实战验证的原始实现(含中文样式、表格、代码块、引用、插图),已去除项目专有内容,不依赖工作区上下文。脚本位于本 Skill 的 `scripts/` 目录(以本文件所在目录为基准,下称 `scripts/`)。

## 交付纪律

- **Word 是给用户阅读的成品;Markdown 只是中间稿。** 用户要求的交付物是 Word/docx 时,不得只交付 .md 文件交差;若任务同时生成了 .md 主稿,最终仍须转出 .docx 并验证后才算完成。
- 转换后**必须实际验证**(用 `scripts/validate_docx.py`),禁止用"生成成功""看起来正常"代替验证。
- 转换脚本**只读输入文件**,不修改源 Markdown;输出位置显式指定或与源文件同目录。
- **脚本级防覆盖(硬保护)**:目标输出路径已存在同名文件时,脚本默认**拒绝覆盖并以非 0 退出**,错误信息注明目标已存在。需要换名时由 Agent 自行选择新的非冲突路径后重新调用;确需覆盖既有文件时必须显式传 `--overwrite`(此时覆盖是有意为之的决策,仍需在回报中说明)。
- 内容保真与对外成稿润色区分:
  - **既有文本原样转换**:当用户提供已定稿的 `.md` / 文本仅要求转成 Word 时,转换器严格保持文本逐字不变(只做排版渲染),不混入改写。
  - **Agent 撰稿的对外文档交付(含 `Gemini 4 Carbon` 生成主稿)**:当文档内容由 Agent(尤其是推理密度高但文风偏冷硬的 `Gemini 4 Carbon`)起草或整理时,在调用转换脚本生成终版 `.docx` **之前**,默认先串联 [`humanizer-zh`](../../../humanizer-zh/skills/humanizer-zh/SKILL.md)(或交由 `Gemini 4 Argon` 终审润色)去除空话、模板腔与机械三连排比,待 `.md` 主稿润色定稿后再执行 `.md → .docx` 转换与 `validate_docx.py` 校验。

## 链路选择

| 场景 | 用法 |
| --- | --- |
| 纯文本类 md(标题/段落/表格/列表/引用/代码块/分隔线) | `python scripts/md2docx_one.py <输入.md> [输出.docx] [--overwrite]`(纯标准库,任何 Python 3 可跑,无第三方依赖) |
| md 中含 `[[IMG:相对路径|图注]]` 标记的插图文档 | `python scripts/md2docx_img.py <输入.md> <输出.docx> [--overwrite]`(需 python-docx + Pillow;图片按宽度自动分档 12/9/7 cm 居中,图注 9pt 灰字) |

两个转换入口默认**拒绝覆盖已存在的输出文件**(非 0 退出);仅显式 `--overwrite` 时放行。

- 带表格/图片需求:表格两条链都支持;**图片只有 `md2docx_img.py` 支持**(先在 md 中写 `[[IMG:图片路径|图注]]` 行,图片路径相对 md 所在目录)。
- 转换器不支持的 md 语法(如 HTML 块、脚注、任务列表)会被当普通段落渲染,不会报错;交付前用验证器确认结构符合预期。
- 中文字体已内置(正文宋体 10.5pt、标题黑体、代码 Consolas),无需额外配置。

## 验证(必做)

```
python scripts/validate_docx.py <成品.docx> [probe词文件.txt] [--min-paras N] [--min-tables N] [--min-imgs N]
```

- 基础验证(无参数):zip 完整性、全部 XML 可解析、正文/段落/表格/图片统计。
- 结构门槛:确认产物应含表格时加 `--min-tables 1`;含图加 `--min-imgs 1`;正文非空加 `--min-paras 5`。
- 内容保真抽查:把源 md 中的关键句/关键数字写进 probe 词文件传入,验证器逐词确认未丢失(推荐 5-10 个探针词)。
- 退出码 0 = 通过;非 0 = 必须修复后重转,不得交付未通过验证的成品。

## 汇报

交付时报告:输出文件绝对路径、文件大小、验证器输出的结构统计与 probe 结果、源文件未修改。
Files in this package (5)
  • SKILL.md 4 KB
  • scripts/md2docx.py 11 KB
  • scripts/md2docx_img.py 5 KB
  • scripts/md2docx_one.py 3 KB
  • scripts/validate_docx.py 3 KB

Versions

The database has no other skills named docx-delivery.

Database snapshot: 13.11.2026 · package version a58f712bec9e (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95Docx
    Word document processing. USE WHEN docx, Word document. SkillSearch('docx') for docs.
  • 100docx-convert
    [Document Processing] Use when converting between Word DOCX and Markdown (GFM, math rendering). --to={markdown|docx}.
  • 100word-read-write
    Create and read Microsoft Word (.docx) documents. Use this skill when you need to generate reports/letters/templates as .docx or extract readable text from existing .docx files.
  • 100docx-generator
    Create, read, and edit Word (.docx) files - styles, tables, images, headers, and templates - using python-docx. Use whenever a deliverable must be a Word document.
  • 95Docx
    Word document processing. USE WHEN docx, Word document. SkillSearch('docx') for docs.
  • 95doc-to-markdown
    Doc to Markdown - convert Word (.doc/.docx) documents to clean Markdown using MinerU. Use when converting Word files to Markdown for reading or editing.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.