md2word

Convert Markdown files into formatted Word documents with YAML configurations.

557|80|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/cat-xierluo/legal-skills --skill md2word
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: md2word
Source: https://github.com/cat-xierluo/legal-skills/tree/main/skills/md2word
Command: npx skills add https://github.com/cat-xierluo/legal-skills --skill md2word

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, Pillow, beautifulsoup4, PyYAML, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the conversion of Markdown documents into professionally formatted Word documents, eliminating the manual effort of reformatting content for different document types.

Core Features & Use Cases

  • Markdown to Word Conversion: Converts Markdown syntax into Word document elements like headings, lists, tables, code blocks, and images.
  • Configurable Formatting: Supports various presets (legal, academic, report, simple) and custom YAML configurations for fine-grained control over page layout, fonts, spacing, and more.
  • Use Case: Quickly transform meeting notes written in Markdown into a formal Word report, or convert a technical document into a professionally styled PDF for distribution.

Quick Start

Convert the markdown file named 'my_document.md' into a word document.

Frequently Asked Questions about md2word

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert markdown to Word with custom formatting?

To convert markdown to Word, this Skill parses markdown syntax and applies customizable YAML configurations to generate professionally formatted Word documents with specific page sizes, margins, and fonts.

Can I generate a formal Word document from markdown meeting notes?

Yes, you can generate a formal Word document from markdown meeting notes by applying built-in formatting presets like report, legal, or academic to instantly structure the content for formal distribution.

Does the markdown to Word conversion support Mermaid charts?

Yes, the markdown to Word conversion integrates with Mermaid for chart rendering, automatically translating your markdown diagram syntax into visual charts embedded within the final Word document.

How do I configure page margins and fonts for a Word document generated from markdown?

You configure page margins and fonts by providing custom YAML configurations, which allow fine-grained control over document layout elements like headings, paragraphs, tables, and code blocks during conversion.

What is the best way to handle code blocks and images when converting markdown to Word?

The best way to handle code blocks and images during markdown to Word conversion is using the built-in parser, which automatically maps these markdown elements into properly styled Word document objects.

What are the limitations of using python-docx for markdown to Word conversion?

Using python-docx for markdown to Word conversion means complex formatting requirements are handled programmatically, so highly irregular manual layouts not definable in YAML configurations may not be supported.