md2docx for Openclaw

A high-fidelity Markdown to Word (.docx) converter featuring a two-stage processing engine for superior formatting and Chinese font support.

sukimgit
v1.0.6
Mar 26, 2026
0
993
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install md2docx

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install md2docx using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is md2docx?

md2docx is a specialized conversion tool designed to transform Markdown files into professional Microsoft Word documents. As a versatile component within the Openclaw Skills ecosystem, it utilizes a sophisticated two-stage approach: first employing Pandoc for structural conversion, followed by a post-processing phase using python-docx to refine typography and table styling. This ensures that technical content is not just converted, but presented in a business-ready format.

Whether you are generating project reports, technical manuals, or academic papers, this skill handles everything from complex nested lists to code blocks and images. It is particularly optimized for multilingual environments, offering native support for Chinese fonts like Microsoft YaHei and SimSun, which are often difficult to configure in standard conversion workflows.

md2docx Use Cases

  • Generating official corporate reports and proposals directly from technical Markdown notes.
  • Automating the creation of project documentation with consistent styling and branding.
  • Converting developer READMEs or wikis into shareable .docx files for non-technical stakeholders.
  • Preparing academic or research papers that require specific font settings and table borders.

How md2docx Works

  1. The engine accepts a UTF-8 encoded Markdown file as input and initiates the primary conversion using Pandoc.
  2. Structural elements such as H1-H6 headers, lists, and blockquotes are mapped to their corresponding Word styles.
  3. A post-processing script powered by python-docx scans the generated file to apply advanced formatting rules.
  4. Table borders are automatically applied to all Markdown tables to ensure readability in Word.
  5. Typography settings are adjusted, specifically optimizing Chinese characters with fonts like Microsoft YaHei or SimSun.
  6. The final, stylized document is output to the designated path as a .docx file.

md2docx Setup

To use this tool within the Openclaw Skills framework, ensure you have the necessary system dependencies installed.

# Install Pandoc (System-wide dependency)
# Windows: choco install pandoc
# macOS: brew install pandoc

# Install Python post-processing library
pip install "python-docx>=1.2.0"

# Basic CLI Usage
python tools/md2docx.py input.md output.docx

md2docx Data Schema & Taxonomy

The skill utilizes specific parameters to manage the document generation lifecycle:

Parameter Description Requirement
input_file Path to the source Markdown file (must be UTF-8). Required
output_file Destination path for the generated .docx file. Required
template Path to a custom Word template for styling. Optional
reference_docx Reference file to inherit styles and themes. Optional

md2docx Advanced Features

  • Dual-engine processing combining Pandoc's parsing power with python-docx's styling flexibility.
  • Automatic typography optimization for multi-language documents, including Microsoft YaHei and SimSun support.
  • Intelligent table border injection to solve common Markdown-to-Word rendering issues.
  • Support for advanced Markdown syntax including code blocks, images, links, and H1-H6 hierarchy.
  • Extensible style templates allow power users to match corporate branding perfectly.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*