- name
- markdown-to-word
- description
- 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 is the right skill when the user asks to export Markdown to Word, generate a .docx report from Markdown, or restyle Markdown content with a reference DOCX.
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.md Raw 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-templatesMain command
python3 scripts/markdown_to_docx.py \
--input-file /abs/path/source.md \
--output /abs/path/output.docx \
--builtin-template modern-blue \
--toc \
--number-sectionsRaw string example
python3 scripts/markdown_to_docx.py \
--markdown '# Weekly Report\
\
- Finished template system\
- 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