Generated banner for Md To DOCX
Generated logo for Md To DOCX

Md To DOCX

GitHubOfficialFirst committed by parveen-dotnetDistributed by GitHub

  • Skill
  • Tool integration
  • Automation and integrations
  • MIT
  • Low risk
  • Has scripts

From the author

Convert Markdown files to professionally formatted Word (.docx) documents with embedded PNG images — pure JavaScript, no external tools required
— the description by parveen-dotnet

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a Node.js-based utility to transform Markdown files into structured .docx documents. It leverages the docx and marked libraries to handle document generation and Markdown parsing without requiring external software like Pandoc or LibreOffice. It supports advanced formatting including title pages derived from YAML front-matter, automated tables of contents, and inline PNG image embedding.

What it does

  • Converts Markdown files to .docx format using pure JavaScript
  • Generates professional title pages from YAML front-matter
  • Creates automated tables of contents based on H1-H3 headings
  • Embeds local PNG images with automatic scaling and aspect ratio preservation
  • Applies consistent styling for headings, tables, and code blocks
  • Handles standard Markdown elements like lists, links, and horizontal rules

When to use it

  • When you need to generate Word documents from Markdown source files
  • When you require a lightweight conversion tool without system-level dependencies
  • When you need to automate the creation of technical reports or documentation
  • When you want to maintain consistent branding and styling across generated documents

Advantages

  • Zero native binary dependencies
  • Cross-platform compatibility on Windows, macOS, and Linux
  • Automated handling of image paths and document metadata
  • Consistent, pre-defined professional styling

Usage examples

“Convert my documentation.md file into a Word document.”
The tool processes documentation.md, extracts the front-matter for the title page, embeds any referenced PNGs, and saves the result as documentation.docx.
“Generate a report named final-report.docx from project-notes.md.”
The tool parses project-notes.md and outputs a formatted Word document named final-report.docx in the current directory.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/github/md-to-docx/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip md-to-docx.zip -d .agents/skills

Documentation by parveen-dotnet

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

FilePurpose
SKILL.mdThis instruction file
scripts/md-to-docx.mjsNode.js Markdown-to-Word converter
scripts/package.jsonDependencies (docx, marked)

Prerequisites

RequirementVersionNotes
Node.js18+Required runtime
docx9+Pure JS Word document generator
marked15+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:

![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

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

Files

Requirements and compatibility

Written for: GitHub Copilot

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Node.js

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

First committed by
GitHub avatar of parveen-dotnetparveen-dotnet
Publisher
GitHub (Official)
Distributed by
GitHub
Source
github/awesome-copilot · skills/md-to-docx · commit 797337f
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
aaronpowell, parveen-dotnet

AutoGineer is not affiliated with or endorsed by parveen-dotnet or GitHub.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download md-to-docx.zip