md-to-docx
Skill0 starsChanged 2 months agoMITView on GitHub
Convert a Markdown document into a clean, professional Word (.docx) or PDF where Markdown syntax (#, *, -, |, links, tables) renders as real headings, bold, bullets, and tables — never literal symbols. Use when asked to convert/export Markdown to docx/Word/PDF, or when a converted document still shows raw Markdown symbols like # or **. Wraps the locally installed pandoc with tech-document defaults and an optional styled reference template.
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- StevenZhao666/hermes-kitstheir own version, first seen Nov 8, 2026
- github/awesome-copilottheir own version, first seen Oct 25, 2026
- sunliangcode/md-to-docxtheir own version, first seen Oct 20, 2026
- biomystery/claude-skillstheir own version, first seen Jun 18, 2026
- pickle-an/md-to-docx-skilltheir own version, first seen Mar 11, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- github/awesome-copilot★ 41ksame name
- pickle-an/md-to-docx-skill★ 65same name
- StevenZhao666/hermes-kits★ 2same name
- biomystery/claude-skills★ 1same name
- sunliangcode/md-to-docx★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- customer-facing-specSkill
- dispatchSkill
- explain-step-by-stepSkill
- features-roadmapSkill
- markdown-to-formal-docSkill
- plan-to-project-treeSkill
- review-planSkill
- runbookSkill
- writing-clearly-and-conciselySkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Verify pandoc is available.
- Distinctive: line 33
Verify the output has no literal Markdown: Run a round-trip check and inspect:
- Distinctive: line 37
If raw markdown is detected, the source likely used a syntax pandoc didn't parse — investigate rather than shipping.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Markdown → Polished Word/PDF
Convert Markdown to a real, well-formatted .docx (or PDF) using the locally installed pandoc. Pandoc parses the Markdown and emits true document structure — headings become Word heading styles, **bold** becomes bold, lists and tables become real lists and tables. Literal #, *, and | never appear in the output.
Preconditions
- Requires
pandoc(already installed: check withpandoc --version). If missing, tell the user tobrew install pandoc— do not attempt a silent workaround that reintroduces raw symbols. - For PDF output, pandoc needs a PDF engine. Prefer
--pdf-engine=weasyprintorwkhtmltopdfif present; if none is available, produce.docxand tell the user to export to PDF from Word.
Core conversion (this is the fix for "raw # symbols")
pandoc INPUT.md \
--from gfm \
--to docx \
--toc --toc-depth=3 \
--number-sections \
--reference-doc="$HOME/.claude/skills/md-to-docx/reference/template.docx" \
-o OUTPUT.docx--from gfmparses GitHub-Flavored Markdown (tables, task lists, fenced code).--tocadds a table of contents;--number-sectionsnumbers headings (drop either if unwanted).--reference-docapplies the styled template for fonts/spacing/branding. If the template file does not exist, omit that flag — pandoc then uses its clean default styles (still no raw symbols).
Workflow
- Confirm the input
.mdpath and desired output (docxorpdf) and filename. - Verify
pandocis available. - Decide on options with the user only if they care: TOC yes/no, numbered sections yes/no, styled template yes/no. Otherwise use the defaults above.
- Run the conversion.
- Verify the output has no literal Markdown. Run a round-trip check and inspect:
If raw markdown is detected, the source likely used a syntax pandoc didn't parse — investigate rather than shipping.pandoc OUTPUT.docx -t plain | grep -nE '(^#{1,6} )|\*\*|\]\(http|^\s*\|' && echo "WARN: raw markdown detected" || echo "clean" - Report the output path and that the conversion is clean.
Styled template (visual quality)
To make the document look good (corporate fonts, heading colors, spacing), create a reference template once and pass it with --reference-doc:
# Generate a starter template, then edit its styles in Word and re-save:
pandoc -o "$HOME/.claude/skills/md-to-docx/reference/template.docx" --print-default-data-file reference.docxEdit the heading/body styles in that file (Home → Styles → modify), save, and every future conversion inherits the look. See reference/styling-notes.md.
Notes
- Pandoc is deterministic and local — no network calls. This skill only orchestrates it.
- This skill is the final step after the
customer-facing-spec→ leak-check →writing-clearly-and-conciselypipeline: convert only the cleared, edited Markdown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

