md-to-docx — скилл для GitHub Copilot: Markdown в Word
Превращает Markdown-файл в документ Word с титульной страницей, оглавлением и встроенными PNG. Пригодится, когда черновик в .md нужно отдать людям в .docx.
npx skills add github/awesome-copilot --skill md-to-docxЧто делает md-to-docx
Скилл запускает Node.js-скрипт scripts/md-to-docx.mjs, который читает .md и собирает .docx через npm-пакеты docx и marked. Pandoc, LibreOffice и другие бинарники не нужны. Работает на Windows, macOS и Linux.
Что попадает в документ: титульная страница из YAML front-matter (title, date, version, audience), оглавление по заголовкам H1–H3, таблицы, блоки кода, списки и ссылки. Картинки  ищутся относительно входного .md, размеры берутся из заголовка PNG, ширина ограничена 6 дюймами. Если файла нет, на его месте появится [Image not found: ].
Нужен Node.js 18+ и один раз npm install в папке skills/md-to-docx/scripts. Ставить стоит, если у вас документация живёт в Markdown, а согласующие просят Word. Если весь поток уже в Google Docs или Confluence, скрипт только добавит лишний шаг.
Какие задачи решает
- собрать .docx из README для согласования
- вставить диаграммы PNG прямо в текст документа
- получить титульную страницу и оглавление без ручной вёрстки
- отдать заказчику Word-версию технической документации
- перевести набор .md-файлов в один документ с таблицами и кодом
Примеры запросов агенту
- Сконвертируй docs/architecture.md в Word
- Сделай .docx из README.md с картинками из папки diagrams
- Прогони md-to-docx для отчёта, титул возьми из front-matter
Как установить md-to-docx
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill md-to-docx2GitHub CLI
gh skill install github/awesome-copilot md-to-docx3Вручную: положить файлы
.github/skills/md-to-docx/SKILL.md1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill md-to-docx -a claude-code2Вручную: положить файлы
~/.claude/skills/md-to-docx/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/md-to-docx/
Вручную: положить файлы
.agents/skills/md-to-docx/SKILL.mdДля всех проектов — ~/.agents/skills/
Вручную: положить файлы
.cursor/skills/md-to-docx/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
Командой платформы
gemini skills install https://github.com/github/awesome-copilot --path skills/md-to-docxВручную: положить файлы
.devin/skills/md-to-docx/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора554
Весь набор →Похожие
Вопросы о md-to-docx
Как установить md-to-docx в GitHub Copilot?
Через npx skills add github/awesome-copilot --skill md-to-docx или gh skill install github/awesome-copilot md-to-docx. Файл скилла окажется в .github/skills/md-to-docx/SKILL.md.
Что делает md-to-docx?
Конвертирует Markdown в .docx: титульная страница, оглавление, таблицы, код и встроенные PNG. Всё на чистом JavaScript, без внешних утилит.
Что нужно для работы скилла?
Node.js 18+ и зависимости docx 9+ и marked 15+, которые ставятся командой npm install в папке skills/md-to-docx/scripts.
Исходный текст
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 `` 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  ``` 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