← 返回 Skills 市场
271
总下载
0
收藏
1
当前安装
7
版本数
在 OpenClaw 中安装
/install md2docx
功能描述
Markdown 转 Word 文档(标准公文格式)。使用 Pandoc 自动转换,支持目录/宋体排版、表格自动修复。
安全使用建议
This skill appears to do what it says (convert Markdown to .docx using Pandoc then python-docx), but there are a few issues to check before you run it:
- Missing template files: SKILL.md, README, tests and PROJECT_INFO.md reference template files (e.g., tools/standard-official-template.docx) that are not present in the file manifest. Expect tests or some conversions to fail unless you provide those templates.
- Hard-coded filesystem write: tools/create_songti_template.py saves a file to a hard-coded Windows path (C:/Users/GWF/.openclaw/...). Do NOT run that script unless you review and edit the target path; it will try to write into a specific user directory and may fail or create files in unexpected places.
- Code quality oddities: the package defines custom exceptions that shadow builtin names (e.g., FileNotFoundError subclass) and tests reference helper functions (validate_pandoc_available) that should be confirmed present. These are quality/maintenance issues rather than clear signs of malice.
- No network/exfiltration observed: there are no HTTP calls or external endpoints in the provided files. The only external dependency is the pandoc binary invoked via subprocess; that invocation is expected for the stated purpose.
Recommended actions before installing/using:
1. Inspect and/or supply the missing template(s) referenced by README/tests or remove template references if not needed.
2. Search for any other hard-coded absolute paths and edit them to safe, relative or configurable locations.
3. Run the conversion tools in a sandbox or non-production environment first (ensure Pandoc is installed and on PATH). 4. If you plan to run the auxiliary template-creation script, modify its output path to a directory you control and inspect the generated file before using it.
5. If you need higher assurance, run the included tests in an isolated environment and review the rest of the code (especially the truncated portion of md2docx.py) for any unexpected behavior.
Overall: functional and plausibly benign code, but incongruities (missing assets, hard-coded paths) make it suspicious until you verify/clean those items.
功能分析
Type: OpenClaw Skill
Name: md2docx
Version: 1.0.6
The md2docx skill is a legitimate utility for converting Markdown files to Word documents using Pandoc and the python-docx library. Analysis of the core logic in tools/md2docx.py and the instructions in SKILL.md shows no evidence of data exfiltration, malicious execution, or prompt injection. While tools/create_songti_template.py contains a hardcoded absolute path specific to the developer's environment (C:/Users/GWF/...), and there is a minor code inconsistency in the root test_md2docx.py (referencing a non-existent class), these appear to be unintentional development artifacts or bugs rather than malicious intent.
能力评估
Purpose & Capability
Name/description align with the included code: tools/md2docx.py implements a two-stage Pandoc → python-docx workflow and the SKILL.md lists the same dependencies. However the repository claims/uses template files (e.g. tools/standard-official-template.docx and a standard public-office template) that are referenced by tests and PROJECT_INFO.md but are NOT present in the provided file manifest. That mismatch (expected template asset missing) is a functional/integrity inconsistency.
Instruction Scope
SKILL.md instructs only to run the converter and requires Pandoc/python-docx (scope-appropriate). But the code base contains an auxiliary script (tools/create_songti_template.py) that writes a template to a hard-coded absolute path (C:/Users/GWF/.openclaw/...) when executed. The documentation does not mention this write-to-absolute-path behavior. There are no network calls or obvious exfiltration, but the hard-coded filesystem write and mismatch between described/expected assets (templates) are unexpected and should be noted.
Install Mechanism
No install spec (instruction-only), no downloads or remote installers in the manifest. This minimizes installation-time risk. Dependencies are external system packages (Pandoc) and a Python package (python-docx) that the SKILL.md correctly documents.
Credentials
The skill requests no environment variables or credentials. The functionality (local file conversion) does not need secrets, so the lack of env/credential requests is proportionate.
Persistence & Privilege
Skill is not always-enabled and does not attempt to modify other skills or system-wide configurations. The only persistence-like behavior is scripts that may write template files to disk if explicitly run (e.g., create_songti_template.py); this is not automatic but should be considered before execution.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install md2docx - 安装完成后,直接呼叫该 Skill 的名称或使用
/md2docx触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.6
md2docx 1.0.6
- Added comprehensive docstrings, type annotations, and improved adherence to PEP 8.
- Improved error messages with practical suggestions.
- Enhanced testing: new and boundary test cases introduced.
- Improved automatic setting of Chinese fonts in output.
- Table border rendering further optimized for consistency.
- Documentation updated and test script added.
v1.0.5
修复表格格式问题(粗体后表格识别),默认宋体模板,新增 --no-template 参数
v1.0.4
更新作者信息为小莫,修复中文字体和表格边框问题
v1.0.3
修复中文字体和表格边框问题:引入两阶段转换方案(Pandoc + python-docx 后处理),标题微软雅黑,正文宋体,表格自动黑色边框
v1.0.2
修复中文字体和表格边框问题:1. 引入两阶段转换方案(Pandoc + python-docx 后处理)2. 标题使用微软雅黑,正文使用宋体 3. 表格自动添加黑色边框 4. 解决 MS Gothic 字体回退问题
v1.0.1
- 更新了技术支持邮箱地址:由 [email protected] 改为 [email protected]
- 其余内容保持不变
v1.0.0
- 首次发布 md2docx 工具:实现 Markdown 一键转换为标准公文 Word 文档(.docx)。
- 支持自动生成目录、页眉页脚、中文标准字体和行距、A4 纸张等标准公文排版。
- 提供批量转换、自定义模板、不生成目录等参数选项。
- 输出 Word 文档可直接用 Word/WPS 打开编辑。
- 适用于技术报告、方案文档、会议纪要、合同等场景。
元数据
常见问题
Md2docx 是什么?
Markdown 转 Word 文档(标准公文格式)。使用 Pandoc 自动转换,支持目录/宋体排版、表格自动修复。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 271 次。
如何安装 Md2docx?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install md2docx」即可一键安装,无需额外配置。
Md2docx 是免费的吗?
是的,Md2docx 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Md2docx 支持哪些平台?
Md2docx 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Md2docx?
由 sukimgit(@sukimgit)开发并维护,当前版本 v1.0.6。
推荐 Skills