md-to-docx
Lets your agent convert Markdown files into Word (.docx) documents. It creates well-formatted documents with images included.
What it does
This tool transforms your texts written in Markdown (.md) format into professional-looking Word (.docx) documents. It also includes PNG images you referenced in your text.
When to use it
- ✓When you need to turn a draft into a formal document.
- ✓To automatically create a table of contents from headings.
- ✓When sharing documents that need to be opened in Word.
Example of what to ask your AI
“Convert this markdown file to word: my_document.md”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
You provide a text file written in Markdown. The tool uses a program called Node.js to read your text, understand headings, lists, and images, and then creates a new file in Word (.docx) format.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add github/awesome-copilot --skill md-to-docxOr download just the file:
curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/md-to-docx/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Markdown to Word (.docx) Skill
Convert Markdown (.md) files into professionally formatted Word (.docx) documents with embedded PNG images. Uses pure JavaScript via the docx and marked npm packages — no Pandoc, LibreOffice, or any native binary required.
How to Convert
# Install dependencies (one-time, from the scripts folder)
cd skills/md-to-docx/scripts && npm install
# Convert (run from workspace root)
node skills/md-to-docx/scripts/md-to-docx.mjs <input.md> [output.docx]
If output.docx is omitted, it defaults to <input-basename>.docx in the current directory.
Skill Folder Contents
| File | Purpose |
|---|---|
SKILL.md |
This instruction file |
scripts/md-to-docx.mjs |
Node.js Markdown-to-Word converter |
scripts/package.json |
Dependencies (docx, marked) |
Prerequisites
| Requirement | Version | Notes |
|---|---|---|
| Node.js | 18+ | Required runtime |
docx |
9+ | Pure JS Word document generator |
marked |
15+ | Markdown parser |
No native binaries. No system-level installs. Works on Windows, macOS, and Linux.
Features
The converter:
- Extracts YAML front-matter — uses
title,date,version,audiencefor the title page - Generates a title page — with project name, subtitle, date, version, and audience
- Generates a table of contents — built from H1-H3 headings
- Embeds PNG images — resolves
references relative to the input.mdfile, reads the PNG, and embeds it inline in the Word document - Styled output — Calibri font, colored headings (
#1F3864), styled tables with alternating row colors, code blocks in Consolas - Handles all Markdown elements — headings, paragraphs, tables, code blocks, lists, images, links, horizontal rules
Image Embedding
The converter automatically embeds PNG images referenced in the Markdown:

The image path is resolved relative to the input Markdown file. The PNG is read, dimensions are extracted from the PNG header, and the image is scaled to fit within 6 inches width while preserving aspect ratio.
If an image file is not found, a placeholder [Image not found: <path>] is inserted.
Front-Matter Format
---
title: Project Name — Project Summary
date: 2025-01-15
version: 1.0
audience: Engineering Team, Architects, Stakeholders
---
The title is split on — or – into main title and subtitle for the title page.
FAQ
Do I need to install something complicated?
You need to have Node.js installed on your computer. The rest is set up automatically when you run the installation command.
What if I have images in my text?
If the images are PNG type and are in the same location or a related folder to your Markdown file, they will be included in the Word document.
What is 'YAML front-matter'?
It's a small block of text at the beginning of your Markdown file, between three hyphens (---), where you can put information like title, date, and target audience for your Word document.
Details
Original description by the author
Convert Markdown files to professionally formatted Word (.docx) documents with embedded PNG images — pure JavaScript, no external tools required
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #5228
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
acquire-codebase-knowledge
Helps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
github/awesome-copilot
acreadiness-assess
Enables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
github/awesome-copilot
acreadiness-generate-instructions
Helps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
github/awesome-copilot
acreadiness-policy
Enables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
github/awesome-copilot
Similar skills
intent-driven-development
Helps your agent turn ideas into clear, testable plans. Defines criteria to ensure changes are made correctly and safely.
affaan-m/ECC
product-capability
Guides your agent in turning product ideas into clear plans. It defines what needs to be done, the limits, and decisions before development.
affaan-m/ECC
article-writing
Writes long-form content like articles, guides, and blog posts with a unique style. It's useful when you need well-written texts with a consistent voice and credibility.
affaan-m/ECC