← 返回 Skills 市场
joecao

Joe's Markdown to DOCX Converter

作者 zupeng · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
289
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install joe-markdown-to-docx
功能描述
Convert Markdown files to fully formatted Word DOCX documents with support for tables, images, code blocks, and GitHub Flavored Markdown features.
使用说明 (SKILL.md)

Markdown to DOCX Converter

Convert Markdown documents to professional Word DOCX format with full formatting preservation.

Features

  • Complete Markdown support: Headers, paragraphs, lists, code blocks
  • Tables: Full table support with alignment (left/center/right)
  • Images: Local files, remote URLs, and data URLs
  • Text formatting: Bold, italic, inline code, links
  • Code blocks: Syntax-highlighted with borders and background
  • GFM support: GitHub Flavored Markdown extensions

Installation

After installing this skill, run:

cd ~/.openclaw/workspace/skills/markdown-to-docx
npm install

All dependencies are pure JavaScript and work on Windows, macOS, and Linux.

Usage

Convert a Markdown file to DOCX:

node scripts/convert.js \x3Cinput.md> [output.docx]

Examples

# Convert with auto-generated output name
node scripts/convert.js document.md

# Specify output filename
node scripts/convert.js document.md report.docx

# Convert from current directory
node scripts/convert.js ./README.md ./README.docx

Supported Markdown Features

Text Formatting

  • Bold: **text** or __text__
  • Italic: *text* or _text_
  • Inline code: `code`
  • Links: [text](url)

Tables

| Header 1 | Header 2 | Header 3 |
|:---------|:--------:|---------:|
| Left     | Center   | Right    |
  • Alignment: :--- (left), :---: (center), ---: (right)
  • Header row with gray background
  • Bordered cells with padding

Images

![Alt text](path/to/image.png)
![Remote](https://example.com/image.jpg)
  • Local images: Relative paths from Markdown file location
  • Remote images: HTTP/HTTPS URLs (automatically downloaded)
  • Data URLs: Base64-encoded images
  • Auto-centered with appropriate sizing

Code Blocks

```javascript
function hello() {
  console.log("Hello!");
}
```
  • Monospace font (Consolas)
  • Light gray background
  • Border styling

Output Format

Generated DOCX files include:

  • 1-inch margins on all sides
  • Professional spacing and alignment
  • Consistent styling throughout
  • Editable in Microsoft Word, Google Docs, LibreOffice

Error Handling

  • Missing images: Shows placeholder text instead of breaking
  • Network errors: Graceful fallback with error message
  • Invalid Markdown: Skips unsupported elements

Dependencies

Automatically installed via npm install:

  • docx: Word document generation
  • unified, remark-parse, remark-gfm: Markdown parsing
  • node-fetch: Remote image downloading
安全使用建议
This skill appears to do what it claims, but take these precautions before installing or running it: - Audit dependencies (package.json / package-lock.json) before npm install to ensure you trust the packages and registry mirror. npm install will fetch code into your environment. - Run the tool in a sandboxed environment if you will convert Markdown from untrusted sources. The converter will perform HTTP requests for remote image URLs found in the Markdown; this can be used to probe internal services (SSRF) or trigger network requests you may not expect. - If using sensitive environments (cloud VMs, CI runners), avoid converting untrusted Markdown or block outbound requests during conversion. - Note the small metadata inconsistency (package.json main references main.js while the converter is scripts/convert.js); this doesn't affect running the script directly but is worth fixing. If you are comfortable auditing dependencies and controlling network access for untrusted inputs, this skill is coherent with its stated purpose.
功能分析
Type: OpenClaw Skill Name: joe-markdown-to-docx Version: 1.0.0 The skill is a legitimate Markdown to DOCX converter using well-known libraries like `docx` and `unified`. The core logic in `scripts/convert.js` correctly implements document transformation, including handling for tables, code blocks, and images (local, remote, and data URLs). While the script performs network requests to fetch images and reads local files to embed them in the output document, these actions are strictly aligned with the stated purpose and lack any indicators of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
The skill name/description (Markdown to DOCX) matches the included code (scripts/convert.js) and declared dependencies (docx, remark, node-fetch). The code reads a .md file, parses Markdown, handles tables, images, code blocks, and writes a .docx — consistent with the stated purpose.
Instruction Scope
SKILL.md instructs running npm install and node scripts/convert.js which matches the code. The converter will fetch remote images (HTTP/HTTPS) and will read local files relative to the input Markdown — expected for image support. Minor caution: fetching arbitrary image URLs means the runtime will make outbound HTTP requests for any remote URLs found in Markdown (possible SSRF/probing risk if untrusted Markdown references internal endpoints).
Install Mechanism
There is no registry install spec (instruction-only skill), but it includes source and instructs running npm install which will pull packages from npm. That is normal but means dependencies will be installed at runtime; review/verify dependencies before installing. Minor mismatch: package.json 'main' points to main.js while actual script is scripts/convert.js — harmless but an inconsistency.
Credentials
The skill requests no environment variables, no credentials, and no config paths — appropriate for a local file conversion utility.
Persistence & Privilege
Skill is not marked 'always:true' and does not request elevated or persistent platform privileges. It operates as a user-invoked CLI script and writes only the output .docx file to disk.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install joe-markdown-to-docx
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /joe-markdown-to-docx 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release by Joe Cao (v1.0.0) Features: - Convert Markdown to Word DOCX format - Full table support with alignment (left/center/right) - Image support (local files, remote URLs, data URLs) - Code blocks with syntax highlighting - Text formatting (bold, italic, inline code, links) - GitHub Flavored Markdown (GFM) support - Cross-platform (Windows, macOS, Linux) - Pure JavaScript, no native dependencies Author: Joe Cao
元数据
Slug joe-markdown-to-docx
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Joe's Markdown to DOCX Converter 是什么?

Convert Markdown files to fully formatted Word DOCX documents with support for tables, images, code blocks, and GitHub Flavored Markdown features. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 289 次。

如何安装 Joe's Markdown to DOCX Converter?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install joe-markdown-to-docx」即可一键安装,无需额外配置。

Joe's Markdown to DOCX Converter 是免费的吗?

是的,Joe's Markdown to DOCX Converter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Joe's Markdown to DOCX Converter 支持哪些平台?

Joe's Markdown to DOCX Converter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Joe's Markdown to DOCX Converter?

由 zupeng(@joecao)开发并维护,当前版本 v1.0.0。

💬 留言讨论