By cp-yu
Export Markdown files to Word (.docx) using a Windows + Microsoft Word pipeline, with support for templates, LaTeX-to-Office Math conversion, Mermaid diagrams, and academic paper styling.
这是一个用于分享 .claude 自定义 skill 的仓库。它提供了一个名为 md2word 的 skill,用于在 Windows 环境下把 Markdown 稳定转换为 Word 文档,并支持模板复用、Markdown 图片/表格、标题导航与公式后处理。
现在这个仓库同时具备两种分发形态:
.claude/skills/md2word.claude-plugin/marketplace.json 和 .claude-plugin/plugin.json 安装核心链路很直接:
Markdown -> MHT -> DOCX -> WordMath DOCX
.mht 模板、先把 .docx 模板归一化成 .mht,或根据模板规格 / 文字描述生成可复用模板。PAGE/NUMPAGES 页脚布局,避免页码和总页数被拆成两段。cases 等块公式归一化。default 和 academic-paper 两套样式,可同时影响模板生成和正文渲染。.mht 模板,想把 Markdown 内容灌进去.docx 模板,想复用已有 Word 样式$...$ 或 $$...$$ LaTeX 公式,想交给 Word 转成 Office Math实际 skill 内容放在隐藏目录里:
.claude-plugin/
├── marketplace.json
└── plugin.json
.claude/
└── skills/
└── md2word/
├── SKILL.md
├── agents/
├── resources/
└── scripts/
其中:
.claude-plugin/marketplace.json:Claude Code marketplace 清单,发布本仓库内的 md2word plugin.claude-plugin/plugin.json:plugin manifest,声明插件元数据并把 skill 路径指向 ./.claude/skills/.claude/skills/md2word/SKILL.md:skill 入口说明.claude/skills/md2word/scripts/:PowerShell 与 Python 脚本.claude/skills/md2word/resources/:默认模板、样式预设与模板规格参考这个 skill 默认面向 Windows,依赖也不隐藏:
mmdc,或允许通过 npx 调起 Mermaid CLI如果这些条件不满足,就不要假设最终 .docx 和公式转换还能“自动补齐”。
这个仓库根目录现在既是 marketplace 仓库,也是 md2word plugin 的根目录。发布到 GitHub 后,可以直接添加 marketplace:
/plugin marketplace add cp-yu/md2word
/plugin install md2word@cp-yu-md2word
如果你更习惯 CLI,也可以用:
claude plugin marketplace add cp-yu/md2word
claude plugin install md2word@cp-yu-md2word
本地调试时也可以直接把当前仓库作为本地 marketplace:
/plugin marketplace add .
/plugin install md2word@cp-yu-md2word
安装后,Claude Code 会从 plugin manifest 暴露出的 ./.claude/skills/ 目录发现 md2word skill。
如果你不走 plugin marketplace,也可以继续直接复制:
<your-project>/.claude/skills/md2word
最简单的做法就是复制本仓库的:
.claude/skills/md2word
复制完成后,Claude / Codex 在匹配到相关任务时就可以加载这个 skill。
默认入口是:
.claude\skills\md2word\scripts\md2word.cmd --input disclosure.md
使用 .mht 模板:
.claude\skills\md2word\scripts\md2word.cmd `
--input disclosure.md `
--template-mht custom-template.mht `
--template-report template_inference_report.md
使用 .docx 模板:
.claude\skills\md2word\scripts\md2word.cmd `
--input disclosure.md `
--template-docx contract-template.docx `
--template-out contract-template.normalized.mht
根据模板描述先生成模板再转换:
.claude\skills\md2word\scripts\md2word.cmd `
--input disclosure.md `
--template-spec template-spec.md `
--template-out generated-template.mht
常见输出包括:
<input>.mht<input>.docx<input>.wordmath.docx--template-out 指定的归一化模板或生成模板--template-report 指定的模板推断报告.mht、.docx、模板描述三种输入之间分流**标题:** 示例文档 和 标题: 示例文档 两种写法。标题 / 题目 / 主题 取值,没有时再回退到 发明名称 / 项目名称。$...$,行间公式保持 $$...$$。。# 标题,正文也能被正确识别。mmdc,或允许通过 npx 调起 Mermaid CLI。--template-report 检查。MIT,见 LICENSE。
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub cp-yu/md2word --plugin md2wordDocument processing suite — Excel (xlsx), Word (docx), PowerPoint (pptx), and PDF generation and manipulation.
Memory compression system for Claude Code - persist context across sessions
Create and edit Obsidian vault files including Markdown, Bases, and Canvas. Use when working with .md, .base, or .canvas files in an Obsidian vault.
Editorial "Web Designer" bundle for Claude Code from Antigravity Awesome Skills.
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Frontend design skill for UI/UX implementation