Skip to main content
skill GitHub Copilot official · GitHub

md-to-docx — GitHub Copilot skill: Markdown to Word

Turns a Markdown file into a Word document with a title page, table of contents and embedded PNGs. Useful when a .md draft has to reach people as .docx.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill md-to-docx
Open on GitHub

What md-to-docx does

The skill runs a Node.js script, scripts/md-to-docx.mjs, which reads your .md and builds a .docx with the docx and marked npm packages. No Pandoc, no LibreOffice, no native binaries. It works on Windows, macOS and Linux.

What lands in the document: a title page filled from YAML front-matter (title, date, version, audience), a table of contents from H1–H3 headings, tables, code blocks, lists and links. Images written as ![alt](path) are resolved relative to the input .md, dimensions come from the PNG header, and width is capped at 6 inches. A missing file leaves [Image not found: ] behind.

You need Node.js 18+ and a one-time npm install inside skills/md-to-docx/scripts. Worth installing if your docs live in Markdown and reviewers keep asking for Word. If everything already flows through Google Docs or Confluence, the script just adds a step.

What it helps with

  • turn a README into a .docx for review
  • embed PNG diagrams inline in the Word file
  • get a title page and table of contents without manual layout
  • hand a client a Word version of technical docs
  • merge a set of .md files into one document with tables and code

Example prompts for the agent

  • Convert docs/architecture.md to Word
  • Build a .docx from README.md with the images in diagrams
  • Run md-to-docx on the report and pull the title from front-matter

How to install md-to-docx

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill md-to-docx

2GitHub CLI

gh skill install github/awesome-copilot md-to-docx

3Manually: put the files in place

.github/skills/md-to-docx/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

chronology official anthropics Turns matter documents into a dated timeline: events extracted, duplicates merged, significance tagged against the case theory. Reach for it before a statement of facts or witness prep. Claude Code CX Codex Cursor +1 662installs extract Alireza Rezvani Turns a recurring pattern or debugging fix into a standalone skill with instructions and examples. Use it when you want to carry a solution into another project. Claude Code 1,613installs research-summarizer Alireza Rezvani Turns academic papers, whitepapers, and reports into structured briefs, extracts citations, and builds comparative matrices across documents. Claude Code 1,190installs product-manager-toolkit Alireza Rezvani This skill helps prioritize features, analyze customer interviews, and draft PRDs. Use it when product work moves from discovery to roadmap planning. Claude Code 994installs grill-with-docs Matt Pocock This skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. Claude Code 1,219,756installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs handoff Matt Pocock Creates a handoff document from the current conversation so another agent can continue the work. Use it when a task moves to a new session or agent. Claude Code 1,038,491installs

Questions about md-to-docx

How do I install md-to-docx in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill md-to-docx or gh skill install github/awesome-copilot md-to-docx. The skill file ends up at .github/skills/md-to-docx/SKILL.md.

What does md-to-docx do?

It converts Markdown into .docx with a title page, table of contents, tables, code and embedded PNGs. All in pure JavaScript, no external tools.

What does the skill need to run?

Node.js 18+ plus the docx 9+ and marked 15+ dependencies, installed with npm install in skills/md-to-docx/scripts.

Source text

SKILL.md · MIT
---
name: md-to-docx
description: Convert Markdown files to professionally formatted Word (.docx) documents with embedded PNG images — pure JavaScript, no external tools required
---

# 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

```bash
# 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`, `audience` for 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 `![alt](path)` references relative to the input `.md` file, 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:

```markdown
![High-Level Architecture](diagrams/high-level-architecture.drawio.png)
```

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

```yaml
---
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.

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor