Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add bowenliang123/md_exporter
Or install specific skill: npx add-skill https://github.com/bowenliang123/md_exporter
# Description
Markdown exporter for export Markdown text to DOCX, PPTX, XLSX, PDF, PNG, HTML, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files. Also known as the md_exporter skill.
# SKILL.md
name: markdown-exporter
description: Markdown exporter for export Markdown text to DOCX, PPTX, XLSX, PDF, PNG, HTML, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files. Also known as the md_exporter skill.
allowed-tools:
disable: false
✨ What is Markdown Exporter?
Markdown Exporter is a Agent Skill that transforms your Markdown text into a wide variety of professional formats. Whether you need to create polished reports, stunning presentations, organized spreadsheets, or code files—this tool has you covered.
Tools and Supported Formats
| Tool | Input | Output |
|---|---|---|
md_to_docx |
📝 Markdown | 📄 Word document (.docx) |
md_to_html |
🌐 HTML file (.html) | |
md_to_html_text |
🌐 HTML text string | |
md_to_pdf |
📑 PDF file (.pdf) | |
md_to_png |
🖼️ PNG image(s) of PDF pages | |
md_to_md |
📝 Markdown file (.md) | |
md_to_pptx |
📝 Markdown slides
in md2pptx style
|
🎯 PowerPoint (.pptx) |
md_to_xlsx |
📋 Markdown tables | 📊 Excel spreadsheet (.xlsx) |
md_to_csv |
📋 CSV file (.csv) | |
md_to_json |
📦 JSON/JSONL file (.json) | |
md_to_xml |
🏷️ XML file (.xml) | |
md_to_latex |
📝 LaTeX file (.tex) | |
md_to_codeblock |
💻 Code blocks in Markdown | 📁 Code files by language (.py, .js, .sh, etc.) |
md_to_linked_image |
🖼️ Image links in Markdown | 🖼️ Downloaded image files |
Prerequisites
To use the Markdown Exporter skill, ensure you have the following prerequisites installed:
- Python 3.11 or higher
- (optional) uv package manager
📦 Usage
Overview
All scripts provided in this project are Python scripts located in the scripts/ directory. All required Python dependencies are declared in the project's pyproject.toml file.
Recommended Execution Method - Using Bash Scripts
We strongly recommend using the bash scripts located in the scripts/ directory. These scripts provide a seamless experience by automatically handling dependency management and execution:
- Automatic Dependency Management: When you run a bash script from the
scripts/directory, it will: - First check if the
uvpackage manager is installed - If
uvis available, it will useuv runto automatically install dependencies and execute the Python script in one step - If
uvis not available, it will fall back to usingpipto install dependencies fromrequirements.txtbefore executing the script -
Check that Python 3.11 or higher is installed (when using pip fallback)
-
Execute scripts with bash:
bash scripts/md-exporter <script_name> <args> [options]
Alternative Execution Method - Direct Python Execution
You can also run the Python scripts directly, but you'll need to manage dependencies yourself:
-
Using uv (recommended if running directly):
bash uv run python scripts/parser/<script_name>.py <args> [options] -
Using pip:
bash # Install dependencies first pip install -r requirements.txt # Then run the script python scripts/parser/<script_name>.py <args> [options]
Important Notes
- Always navigate to the root directory of the project before executing any scripts.
- The bash scripts in
scripts/provide the most convenient way to run the tools, as they handle all dependency management automatically. - All scripts only support file paths as input
🔧 Scripts
md_to_csv - Convert Markdown tables to CSV
Converts Markdown tables to CSV format.
Usage:
scripts/md-exporter md_to_csv <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output CSV file path
Options:
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_csv /path/input.md /path/output.csv
md_to_pdf - Convert Markdown to PDF
Converts Markdown text to PDF format with support for Chinese, Japanese, and other languages.
Usage:
scripts/md-exporter md_to_pdf <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output PDF file path
Options:
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_pdf /path/input.md /path/output.pdf
md_to_docx - Convert Markdown to DOCX
Converts Markdown text to DOCX format using pandoc.
Usage:
scripts/md-exporter md_to_docx <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output DOCX file path
Options:
- --template - Path to DOCX template file (optional)
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_docx /path/input.md /path/output.docx
scripts/md-exporter md_to_docx /path/input.md /path/output.docx --template /path/template.docx
md_to_xlsx - Convert Markdown tables to XLSX
Converts Markdown tables to XLSX format with multiple sheets support.
Usage:
scripts/md-exporter md_to_xlsx <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output XLSX file path
Options:
- --force-text - Convert cell values to text type (default: True)
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_xlsx /path/input.md /path/output.xlsx
md_to_pptx - Convert Markdown to PPTX
Converts Markdown text to PPTX format using md2pptx.
Usage:
scripts/md-exporter md_to_pptx <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output PPTX file path
Options:
- --template - Path to PPTX template file (optional)
Example:
scripts/md-exporter md_to_pptx /path/input.md /path/output.pptx
md_to_codeblock - Extract Codeblocks to Files
Extracts code blocks from Markdown and saves them as individual files.
Usage:
scripts/md-exporter md_to_codeblock <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output file or directory path
Options:
- --compress - Compress all code blocks into a ZIP file
Example:
scripts/md-exporter md_to_codeblock /path/input.md /path/output_dir
scripts/md-exporter md_to_codeblock /path/input.md /path/output.zip --compress
md_to_json - Convert Markdown Tables to JSON
Converts Markdown tables to JSON or JSONL format.
Usage:
scripts/md-exporter md_to_json <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output JSON file path
Options:
- --style - JSON output style: jsonl (default) or json_array
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_json /path/input.md /path/output.json
scripts/md-exporter md_to_json /path/input.md /path/output.json --style json_array
md_to_xml - Convert Markdown to XML
Converts Markdown text to XML format.
Usage:
scripts/md-exporter md_to_xml <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output XML file path
Options:
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_xml /path/input.md /path/output.xml
md_to_latex - Convert Markdown Tables to LaTeX
Converts Markdown tables to LaTeX format.
Usage:
scripts/md-exporter md_to_latex <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output LaTeX file path
Options:
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_latex /path/input.md /path/output.tex
md_to_html - Convert Markdown to HTML
Converts Markdown text to HTML format using pandoc.
Usage:
scripts/md-exporter md_to_html <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output HTML file path
Options:
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_html /path/input.md /path/output.html
md_to_html_text - Convert Markdown to HTML Text
Converts Markdown text to HTML and outputs to stdout.
Usage:
scripts/md-exporter md_to_html_text <input>
Arguments:
- input - Input Markdown file path
Example:
scripts/md-exporter md_to_html_text /path/input.md
md_to_png - Convert Markdown to PNG Images
Converts Markdown text to PNG images (one per page).
Usage:
scripts/md-exporter md_to_png <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output PNG file path or directory path
Options:
- --compress - Compress all PNG images into a ZIP file
- --strip-wrapper - Remove code block wrapper if present
Example:
scripts/md-exporter md_to_png /path/input.md /path/output.png
scripts/md-exporter md_to_png /path/input.md /path/output.png --compress
md_to_md - Convert Markdown to MD File
Saves Markdown text to a .md file.
Usage:
scripts/md-exporter md_to_md <input> <output>
Arguments:
- input - Input Markdown file path
- output - Output MD file path
Example:
scripts/md-exporter md_to_md /path/input.md /path/output.md
md_to_linked_image - Extract Image Links to Files
Extracts image links from Markdown and downloads them as files.
Usage:
scripts/md-exporter md_to_linked_image <input> <output> [options]
Arguments:
- input - Input Markdown file path
- output - Output file or directory path
Options:
- --compress - Compress all images into a ZIP file
Example:
scripts/md-exporter md_to_linked_image /path/input.md /path/output_dir
scripts/md-exporter md_to_linked_image /path/input.md /path/output.zip --compress
📝 Notes
- All scripts only support file paths as input
- For scripts that generate multiple files (e.g., multiple tables, multiple code blocks), the output filename will be automatically numbered
- Use the
--strip-wrapperoption to remove code block wrappers (```) from the input Markdown - For PPTX conversion, ensure the
md2pptxdirectory is available in thetools/md_to_pptx/directory
# README.md
Markdown Exporter
An Agent Skill and Dify plugin to Export Markdown Into Powerful Documents
- Author: bowenliang123
-
Markdown Exporter can be used as:
| Use As | Installation |
|---|---|
| Dify Plugin | Platform: Dify - Install from the Dify Marketplace. - Guide: Docs for Installing Dify Plugins. |
| Agent Skills (standalone) |
Platform: SKILL.md is availiable for Any Agent Skills supported platform. - IDEs / CLIs (Claude Code, Trae, Codebuddy etc.) - Agent Frameworks ( LangChain DeepAgents, AgentScope etc.). - Local Import: Import the source code zip file. - Remote install: Run /plugin marketplace add bowenliang123/md_exporter on CLIs, installing as a Clude Marketplace plugin. |
| Python Package | Platform: Python - md-exporter on PyPI. Install by pip install md-exporter. |
✨ What is Markdown Exporter?
Markdown Exporter is a powerful toolset as an Agent Skill or a Dify plugin and that transforms your Markdown text into a wide variety of professional formats. Whether you need to create polished reports, stunning presentations, organized spreadsheets, or code files—this tool has you covered.
With support for 15+ output formats, Markdown Exporter bridges the gap between simple text editing and professional document creation, all while maintaining the simplicity and elegance of Markdown syntax.
🎯 Why You'll Love It
- 🚀 Lightning Fast – Export your Markdown to multiple formats in milliseconds
- 🎨 Customizable – Use custom templates for DOCX and PPTX to match your brand
- 🔒 100% Private – All processing happens locally, no data ever leaves your environment
- 📊 Versatile – From documents to spreadsheets, presentations to code files
- 🌐 Multi-Language Support – Perfect for international teams and content
🛠️ Introduction and Use Guide
Tools and Supported Formats
| Tool | Input | Output |
|---|---|---|
md_to_docx |
📝 Markdown text | 📄 Word document (.docx) |
md_to_html |
🌐 HTML file (.html) | |
md_to_html_text |
🌐 HTML text string | |
md_to_pdf |
📑 PDF file (.pdf) | |
md_to_png |
🖼️ PNG image(s) of PDF pages | |
md_to_md |
📝 Markdown file (.md) | |
md_to_pptx |
📝 Markdown slides
in md2pptx style
|
🎯 PowerPoint (.pptx) |
md_to_xlsx |
📋 Markdown tables | 📊 Excel spreadsheet (.xlsx) |
md_to_csv |
📋 CSV file (.csv) | |
md_to_json |
📦 JSON/JSONL file (.json) | |
md_to_xml |
🏷️ XML file (.xml) | |
md_to_latex |
📝 LaTeX file (.tex) | |
md_to_codeblock |
💻 Code blocks in Markdown | 📁 Code files by language (.py, .js, .sh, etc.) |
md_to_linked_image |
🖼️ Image links in Markdown | 🖼️ Downloaded image files |
📖 Usage Example

Simply input your Markdown text, select your desired output format, and click export. It's that easy!
🎨 Tool Showcase
📄 Markdown → DOCX
Create professional Word documents with beautiful formatting.
✨ Pro Tip: Custom Styling with Templates
The
md_to_docxtool supports custom DOCX template files, giving you full control over your document's appearance.What you can customize:
- Heading styles (fonts, sizes, colors)
- Paragraph formatting (spacing, indentation)
- Table styles and borders
- List styles and bullets
- And much more!Check out the default docx template or create your own. Learn how at Customize or create new styles.

📊 Markdown → XLSX
Convert your Markdown tables into polished Excel spreadsheets with auto-fitted columns and preserved data types.
Input:
| Name | Age | City |
|---------|-----|-------------|
| Alice | 30 | New York |
| Bowen | 25 | Guangzhou |
| Charlie | 35 | Tokyo |
| David | 40 | Miami |
Output:

🎯 Markdown → PPTX
Turn your Markdown into stunning PowerPoint presentations automatically.
✨ Syntax Requirements
Input slides must follow md2pptx syntax.
Supported Features:
- ✅ Title slides
- ✅ Bullet lists with nesting
- ✅ Tables
- ✅ Hyperlinks
- ✅ And more!🎨 Custom Templates:
Use custom PPTX templates with slide masters to match your brand's visual identity. Learn how. Get the default pptx template.
Input Example:
# Markdown Exporter
### Slide 1 Title
* One
* One A
* One B
* Two
* Two X
* Two Y
### Slide 2 Title
|Left Heading|Centre Heading|Right Heading|
|:---|:-:|--:|
|Alpha|Bravo|1|
|Charlie|Delta|2|
Output:

🌐 Markdown → HTML
Transform your Markdown into clean, semantic HTML perfect for web pages.

📑 Markdown → PDF
Generate professional PDF documents perfect for printing or sharing.

🖼️ Markdown → PNG
Convert your Markdown into beautiful PNG images. Great for:
- Social media posts
- Documentation screenshots
- Quick sharing in chat apps

💻 Markdown → Code Block Files
Effortlessly extract code blocks from your Markdown and save them as individual files, preserving syntax highlighting and formatting.
Supported Languages & File Extensions
| Language | File Extension | Language | File Extension |
|---|---|---|---|
| Python | .py |
CSS | .css |
| JavaScript | .js |
YAML | .yaml |
| HTML | .html |
Ruby | .rb |
| Bash | .sh |
Java | .java |
| JSON | .json |
PHP | .php |
| XML | .xml |
Markdown | .md |
| SVG | .svg |

Pro Tip: Enable compression to bundle all extracted files into a single ZIP archive for easy sharing and organization!


🖼️ Markdown → Linked Images
Automatically download all images referenced in your Markdown.

📋 Markdown → CSV
Export your Markdown tables to universal CSV format.

📦 Markdown → JSON / JSONL
Convert your tables into structured data formats.
JSONL Style (default)
- One JSON object per line
- Perfect for streaming and logging

JSON Array Style
- All objects in a single array
- Ideal for API responses

🏷️ Markdown → XML
Transform your data into XML format.

📝 Markdown → LaTeX
Generate LaTeX source code for academic and technical documents.
LaTeX Output:

Compiled PDF:

📝 Markdown → Markdown
Save your Markdown content as a .md file for future use.
📢 Changelog
Releases are available at
- Github Repo Releases.
- Dify Marketplace Releases.
Release changelogs:
- 3.3.0:
- Update md_to_pptx from 6.1.1 to 6.2.1
- Remove md_to_mermaid tool for less installation timecost and footprint for downloading Nodejs runtime
- 3.2.0:
- Introduce
md_to_mermaidtool for converting Mermaid diagram code blocks in Markdown to PNG images -
Refactor Agent Skill scripts and entry shell scripts
-
3.0.0:
md_exporteris now ready for Agent Skills and runnable in standalone- Add
SKILL.mdfor Agent Skills description - Add
/scriptsfor code scripts of all tools as Agent Skills exectuion entry - Extract the core file transformation logic into
/scripts/libsharing by both Agent Skills scripts and Dify Plugin - Add
pyproject.tomlas Python project description and dependency management
- Add
- Add automated tests covering all usage of entry of Claude Skills scripts
-
bump
md2pptxfrom 6.1 to 6.1.1 for bug fix in table caption -
2.3.0:
-
resolve xlsx generation by skipping irrelevant chars before first table in
md_to_xlsxtool -
2.2.0:
-
fix CI problems in GitHub Actions
-
2.1.0:
-
fix remote image fetching in
md_to_pptxtool by updatingmd2pptxto 6.1 -
2.1.0:
- fix missing table border in
md_to_docxtool by updating default docx template file -
intercept
run-pythonmarco usage inmd_to_pptxtool -
2.0.0:
- [ BREAKING CHANGE ] migrate
md_to_docxtool to usepandocfor conversion - Major improvements in
md_to_docxtool- support custom styling by using a template DOCX file, setting the fonts, font size, color style for headings, paragraphs, etc.
- optimized file size in generated docx file
- better support for multi-language content
- remove
md_to_rstandmd_to_epubtools -
add
force_text_valueoption in md_to_xlsx tool to control whether to force convert all cell values to text string -
1.12.0:
- fix input pptx template file optional in
md_to_pptxtool - fix error message with file path in cmd assembly in
md_to_pptxtool -
bump
md2pptxto 6.0 -
1.10.2:
- bump
md2pptxfrom 5.4.4 to 5.4.5 - bump
python-docxfrom 1.1 to 1.2.0 -
increase PDF generation capacity limit to 500MB
-
1.10.0:
- Support output JSONL style in
md_to_jsontool, as JSON Lines format with one object per line - Change the default output style of
md_to_jsontool to JSONL -
Minor doc updates in parameter description
-
1.9.0:
- Support custom sheet name in
md_to_xlsxtool by using headings in Markdown text - Force convert column type to string in
md_to_xlsxtool to prevent data precision loss and display issues in Microsoft Excel -
Autofit column width in
md_to_xlsxtool -
1.8.0:
-
Solve issues with garbled characters when opening CSV files containing non-ASCII characters (eg. Chinese or Japanese characters, Emoji characters etc.) in Microsoft Excel
-
1.7.0:
- Support custom PPTX template file in
md_to_pptxtool -
Support file generation from multiple tables in md_to_csv, md_to_latex, md_to_xlsx tools
-
1.6.0:
- Introducing
md_to_html_texttool, support converting Markdown text to HTML text -
Standardize fonts for headings and body paragraphs DOCX file generated by
md_to_docxtool -
1.5.0:
- Improve PDF display for pure English markdown text input in
md_to_pdftool, by skipping the font setting for CJK characters - Introduce
md_to_epubtool, support converting Markdown text to EPUB eBook files - Support compressing all png files in single zip file in
md_to_pngtool - Increase capacity limit for PDF file to 100MB in
md_to_pdftool -
Remove explicit timeout config MAX_REQUEST_TIMEOUT
-
1.4.100:
- Special version for celebrating Dify's 100k GitHub stars milestone
-
add
md_to_pngtool, support converting Markdown text to PNG image files -
1.3.0:
-
update SDK version
-
1.2.0:
-
Support compressing images to single zip file in
md_to_linked_imagetool -
1.1.0:
- Enable line breaks normalization in all tools by default, replacing all the occurrences of
\\nto\n - Remove
<think>tags of reasoning content in the input Markdown text -
Fix missing custom output filename support in md_to_csv, md_to_json, md_to_latex tool
-
1.0.1:
-
Remove redundant URL safe conversion in custom output filename
-
1.0.0:
-
Support customize the output file name
-
0.5.0:
-
Introducing
md_to_linked_imagetool, support extracting image files in links in Markdown text -
0.4.3:
-
improve the display of Chinese characters in text paragraph in
md_to_docxtool, by setting global font to Song if content contains Chinese - improve the display of Chinese characters in text paragraph inmd_to_docxtool, by setting global font to Song if content contains Chinese charactor -
0.4.2:
-
support Java, PHP and Ruby file exporting in
md_to_codeblockstool -
0.4.1:
-
support YAML file exporting in
md_to_codeblockstool -
0.4.0:
-
support exporting Markdown codeblocks in to single zip file in
md_to_codeblockstool -
0.3.0:
-
Fixed the error in importing libraries of
md_to_pptxtool when running on self-hosted Dify plugin-daemon service -
0.2.0:
- Introducing
md_to_codeblocktool, support extracting code blocks in Markdown to Python, JSON, JS, BASH, SVG, HTML, XML, MARKDOWN files. -
Introducing
md_to_rsttool, support reStructuredText.rstfile format as destination file format -
0.1.x:
-
Introducing
md_to_pptxtool, support PowerPoint.pptxfile format as destination file format -
0.0.x:
- Published to Dify Marketplace
- support exporting Markdown to DOCX, PPTX, XLSX, PDF, HTML, MD, CSV, JSON, XML, LaTex files
🤝 Contributing
Contributions are welcome! Please feel free to submit issues or pull requests on our GitHub repository.
Code Style
We use ruff to ensure code consistency. Run the following command to automatically fix code style issues:
uv run ruff check --fix --select UP .
Or use the provided script:
uv run dev.reformat.sh
📜 License
This project is licensed under the Apache License 2.0.
🔒 Privacy
Your privacy matters. This plugin:
- Collects NO data
- Processes everything locally
- Sends NO information to third-party services
All file transformations happen entirely within your environment.
🙏 Acknowledgments
This project stands on the shoulders of giants. We're grateful to these amazing open-source projects:
| Project | License |
|---|---|
| md2pptx | MIT License |
| pypandoc | MIT License |
| pandas | BSD 3-Clause License |
| python-pptx | MIT License |
| xhtml2pdf | Apache License 2.0 |
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.