Claude
Skills
Sign in
Back

diagram-to-image

Included with Lifetime
$97 forever

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

Image & Video

What this skill does


# 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

```bash
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
```
Files: 4
Size: 7.1 KB
Complexity: 18/100
Category: Image & Video

Related in Image & Video