markdown-to-word-converter
Convert a Markdown (.md) file to a Word (.docx) document using Pandoc. Use when the user asks to convert markdown to Word.
Source: .opencode/skills/markdown-to-word-converter/SKILL.md — site rebuilt 2026-09-05.
Markdown to Word Converter¶
This skill converts a Markdown (.md) file to a Word (.docx) document using the industry-standard Pandoc tool.
Prerequisites¶
- Pandoc must be installed on the system.
- To check if it is installed, run
pandoc --version. - If Pandoc is NOT installed, install it using winget:
(Note: You may need to run this command, wait for it to complete, and if pandoc is still not on PATH in your current shell, you can invoke it by closing/opening a new shell or running
winget install --id JohnMacFarlane.Pandoc -e --accept-package-agreements --accept-source-agreementsrefreshenv/ specifying the install path).
Instructions¶
- Determine the absolute path of the input
.mdfile. - Determine the desired absolute path for the output
.docxfile (if the user didn't specify, default to the same directory and base name with a.docxextension). - Run the Pandoc command to convert the file:
pandoc "C:\absolute\path\to\input.md" -o "C:\absolute\path\to\output.docx" - Confirm with the user that the document has been successfully converted.
Advanced (Optional)¶
If the user requests a specific style, you can use a reference docx file:
pandoc "input.md" -o "output.docx" --reference-doc="template.docx"