From legal-skills
Converts Markdown documents to professionally formatted Word documents with Chinese typography standards. Supports multiple presets (academic, legal, report) and custom configuration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/legal-skills:md2wordThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
将 Markdown 文档转换为符合中文排版标准的 Word 文档。支持完整的 Markdown 语法,自动应用专业格式设置。
CHANGELOG.mdREADME.mdassets/config-template.yamlassets/presets/academic.yamlassets/presets/legal.yamlassets/presets/minimal.yamlassets/presets/report.yamlassets/presets/service-plan.yamlassets/theme-notes/academic.mdassets/theme-notes/law-firm.mdassets/theme-notes/minimal.mdassets/theme-notes/report.mdassets/theme-notes/service-plan.mdassets/theme-notes/tech-doc.mdreferences/config-reference.mdreferences/examples.mdreferences/style-mappings.mdscripts/chart_handler.pyscripts/config.pyscripts/extract_template_config.py将 Markdown 文档转换为符合中文排版标准的 Word 文档。支持完整的 Markdown 语法,自动应用专业格式设置。
pip install python-docx Pillow beautifulsoup4 PyYAML
npm install -g @mermaid-js/mermaid-cli
主转换脚本:scripts/md2word.py
# 基本转换
python scripts/md2word.py input.md output.docx
# 使用预设格式
python scripts/md2word.py input.md --preset=academic
# 使用自定义配置
python scripts/md2word.py input.md --config=my-config.yaml
预设信息从 YAML 文件动态读取,运行以下命令查看完整列表:
python scripts/config.py --list
常用预设:
完整配置见
assets/presets/*.yaml,设计说明见assets/theme-notes/
复制配置模板并修改:
cp assets/config-template.yaml my-config.yaml
将 .docx 模板放入 assets/templates/ 目录,或使用 --template 指定。
Word 模板 vs 配置文件:
md2word/
├── SKILL.md # 本文档
├── CHANGELOG.md # 版本记录
├── references/ # 参考文档
│ ├── config-reference.md
│ ├── style-mappings.md
│ └── examples.md
├── scripts/ # 转换脚本
│ ├── md2word.py # 主脚本
│ ├── config.py # 配置模块(含 --list 查看预设)
│ ├── extract_template_config.py # 从 Word 模板提取配置
│ ├── formatter.py # 文本格式化模块
│ ├── table_handler.py # 表格处理模块
│ └── chart_handler.py # 图表渲染模块
└── assets/ # 资源文件
├── presets/ # YAML 预设配置
├── theme-notes/ # 预设设计说明文档
├── templates/ # Word 模板文件
└── config-template.yaml
npx claudepluginhub cat-xierluo/legal-skills --plugin transcription-correctorConverts Markdown to professionally styled DOCX files with python-docx. Handles CJK/Latin mixed text, tables, code blocks, blockquotes, cover pages, TOC, watermarks, and page numbers. Supports multiple color themes.
Converts markdown files to professional Word DOCX format using pandoc. Supports single files, glob patterns, and custom output directories via /convert.
Converts Markdown documents into professionally styled PDF whitepapers with Apple design aesthetic. Supports full Markdown syntax, auto-generated covers and tables of contents, and handles WebP images.