Skip to content
Back to skills

Mermaid View

ASecurity

Convert Mermaid diagram code into high-fidelity SVG or PNG preview. Generate diagrams for architecture, flowcharts, sequence diagrams, and class models directly from CLI.

  • 3 stars
  • 0 votes
  • 1 copy
  • 3 views
  • Added September 9, 2026
ai-agentsbashsqlgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add mdnaimul22/human-skills --skill mermaid-view --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mermaid View?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mermaid View
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mdnaimul22-mermaid-view/badge)](https://www.skillsdirectory.com/skills/mdnaimul22-mermaid-view)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "mermaid-view"
description: "Convert Mermaid diagram code into high-fidelity SVG or PNG preview. Generate diagrams for architecture, flowcharts, sequence diagrams, and class models directly from CLI."
version: "1.0.0"
author: "Human Skills Team"
tags: ["mermaid", "diagram", "visualization", "png", "svg", "architecture", "flowchart"]
trigger_patterns:
  - "mermaid"
  - "mermaid diagram"
  - "generate diagram"
  - "render mermaid"
  - "mermaid-view"
  - "architecture diagram"
---

# mermaid-view — Diagram Renderer & Preview Generator

> *"Turn Mermaid code into crisp, high-fidelity PNG and SVG images instantly."*

---

## Overview

`mermaid_view` is a standalone tool that converts any Mermaid diagram code (flowcharts, sequence diagrams, class diagrams, state machines, entity-relationship diagrams, Gantt charts, etc.) into high-resolution **PNG** or **SVG** image files.

---

## Tool Reference: `mermaid_view`

### 📝 Arguments

| Argument | Type | Required | Description |
|:---|:---:|:---:|:---|
| `diagram_code` | `string` | **Yes** | The raw Mermaid code to render (e.g. `flowchart TD\n A --> B`). Markdown code fences (\`\`\`mermaid) are automatically stripped if present. |
| `path` | `string` | No | Target directory or explicit file path (e.g. `/home/user/my-project` or `/home/user/my-project/arch.png`). Defaults to current directory. |
| `preview` | `string` | No | Output format: `"png"` (default) or `"svg"`. |
| `file_name` | `string` | No | Optional custom file name (e.g. `architecture.png`). Defaults to `diagram.<preview>`. |
| `theme` | `string` | No | Mermaid theme: `"default"`, `"dark"`, `"neutral"`, `"forest"`, or `"base"`. Default: `"default"`. |

---

## Supported Diagram Types
* Flowcharts (`flowchart TD`, `graph LR`)
* Sequence Diagrams (`sequenceDiagram`)
* Class Diagrams (`classDiagram`)
* State Diagrams (`stateDiagram-v2`)
* Entity Relationship Diagrams (`erDiagram`)
* User Journey (`journey`)
* Git Graphs (`gitGraph`)
* Mindmaps (`mindmap`)
* Timelines (`timeline`)

## Usage Examples

### Render PNG, SVG Flowchart, Vector Diagram, Architecture Diagram
```bash
human-skills '{
  "tool_name": "mermaid_view",
  "tool_args": {
    "path": "/home/username/my-project", # e.g. `/home/user/my-project/arch.png`, default is `path`
    "preview": "png", # e.g. `svg`, default is `png`
    "file_name": "diagram.png", # e.g. `architecture.png`, default is `diagram.<preview>`
    "theme": "neutral", # e.g. `dark`, `neutral`, `forest`, `base`, default is `dark`
    "diagram_code": "flowchart TD\n    A[Client] --> B[API Gateway]\n    B --> C[Auth Service]\n    B --> D[Data Service]\n    D --> E[(PostgreSQL)]"
  }
}'
```

Files in this skill

  • SKILL.md2.6 KB
  • scripts/mermaid_view.py16.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.