md-to-docx skill
md-to-docx builds a ready Word document from Markdown: tables, footnotes, figure captions, headers and template patching.
- 107 ★ on the repository
- Last commit
- MIT
Minimal access
Why this level
- The converter reads local Markdown and images within `--base-dir`.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/md-to-docxDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The converter reads local Markdown and images within `--base-dir`.
This is third-party code. Review the repository files before installing.
What it does
md-to-docx is a TypeScript library and CLI, and the repository also holds the `skills/md-to-docx` skill. The command `npx @mohtasham/md-to-docx input.md output.docx` builds a Word file from Markdown with tables, lists, footnotes, images and code highlighting, and the library works in Node.js and the browser. Multi-section documents get cover pages, their own headers and footers, page numbering and mixed orientation. Figures and tables get document-wide captions and clickable cross-references, with right-to-left support for Arabic and Hebrew, metadata and accessibility. A reference `.docx` acts as a template: generated Markdown replaces a placeholder. The skill suits agents that speak the `skills` CLI.
Who it is for. Developers and technical writers who need an agent to produce reports and specs in Word rather than Markdown only.
Good fit when
- A report written in Markdown must go to a client as a `.docx` file.
- A document is built from sections with different page orientations and numbering.
- Figures and tables need automatic numbering and cross-references.
- Generated text must drop into a ready Word template with company styling.
Not a fit when
- You need to edit an existing Word document with tracked changes.
- You need PDF or a presentation.
- The layout needs exact typesetting that Markdown cannot describe.
Example request
Convert `report.md` to `report.docx` with md-to-docx, add a cover page and document-wide table numbering.Limitations
It is a Markdown to DOCX converter, not an editor of other people's documents or a layout designer. Image paths in the CLI are limited to the `--base-dir` directory, and links outside through symlinks are forbidden. The skill installs through `npx skills`, so Node.js and GitHub access are needed. For complex layouts, open the result in Word and check it. Package version and support for individual Markdown elements are described in the API section and changelog, so check them.
How to disable. Remove the skill from the agent skills directory with your skill manager or by hand. The library leaves the project with `npm uninstall @mohtasham/md-to-docx`.
FAQ
How do I build a document from the console?
Run `npx @mohtasham/md-to-docx input.md output.docx`. The CLI also supports pipes and batch jobs.
How do I place text into an existing template?
Use a reference `.docx` with a placeholder: the library replaces it with generated Markdown.
Does it work in the browser?
Yes, the library works in Node.js and the browser and returns a Blob.
Is right-to-left text supported?
Yes, the README lists RTL, metadata and document accessibility.
Which Markdown features are supported?
The list is in the Supported Markdown section: headings, tables, lists, footnotes, images and highlighted code blocks.
Discussion
No questions or reviews yet.
Related
SkillsA skill to convert Markdown to Word and back through Pandoc with ready styling templates and Lua filters
A skill plus the docx program: the agent fills forms, edits tables and reviews Word files with tracked changes
A Firecrawl skill and CLI that lets your agent convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV and PDF to Markdown on your own machine
A skill and CLI that turn Markdown into DOCX, PDF, PPTX, XLSX, PNG and about a dozen more formats, all computed locally
A document pipeline skill: anything to markdown, markdown to clean html and publisher-grade docx, and html back to markdown
The Word to Markdown MCP server: an agent turns a .docx file into clean Markdown locally, with images, tables and footnotes.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| md-to-docx (this card) | no | 107 | ||
| mcp-pandoc | no | not required | 587 | conversion through Pandoc over MCP, while this skill builds DOCX with its own library, captions and template patching |
| docx-cli | no | 246 | working with existing Word files from the console, while here the main flow creates a document from Markdown |
README in short
The README has a table of contents, CLI and programmatic examples, a list of supported Markdown and an API reference. The "Install as an agent skill" section shows three skill install options.