2word - Markdown转Word工具
Documentation community intermediate
Description
将Markdown文档转换为Word格式(docx),支持自定义格式配置。
Installation
Terminal
claude install-skill https://github.com/cat-xierluo/SuitAgent README
2word - Markdown转Word工具
将Markdown文档转换为Word格式(docx),支持自定义格式配置。
代码来源
本转换工具基于用户提供的 `md2word.py` 代码,该代码是经过测试的完整实现,包含:
- undefined
使用方法
基础转换
/2word input.md output.docx
指定格式转换
/2word --format=格式名称 input.md output.docx
使用预设格式
/2word --format=legal-standard input.md output.docx # 法律文书标准格式
/2word --format=simple input.md output.docx # 简化格式
/2word --format=default input.md output.docx # 默认格式
自定义格式
/2word --format=my-custom input.md output.docx # 使用自定义格式
支持的格式
1. default (默认格式)
- undefined
2. legal-standard (法律文书标准格式)
- undefined
3. simple (简化格式)
- undefined
4. 自定义格式
- undefined
格式配置说明
配置文件位置
所有格式配置存储在 `.claude/memory/docxformats/` 目录中:
.claude/memory/docxformats/
├── default.md # 默认格式
├── legal-standard.md # 法律文书标准格式
├── simple.md # 简化格式
├── custom-template.md # 自定义模板
└── my-custom.md # 您的自定义格式(需要您创建)
自定义格式创建步骤
步骤1: 复制模板
cp .claude/memory/docxformats/custom-template.md .claude/memory/docxformats/my-format.md
步骤2: 修改配置
编辑 `my-format.md`,根据您的喜好调整:
- undefined
步骤3: 使用自定义格式
/2word --format=my-format input.md output.docx
格式配置内容
每个格式配置文件包含:
- undefined
使用示例
转换法律文书
# 使用法律文书标准格式
/2word --format=legal-standard 起诉状.md 起诉状.docx
/2word --format=legal-standard 答辩状.md 答辩状.docx
# 简化法律文书(快速草稿)
/2word --format=simple 起诉状草稿.md 起诉状草稿.docx
转换工作文档
# 使用默认格式
/2word 案件分析报告.md 案件分析报告.docx
# 使用简化格式(快速笔记)
/2word --format=simple 工作记录.md 工作记录.docx
转换自定义格式
# 首先创建自定义格式配置文件
# 然后使用该格式
/2word --format=my-style 研究报告.md 研究报告.docx
功能特性
支持的Markdown元素
- undefined
转换特性
- undefined
中文支持
- undefined
高级用法
批量转换
虽然命令本身不支持批量转换,但可以结合shell命令:
for file in *.md; do
/2word --format=legal-standard "$file" "${file%.md}.
Related Skills
Official Skills Repository Issues
Claude Documentation
Documentation community Doc Co-authoring
When user wants to write documentation, proposals, technical specs, decision docs, or similar structured contentGuide users through structured workflow for co-authoring documentation
Documentation official Docx
When user mentions Word doc, .docx, or requests professional documents with formattingCreate, edit, and analyze Word documents with tracked changes, comments, and formatting
Documentation official Extract text, create PDFs, merge/split documents, and handle forms
Documentation official Pptx
When a .pptx file is involved in any way, or user mentions deck, slides, or presentationCreate, edit, and analyze PowerPoint presentations with layouts and templates
Documentation official Xlsx
When a spreadsheet file is the primary input or output (.xlsx, .xlsm, .csv, .tsv)Create, edit, and analyze Excel spreadsheets with formulas, formatting, and visualization
Documentation official