Markdown Word Bidirectional Converter
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_27f88699/md2docx.
About this skill
Problem
When Markdown is used for drafting and Word is used for delivery, copying text by hand often breaks the document. Heading levels, code blocks, tables, inline code, images, Mermaid diagrams, and merged cells can become misaligned or lost. md2docx addresses this by converting between .md and .docx files and automatically choosing the direction from the file extension.
How It Works
- MD to DOCX: The output uses Chinese-friendly formatting, with Microsoft YaHei for body text at
10.5ptand tables at9pt. Headings are scaled by level, starting around12.5ptat the lowest level and increasing by2ptper level. Code blocks are rendered with a gray background, four borders, and theConsolasmonospaced font. Bold, italics, inline code, links, blockquotes, horizontal rules, images, and HTML blocks are also handled. - Tables and merged cells: Standard Markdown tables do not support
rowspanorcolspan, so the skill uses HTML table embedding. This keeps merged-cell layouts visible in common Markdown renderers and helps preserve the structure when converting back or parsing DOCX content. - Diagrams and dependencies: Mermaid code can be rendered into PNG images and embedded in Word. The script detects system Chrome, Edge, or Chromium when available. If Node.js or Python packages such as
python-docx,mammoth, orbeautifulsoup4are missing, some features degrade, for example Mermaid may fall back to a text placeholder and syntax highlighting may become plain text.
Boundaries
This is useful for personal documents, technical notes, report drafts, and preparing Markdown content for Word delivery. It is not a full layout engine: complex Word styles, headers and footers, fields, equations, and other unspecified features may not be preserved exactly. Documents with many merged cells should use HTML tables where possible. If only plain text conversion is needed, Mermaid and Node-related setup can be ignored.
Use Cases
- A technical writer converts Markdown design docs with code blocks, tables, and Mermaid into review-ready Word deliverables for stakeholder feedback.
- A product manager converts Word requirements with headings, lists, and merged cells back to Markdown for Git-based version control workflows.
- An engineer exports Markdown API notes containing HTML tables to Word while preserving header styling and merged-cell structure for client delivery.
- A docs maintainer extracts inline images and Mermaid blocks from Word into Markdown for archive, review, and future rendering cycles.
Best For
- Engineers who deliver technical Markdown as Word and need code blocks, tables, and Mermaid preserved.
- Product managers who move Word requirements into Git and need headings, lists, and merged cells extracted.
- Technical writers who maintain API notes across Markdown and Word and rely on HTML merged-table fidelity.
- Docs maintainers who archive illustrated documents and need inline image references and Mermaid blocks preserved.
Related Skills
Generate and edit .pptx decks with python-pptx, applying structured layouts, design rules, native charts, and visual QA to reduce template-like output.
Tencent Cloud Table Recognition V3 is an OCR skill for detecting and recognizing tables in images or PDFs, supporting various table types like linear and borderless tables, with Excel export.
The complete set of online document operation tools provided by Tencent Docs MCP, supporting creation, querying, and editing of smart docs, Excel, PPT, mind maps, and more.
Generates structured and consistently styled academic presentation PPTX files from paper PDFs for graduate seminars.