Loading...
Loading...
Universal document conversion using Pandoc with focus on DOCX format. Use when converting documents to or from DOCX format, including Markdown, HTML, PDF, and other formats. Supports: (1) Converting other formats to DOCX (Markdown, HTML, reStructuredText, etc.), (2) Converting DOCX to other formats, (3) Custom DOCX templates and styling, (4) Batch document processing
npx skill4agent add mengbo/mengbo-skills pandoc-docxpandoc --version
# If not installed: brew install pandoc (macOS) or apt-get install pandoc (Linux)mkdir -p import exportimport/export/pandoc import/input.md -o export/output.docx--reference-doc=template.docx--toc--toc-depth=2--metadata="title=My Document"# Path depends on where skill is installed:
# - Project local: .agents/skills/pandoc-docx/ (or your skill installation path)
# - Global: ~/.config/skills/pandoc-docx/ (varies by OS and tool)
pandoc import/input.md -o export/output.docx \
--reference-doc=<skill-path>/assets/templates.docxpandoc import/document.docx -o export/document.md --extract-media=export/images/pandoc --print-default-data-file reference.docx > reference.docxpandoc import/input.md -o export/output.docx --reference-doc=reference.docxSKILL_PATH="<skill-path>" # Adjust to your skill installation path
for file in import/*.md; do
pandoc "$file" -o "export/$(basename "${file%.md}").docx" \
--reference-doc=$SKILL_PATH/assets/templates.docx
done# Run from project root. Adjust <skill-path> to where skill is installed:
<skill-path>/scripts/convert.sh report.md report.docx
# With options
<skill-path>/scripts/convert.sh report.md report.docx --toc
# Absolute paths work as usual
<skill-path>/scripts/convert.sh /path/to/input.md /path/to/output.docx