
Mermaid To Image
Convert Mermaid code blocks in Markdown and other text files into PNG images via the mermaid.ink API.
- skills.sh installs
- 4K
- last updated
- Aug 21, 2026
What it does
- Covers the full conversion flow: scan target files, choose an output directory, render each block, and swap blocks for image references
- Includes a Python
render_mermaidhelper that base64-encodes each diagram and requests a white-background PNG from mermaid.ink - Enforces a
User-Agentheader on requests, because mermaid.ink returns 403 without it, and descriptive filenames over generic names - Designed for publishing targets that cannot render Mermaid natively, such as GitHub Pages/Jekyll and Dev.to
Install
$ npx -y skills add zc277584121/marketing-skills --skill mermaid-to-image -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Skill: Mermaid to Image
Convert ```mermaid code blocks in Markdown (or other text) files into PNG images, and replace the code blocks with image references. Useful for platforms that don't render Mermaid natively (GitHub Pages/Jekyll, Dev.to, etc.).
When to Use
- The user asks to convert Mermaid diagrams in a file to images
- The user wants to render specific Mermaid code blocks as PNG
- A publishing workflow requires static images instead of Mermaid code blocks
Workflow
Step 1: Identify target files
The user may specify:
- A single file:
convert mermaid blocks in docs/architecture.md - Multiple files:
convert mermaid in all files under docs/ - A specific code block:
convert the second mermaid block in README.md
Scan the target file(s) for ```mermaid code blocks. Report how many blocks were found and in which files before proceeding.
Step 2: Determine the image output directory
Check the project structure to find where images are typically stored:
# Look for common image directories
ls -d images/ img/ assets/ assets/images/ static/images/ docs/images/ 2>/dev/null
Details
- Repository
- github.com/zc277584121/marketing-skills
- Category
- Technical Documentation
- First seen
- May 16, 2026
More from zc277584121/marketing-skills
All 14Similar to Mermaid To Image
More Technical Documentation
md-to-feishuSkillzc277584121/marketing-skills3.8K installsConvert local Markdown files into Feishu documents, rendering Mermaid diagrams and uploading images automatically.
mermaid-to-gifSkillzc277584121/marketing-skills3.9K installsConverts Mermaid diagrams in .mmd and .md files into animated GIFs with four selectable motion styles.
diagram-to-imageSkillsugarforever/01coder-agent-skills515 installsConvert Mermaid diagrams and Markdown tables into styled PNG images via an external rendering API.
Agentic MermaidMCP serveradewale72 starsRender, verify, and safely edit Mermaid diagrams for MCP-capable agents, with SVG, PNG, and ASCII output.
mermaid-toolsSkilldaymade/claude-code-skills1.5K installsExtracts Mermaid diagrams from markdown and renders them as validated, size-adjusted PNG images.
draw.ioMCP serverjgraph5.9K starsCreate and display interactive draw.io diagrams from Mermaid or draw.io XML, with 10,000+ library shapes.