Md To DOCX
GitHubOfficialFirst committed by parveen-dotnetDistributed by GitHub
- Skill
- Tool integration
- Automation and integrations
- MIT
- Low risk
- Has scripts
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
Download the skill as a ZIP:
https://autogineer.com/agent-skills/github/md-to-docx/downloadUnzip 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
| 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 pageGenerates 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 documentStyled output — Calibri font, colored headings (
#1F3864), styled tables with alternating row colors, code blocks in ConsolasHandles 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.
Files
- ATTRIBUTION.mdAdded by AutoGineer865 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md2.7 KiB
- scripts/md-to-docx.mjsScript14.4 KiB
- scripts/package.json187 B
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
parveen-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