
Mermaid To Image
Converts Mermaid diagram code blocks in your Markdown files to PNG images using the mermaid.ink API, then replaces the blocks with image references. You'd use this when publishing to platforms that don't render Mermaid natively, like GitHub Pages with Jekyll or Dev.to. It's smart about finding your project's image directory, generates descriptive filenames instead of generic ones, and handles the relative path logic for you. The workflow is solid: it scans for blocks, asks where to save images if unclear, renders via API, and swaps in the references. One caveat is that mermaid.ink can time out on very complex diagrams, so you might need to simplify or use a different renderer for those cases.
- skills.sh installs
- 4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add zc277584121/marketing-skills --skill mermaid-to-image --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/zc277584121/marketing-skills
- Categories
- Backend & APIs, Marketing & SEO
- First seen
- May 16, 2026