Token导航 LogoToken导航TokenDH.com
开发操作浏览器clawhub未标认证来源可访问clear审计通过

md-to-docxMD TO DOCX 搜索

Agent Skill

md-to-docx 用于整理文档、README、Markdown 和说明材料,适合在 OpenClaw 中需要把零散信息整理成结构清晰的文档时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,303

周安装

268

GitHub Stars

1

下载量

2,208
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:md-to-docx(MD TO DOCX 搜索)
来源仓库:https://github.com/krabww/md-to-docx
安装命令:
openclaw skills install md-to-docx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install md-to-docx

简介

自动检测样式后将 Markdown 转为 Word (.docx),适配多种模板风格。

  • 适用于 OpenClaw 中快速生成商务报告或技术手册的需求。
  • 保留原格式语义,减少人工排版工作量。
  • 需确保宿主环境具备 docx 生成库支持,如 python-docx。
  • 建议测试不同主题下的输出效果,选择最合适的样式方案。

SKILL.md

name
md-to-docx
description
>

Markdown to Word (.docx) Converter

Convert Markdown files to professionally formatted Word documents, with automatic template style extraction and Mermaid diagram rendering.

How It Works

The bundled script (scripts/md_to_docx.py) handles the entire conversion:

  1. Parse Markdown into structured blocks (headings, body, lists, tables, code, quotes)
  2. Extract styles from an optional Word template (.doc or .docx) — font, size, alignment, spacing
  3. Apply formatting to each block, preserving inline Markdown (bold, italic, code, strikethrough)
  4. Render Mermaid diagrams to PNG via mmdc (mermaid-cli) and embed them as images
  5. Output a ready-to-use .docx file

Dependencies

The script requires:

  • python-docx: pip install python-docx
  • mmdc (for Mermaid rendering): npm install -g @mermaid-js/mermaid-cli
  • Chrome or Chromium: must be installed locally (auto-detected on macOS/Windows/Linux)

On macOS, .doc templates are converted via the built-in textutil. On Linux, LibreOffice is used as fallback.

Usage

Basic conversion (default Chinese typesetting)

python3 scripts/md_to_docx.py input.md -o output.docx

With template (auto-extract formatting)

python3 scripts/md_to_docx.py input.md -o output.docx -t template.doc

When Invoked as a Skill

When the user asks to convert a Markdown file to Word:

  1. Identify the input file — the user will typically specify a .md file path
  2. Check for a template — ask if they have a .doc/.docx template, or check if one exists in common locations (docs/, templates/)
  3. Ensure dependencies are installed:
   pip3 install python-docx
   npm list -g @mermaid-js/mermaid-cli 2>/dev/null || npm install -g @mermaid-js/mermaid-cli
  1. Run the script from the skill's scripts/ directory:
   python3 <skill-path>/scripts/md_to_docx.py <input.md> -o <output.docx> [-t <template.doc>]
  1. Report results — tell the user the output path and whether all Mermaid diagrams rendered successfully

Template Format Detection

When a template is provided, the script analyzes it automatically:

  • Title levels are identified by font size and alignment (largest centered = chapter title, etc.)
  • Body text is identified by paragraphs with first-line indentation
  • Page setup (margins, paper size) is copied from the template
  • Chinese font pairing is preserved (e.g., Times New Roman ↔ 宋体, Arial ↔ 黑体)

If no template is provided, these defaults are used (Chinese publishing standard):

ElementFontSizeAlignment
Chapter title (h1)黑体18ptCenter
Section title (h2)黑体16ptCenter
Subsection (h3)黑体14ptLeft
Body text宋体10.5pt (五号)Justify, 2-char indent
CodeConsolas9ptLeft
Quote楷体10.5ptLeft indent, italic

Supported Markdown Features

  • Headings: h1–h6 (h1 = chapter, h2 = section, h3 = subsection, h4+ = sub-subsection)
  • Body text with inline: bold, *italic*, code, ~~strikethrough~~, *bold italic*
  • Bullet lists (- or *) and ordered lists (1.)
  • Tables with header detection
  • Code blocks with language label
  • Mermaid diagrams rendered to embedded PNG images
  • Block quotes and horizontal rules

Mermaid Diagram Handling

Mermaid code blocks are rendered to PNG via mmdc using the local Chrome browser. If rendering fails (e.g., Chrome not found, syntax error), the diagram falls back to a code block display.

Common Mermaid compatibility fixes are applied automatically:

  • subgraph names containing colons are quoted
  • Parentheses in subgraph names are escaped

Cross-Platform Notes

  • macOS: Chrome auto-detected at /Applications/Google Chrome.app/...
  • Windows: Checks Program Files and LocalAppData
  • Linux: Checks /usr/bin/google-chrome, /usr/bin/chromium, /snap/bin/chromium
  • .doc conversion: Uses textutil on macOS, libreoffice on Linux

Limitations

  • No support for footnotes, images, or links (Markdown image URLs are not fetched)
  • Math equations (LaTeX) are preserved as plain text
  • Nested lists deeper than one level are flattened
  • Template detection works best with templates that have clear formatting differentiation between headings and body text

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

96.66%
按下载量换算2,134

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills