Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.
文档
Markdown to Word
试用Convert a Markdown file or raw Markdown string into a polished Word DOCX document. Supports custom Word template files, includes built-in DOCX templates, and...
它能做什么
Convert a Markdown file or raw Markdown string into a polished Word DOCX document. Supports custom Word template files, includes built-in DOCX templates, and...
技能文档
Markdown To Word
Use this skill when the user wants a Markdown file or Markdown string converted into a Word .docx document.
What this skill provides
- Deterministic conversion through
pandoc - Input from either a Markdown file or a raw Markdown string
- Custom template support through
--template /path/to/reference.docx - Built-in template pack in
assets/templates/ - Optional table of contents, numbered sections, metadata, and resource-path support
Quick workflow
- Choose the input source.
File input: pass
--input-file /abs/path/file.mdRaw string input: pass--markdown '...' - Choose the template.
Custom template wins when the user provides one.
Otherwise use a built-in template with
--builtin-template. - Set output path with
--output /abs/path/result.docx. - For long reports, prefer
--tocand--number-sections.
Built-in templates
modern-blue: clean report style, safe defaultexecutive-serif: formal memo / proposal stylewarm-notebook: softer editorial styleminimal-gray: restrained documentation style
List them at runtime with:
python3 scripts/markdown_to_docx.py --list-templates
Main command
python3 scripts/markdown_to_docx.py \
--input-file /abs/path/source.md \
--output /abs/path/output.docx \
--builtin-template modern-blue \
--toc \
--number-sections
Raw string example
python3 scripts/markdown_to_docx.py \
--markdown '# Weekly Report\n\n- Finished template system\n- Integrated pandoc' \
--output /abs/path/weekly-report.docx \
--builtin-template executive-serif \
--title 'Weekly Report'
Template rules
- Prefer
--templatewhen the user already has a branded.docxreference file. - Use
--builtin-templatewhen no custom template is provided. - If both are passed, the script uses the custom template.
Metadata and assets
- Pass
--title,--author,--date, or--metadata-file - Use
--resource-pathwhen Markdown references local images outside the Markdown file directory - Example templates and a sample Markdown file live under
assets/
Bundled files
- Converter:
scripts/markdown_to_docx.py - Built-in template generator:
scripts/build_builtin_templates.py - Built-in templates:
assets/templates/*.docx
Notes
- This skill expects
pandocto be installed and available onPATH - Generated DOCX styling depends on the selected reference DOCX, so for brand fidelity a custom reference file is still the best option
相关技能
Convert Markdown files to formatted Word documents (.docx). Use when the user asks to convert, export, or save a Markdown file as Word/DOCX format. Triggers...
Use `aigroup-mdtoword-mcp` to convert Markdown into `.docx`. Route Markdown file conversion, generated Markdown conversion, table-to-Markdown preprocessing,...
让 Markdown 在 GitHub、MDX、Pandoc、文档站、Slack、Notion 等解析器中正确渲染,并定位修复具体损坏位置。
Professional markdown rendering, export, and publishing via MCP. Use when user asks to "render markdown", "export to PDF", "convert to DOCX", "create a document", "publish a document", "share a link", "make a slide deck", "diff two markdown files", "export to HTML", "create a shareable document", "sync docs from GitHub", or "generate an image of this markdown". Do NOT use for simple markdown editing, code generation, or general writing that doesn't need styled output.
Convert uploaded Word documents (.docx) into the fixed Chinese official-document format defined by the bundled government-style template bundle. Use when Cod...