Token导航 LogoToken导航TokenDH.com
开发操作浏览器unknown未标认证来源可访问许可证需确认审计未展示

md-to-docxMD TO DOCX 搜索

Agent Skill

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

总安装

192

周安装

8

下载量

64
Local Agent

安装说明

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

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

md-to-docx 用于将 Markdown 文档转换为 Word 格式,适合在 Local Agent 中处理办公文档需求。

  • 它支持保留段落、列表、图片等基本结构,便于后续编辑与协作。
  • 使用时需提供源文件路径,Agent 可自动完成格式转换并返回 .docx 文件。
  • 安装前请确认是否依赖 LibreOffice 或 pandoc 等外部工具,确保环境就绪。
  • 注意检查是否会触发文件读写或命令行调用,避免安全风险。

SKILL.md

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
  4. 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>]
  5. 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

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

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

平台分布

Local Agent

74.92%
按下载量换算48

安全审计

暂无安全审计结果可展示。

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills