OpenClaw
Deploy a managed OpenClaw agent in 60 seconds
Launch on Hostinger →
Hermes Agent
Run your Hermes agent, fully managed
Launch on Hostinger →
Apify
6,000+ web scrapers for your agent, free to start
Try Apify free →
Firecrawl
Crawl and scrape any site into clean data
Try Firecrawl free →
Context.dev
One API to scrape, enrich, and extract the web
Start building free →
SetupClaw
Done-for-you OpenClaw for founders and teams
Get it set up for you →
DataForSEO
SEO data APIs for your agent, $1 free credit
Try DataForSEO free →
Your product here
Reach thousands of AI builders a month
Learn more →
Claude Market
Menu
SkillsMCPPluginsSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Claude Market
SkillsMCPPluginsSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Skills/zc277584121/marketing-skills/mermaid-to-image
mermaid-to-image logo

mermaid-to-image

zc277584121/marketing-skills
1K installs0 stars
Run it on Hostinger, 20% off →Your friend gets 20% off too, using this linkFree API →|Command ExecutionExternal Downloads|View on GitHub|Create your own skill →

Installation

npx skills add https://github.com/zc277584121/marketing-skills --skill mermaid-to-image

Summary

Convert Mermaid code blocks in Markdown files to PNG images using the mermaid.ink API.

SKILL.md

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

If a clear image directory exists (e.g., images/, assets/images/), use it. Create a subdirectory by topic if appropriate (e.g., images/<topic>/).

If no image directory is obvious or multiple candidates exist, ask the user:

Where should I save the rendered Mermaid images?

1. images/ (create new)
2. assets/images/
3. docs/figures/
4. Custom — enter a path

Step 3: Render each diagram to PNG

Use the mermaid.ink API to render diagrams. Run this Python snippet for each block:

import base64, urllib.request

def render_mermaid(code: str, output_path: str):
    """Render a Mermaid diagram to PNG via mermaid.ink API."""
    encoded = base64.urlsafe_b64encode(code.encode()).decode()
    url = f"https://mermaid.ink/img/{encoded}?bgColor=white"
    req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
    resp = urllib.request.urlopen(req, timeout=30)
    with open(output_path, "wb") as f:
        f.write(resp.read())

Important: The User-Agent header is required — mermaid.ink returns 403 without it.

Naming convention

Use descriptive filenames based on the diagram content, not generic names:

  • GOOD: architecture-overview.png, data-flow.png, heartbeat-sequence.png
  • BAD: mermaid-1.png, diagram.png, image1.png

Step 4: Replace code blocks with image references

Replace each `mermaid ... ` block with a Markdown image reference using a relative path from the file to the image:

![Architecture overview](images/topic/architecture-overview.png)

If the project uses absolute URLs (e.g., GitHub Pages), use those instead:

![Architecture overview](https://example.github.io/images/topic/architecture-overview.png)

Choose the link style that matches the project's existing image references. If unsure, use relative paths.

Step 5: Report results

After processing, summarize:

  • How many diagrams were converted
  • Where the images were saved
  • Which files were modified

---

Edge Cases

  • Large diagrams: mermaid.ink may time out on very complex diagrams. If a render fails, report the error and suggest the user simplify the diagram or try an alternative renderer.
  • Multiple blocks in one file: process all blocks in order, give each a unique descriptive filename.
  • Already-rendered blocks: if a mermaid block already has a corresponding image (commented out or adjacent), skip it or ask the user.
  • Non-Markdown files: the same approach works for any text file containing mermaid code blocks (e.g., .rst, .txt).

Score

0–100
63/ 100

Grade

C

Popularity15/30

1,352 installs — growing adoption.

Completeness27/30

Documented: full SKILL.md body, description, one-line install. Missing: category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness — computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Mermaid To Image skill score badge previewScore badge

Markdown

[![Mermaid To Image skill](https://www.claudemarket.ai/skills/zc277584121/marketing-skills/mermaid-to-image/badges/score.svg)](https://www.claudemarket.ai/skills/zc277584121/marketing-skills/mermaid-to-image)

HTML

<a href="https://www.claudemarket.ai/skills/zc277584121/marketing-skills/mermaid-to-image"><img src="https://www.claudemarket.ai/skills/zc277584121/marketing-skills/mermaid-to-image/badges/score.svg" alt="Mermaid To Image skill"/></a>

Mermaid To Image FAQ

How do I install the Mermaid To Image skill?

Run “npx skills add https://github.com/zc277584121/marketing-skills --skill mermaid-to-image” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run — no restart or extra configuration needed.

What does the Mermaid To Image skill do?

Convert Mermaid code blocks in Markdown files to PNG images using the mermaid.ink API. The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Mermaid To Image skill free?

Yes. Mermaid To Image is a free, open-source skill published from zc277584121/marketing-skills. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Mermaid To Image work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Mermaid To Image works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Recommended skills

Browse all →
image-to-code logo

image-to-code

leonxlnx/taste-skill

192K installsInstall
imagegen-frontend-web logo

imagegen-frontend-web

leonxlnx/taste-skill

192K installsInstall
imagegen-frontend-mobile logo

imagegen-frontend-mobile

leonxlnx/taste-skill

187K installsInstall
coll_ai-image-generation logo

coll_ai-image-generation

skills-collective/skills

174K installsInstall
coll_image-to-video logo

coll_image-to-video

skills-collective/skills

164K installsInstall
image-to-video logo

image-to-video

skills-collective/skills

130K installsInstall

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

GuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before InstallingGuideOpenclaw Skills Complete Guide

Skills by category

FrontendBackend & APIsTesting & QASecurityDevOps & CI/CDMCP & ToolingAutomationData & Analysis+20 more

MCP servers by category

AI & MLDeveloper ToolsVector & MemoryFiles & DocsDatabasesFinance & PaymentsBrowser & ScrapingCommunication+8 more

Plugins by category

developmentproductivitycommunicationdesignsecuritydatabaseworkflowcompliance+34 more

The Agent Stack

Weekly Claude Code, Agent SDK, and MCP moves worth your time — free.

Claude Market

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

Independent project, not affiliated with Anthropic.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Plugins

More

  • Submit a Tool
  • Create a Skill
  • Advertise
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy
© 2026 Claude Market · Not affiliated with Anthropic
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0Featured on Uneed