md-to-docx-template

Convert markdown to beautifully styled Word documents using custom templates. Supports branded fonts, colors, and table styling. Extract styles from existing docs or generate fresh templates.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "md-to-docx-template" with this command: npx skills add jonnyschneider/skills/jonnyschneider-skills-md-to-docx-template

Markdown to DOCX with Templates

Convert markdown to professionally styled Word documents. Not plain exports — beautiful, branded documents with your fonts, colors, and table styling applied automatically.

When to Use

  • User wants to convert markdown to Word/DOCX
  • User needs a branded document from markdown source
  • User asks about exporting markdown with styling
  • User mentions "md to docx", "markdown to word", or similar

Prerequisites

  • pandoc installed (brew install pandoc on macOS)
  • Python 3.8+ with packages: python-docx, lxml, click, pyyaml

Installation

Clone this skill's scripts to your preferred location:

git clone https://github.com/jonnyschneider/skills.git
cd skills/skills/md-to-docx-template
pip install python-docx lxml click pyyaml

Quick Conversion

./md-to-docx.py input.md -o output.docx

With Custom Template

Option A: Generate template with specific fonts/colors

./create-reference-template.py template.docx \
  --font-body "DM Sans" \
  --font-heading "DM Sans" \
  --accent-color "0D494D" \
  --heading-color "0D494D"

./md-to-docx.py input.md -o output.docx --template template.docx

Option B: Extract styles from existing branded document

# Full pipeline for best results:
./extract-styles.py source-branded.docx template.docx
./md-to-docx.py input.md -o output.docx --template template.docx --no-fix-indent
./apply-template-styles.py template.docx output.docx
./fix-table-headers.py output.docx

Multi-file Documents

Create a manifest.yaml:

template: template.docx
output: final-document.docx
sections:
  - 01-intro.md
  - 02-content.md
  - 03-conclusion.md

Then run:

./md-to-docx.py manifest.yaml --open

Key Options

OptionDescription
-o, --outputOutput DOCX path
--templateCustom reference template
--tocGenerate table of contents
--openOpen after building
--no-fix-indentSkip list indent fix (use with extract pipeline)

Template Options

OptionDescription
--font-bodyBody text font (default: Calibri)
--font-headingHeading font (default: Calibri)
--font-monoCode font (default: Consolas)
--accent-colorTable header color (hex, default: 4472C4)
--heading-colorHeading text color (hex, default: 000000)

Limitations

  • Custom fonts must be installed on target machines
  • Complex tables may not render perfectly
  • SVG images require rsvg-convert
  • Some pandoc quirks require post-processing scripts

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

OpenClaw Skill Growth

Make OpenClaw Skills observable, diagnosable, and safely improvable over time. Use this when the user wants to maintain many SKILL.md files, inspect repeated...

Registry SourceRecently Updated
171Profile unavailable
General

Find Skills for ClawHub

Search for and discover OpenClaw skills from ClawHub (the official skill registry). Activate when user asks about finding skills, installing skills, or wants...

Registry SourceRecently Updated
2871Profile unavailable
General

Skill Listing Polisher

Improve a skill's public listing before publish. Use when tightening title, description, tags, changelog, and scan-friendly packaging so the listing looks cl...

Registry SourceRecently Updated
1130Profile unavailable
General

Skill Priority Setup

Scans installed skills, suggests L0-L3 priority tiers, and auto-configures skill injection policy. Use when: setting up skill priorities, optimizing token bu...

Registry SourceRecently Updated
2510Profile unavailable