Agent Skills: diagram-to-image

When a Mermaid diagram needs to be shared as an image → render to PNG/SVG.

UncategorizedID: cklxx/elephant.ai/diagram-to-image

Install this agent skill to your local

pnpm dlx add-skill https://github.com/cklxx/elephant.ai/tree/HEAD/skills/diagram-to-image

Skill Files

Browse the full folder contents for diagram-to-image.

Download Skill

Loading file tree…

skills/diagram-to-image/SKILL.md

Skill Metadata

Name
diagram-to-image
Description
When a Mermaid diagram needs to be shared as an image → render to PNG/SVG.

diagram-to-image

Render Mermaid code into image files.

Requirements

  • mmdc (Mermaid CLI) installed and in PATH.
  • Install command: npm install -g @mermaid-js/mermaid-cli

Constraints

  • action=render only.
  • Input field is code (Mermaid source).
  • Supported output formats: png (default), svg.
  • Render timeout: 30s.
  • Default output path: /tmp/diagram_<ts>.<format>.

Usage

python3 skills/diagram-to-image/run.py render --code 'graph LR
A[Client] --> B[API]
B --> C[(DB)]' --format png --theme default --output /tmp/diagram_arch.png