Borrowing it
Nothing to install: this file belongs to cp-yu/md2word. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cp-yu/md2word/main/.claude/skills/md2word/SKILL.mdgit clone --depth 1 https://github.com/cp-yu/md2wordWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cp-yu/md2word/md2word)<a href="https://agentmods.dev/skills/cp-yu/md2word/md2word"><img src="https://agentmods.dev/badge/skills/cp-yu/md2word/md2word.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00115 | $0.02233 |
| Opus 5 | $0.00057 | $0.01117 |
| Sonnet 5 | $0.00023 | $0.00447 |
| Haiku 4.5 | $0.00012 | $0.00223 |
Grade A, and why
md2word scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.
md2word
目标:
Markdown -> MHT -> DOCX -> WordMath DOCX
这个 skill 默认面向 Windows 直接运行。内置模板只是 fallback,不要把它理解成“只能导出专利交底书”。
入口判断
- 用户已经给了
.mht模板 - 用户已经给了
.docx模板,希望复用现有 Word 样式 - 用户没有模板文件,只有一段“模板长什么样”的文字描述
- 用户要求论文格式、标题字号、行距、封面结构等版式约束
- Markdown 里有
$...$、$$...$$、Mermaid 代码块,且最终必须落到 Word
环境要求
- 在 Windows 中运行
- PowerShell 可用
- Windows 桌面版 Microsoft Word 已安装,且 COM 可用
- Python 3 可通过
py -3、python或python3调起 - 代码块语法高亮默认依赖 Python
pygments;未安装时自动回退为可编辑纯文本代码块 - 如果 Markdown 含 Mermaid:
- 优先复用本机已有
mmdc - 否则允许
npx -p @mermaid-js/mermaid-cli mmdc - 首次
npx兜底可能需要联网下载
- 优先复用本机已有
输入约定
- 行内公式保持
$...$ - 行间公式保持
$$...$$ - 本地图片使用标准 Markdown 语法:
 - 标准 Markdown 表格会被渲染成 Word 表格
- Markdown 头字段支持两种写法:
**标题:** 示例文档标题: 示例文档
- 如果字段区后紧跟空行或
# 标题,正文也会被正确识别,不要求一定写--- - 标题优先从
标题/题目/主题取值;没有时再回退到发明名称/项目名称 - 正文 Markdown 标题会映射为 Word 正文标题层级,可在导航窗格中看到
- 默认只有正文章节标题进入导航;封面或文档主标题不进入导航
- 已显式写出的标题编号会保留;只有无编号标题才会做最小自动补号
工作流
- 按模板来源三选一分流:
.mht:直接使用.docx:先归一化导出为.mht- 模板规格/文字描述:先生成可复用
.mht
- 用
render_mht.py把 Markdown 填进模板。 - 调 Windows Word 打开 MHT,另存成
.docx。 - 在 Word 内把 LaTeX 文本转换成 Office Math,输出
.wordmath.docx。
模板与样式
- 如果用户给模板文件,优先复用模板,不要重造
- 如果用户只给一句模板描述,先写成
template-spec.md再传给--template-spec - 模板规格参考:
resources/template-spec.md - 当前内置样式预设:
defaultacademic-paper
- 静态模板、模板规格和样式预设统一放在
resources/ - 用户明确给出论文标题字号、标题层级、正文行距时,优先:
- 在模板规格里写
style-preset: academic-paper - 调用时再显式传
--style-preset academic-paper
- 在模板规格里写
正文插入策略
- 如果模板里有
{{CONTENT}}或<!--MD_CONTENT-->,优先按占位符替换 - 如果模板里有
{{METADATA_TABLE}},会把 Markdown 头字段渲染成信息表 - 如果模板里已有表格标签,例如
项目名称、电话、版本,会按行标签尝试填值 - 如果没有显式占位符,会推断
WordSection,优先替换最后一个正文 section - 推断过程可通过
--template-report输出报告
命令
使用内置默认模板:
<skill-dir>\scripts\md2word.cmd `
--input disclosure.md
使用模板规格生成模板:
<skill-dir>\scripts\md2word.cmd `
--input example.md `
--template-spec template-spec.md `
--template-out generated-template.mht `
--template-report template-report.md
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 319 B
- resources/style-presets.json 2.4 KB
- resources/template-spec.md 2.3 KB
- resources/专利交底书模板.mht 137 KB
- scripts/generate_template_mht.py 8.2 KB runs code
- scripts/md2word.cmd 595 B runs code
- scripts/md2word.ps1 2.4 KB runs code
- scripts/md2word.py 20 KB runs code
- scripts/pipeline_common.py 3.4 KB runs code
- scripts/render_mht.py 58 KB runs code
- scripts/style_presets.py 966 B runs code
- scripts/word_common.ps1 1.2 KB runs code
- scripts/word_mht_pipeline.ps1 13 KB runs code
- scripts/word_template_to_mht.ps1 889 B runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 187 lines · 115 tokens per session scan A 1f35ddbe03ec
md2word is a skill published in the GitHub repository cp-yu/md2word (14 stars, last pushed 2mo ago), licensed MIT. It adds 115 tokens to every session and 2,233 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other skills, from other repositories
pydicom
Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.
skill-doc-delivery
Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.
pdf-extract-create-workflow
Complete PDF lifecycle: download, extract, and generate structured documents with reportlab.
document-direct-python
Use direct Python execution for reliable document creation including spreadsheets, PDFs, and structured reports.
pdf-verification-cli
Verify PDF page count and content using command-line tools when Python libraries unavailable.