← Back to Skills Marketplace
271
Downloads
0
Stars
1
Active Installs
7
Versions
Install in OpenClaw
/install md2docx
Description
Markdown 转 Word 文档(标准公文格式)。使用 Pandoc 自动转换,支持目录/宋体排版、表格自动修复。
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install md2docx - After installation, invoke the skill by name or use
/md2docx - Provide required inputs per the skill's parameter spec and get structured output
Version History
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 打开编辑。
- 适用于技术报告、方案文档、会议纪要、合同等场景。
Metadata
Frequently Asked Questions
What is Md2docx?
Markdown 转 Word 文档(标准公文格式)。使用 Pandoc 自动转换,支持目录/宋体排版、表格自动修复。 It is an AI Agent Skill for Claude Code / OpenClaw, with 271 downloads so far.
How do I install Md2docx?
Run "/install md2docx" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Md2docx free?
Yes, Md2docx is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Md2docx support?
Md2docx is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Md2docx?
It is built and maintained by sukimgit (@sukimgit); the current version is v1.0.6.
More Skills