Use when rendering Mermaid syntax into diagram image files for docs or articles (mermaid, flowchart, diagram, PNG, SVG, visualization).
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Use when rendering Mermaid syntax into diagram image files for docs or articles (mermaid, flowchart, diagram, PNG, SVG, visualization).
argument-hint
Mermaid code or description of the diagram to generate, e.g.: delivery lifecycle flowchart, service architecture diagram
user-invocable
true
Generate Mermaid Flowchart
Render Mermaid diagrams into PNG or SVG images using the local Mermaid CLI (mmdc).
When to Use
The task needs a visual flowchart, sequence diagram, class diagram, or other Mermaid-supported diagram.
A markdown document or article needs embedded diagram images instead of raw Mermaid code blocks.
Diagrams need to be exported as standalone PNG or SVG files for use in platforms that do not render Mermaid natively (e.g., WeChat articles, PDF exports).
When Not to Use
The target platform natively renders Mermaid (e.g., GitHub markdown) — use inline Mermaid code blocks instead.
The diagram needs rich custom styling, icons, or brand visuals — use generate-ai-image instead.
Define the diagram. Write or receive the Mermaid syntax. If the user provides a description instead of code, draft the Mermaid code first. Use <br/> for line breaks inside node labels (not \n).
Save the Mermaid source. Write the Mermaid code to a .mmd file in the target output directory (e.g., assets/diagrams/).