AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Mermaid Diagrams

skill-m2laborg-agent-skills-mermaid-diagrams · by M2LabOrg

Always prefer Mermaid diagrams over ASCII art in markdown documents (READMEs, specs, ADRs, PR descriptions, reports). Use whenever the user asks for a diagram, flow, architecture sketch, sequence, state machine, ER diagram, or class diagram — and whenever you (the assistant) are about to draw boxes-and-arrows in a markdown file. Triggers on phrases like "draw a diagram", "show the flow", "archite…

No reviews yet
0 installs
35 views
0.0% view→install

Install

$ agentstack add skill-m2laborg-agent-skills-mermaid-diagrams

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-m2laborg-agent-skills-mermaid-diagrams)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Mermaid Diagrams? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Mermaid Diagrams (Not ASCII Art)

Markdown supports Mermaid natively on GitHub, Azure DevOps wikis, VS Code preview, and most modern viewers. Always use Mermaid for diagrams in markdown files. ASCII boxes-and-arrows are read-only, fragile to edit, accessibility-hostile, and don't render as images anywhere they matter.

Rule

When you would otherwise draw something like:

+--------+      +--------+
|  API   | ---> |  DB    |
+--------+      +--------+

Write this instead:

````markdown

flowchart LR
    API --> DB

````

Diagram Type Cheat-Sheet

Pick the diagram type that matches what you're showing. Don't force a flowchart for everything.

Flowchart — components and data flow

````markdown

flowchart LR
    User -->|HTTPS| CF[CloudFront]
    CF -->|/api/*| APIGW[API Gateway]
    APIGW --> NLB --> API[API Container]
    API --> DB[(Aurora Postgres)]
    API -->|enqueue| SQS[(SQS Queue)]
    SQS --> Inference[Inference Container]

````

Directions: LR (left-right), TB (top-bottom). Most architecture diagrams read better in LR.

Sequence — ordered interactions over time

````markdown

sequenceDiagram
    autonumber
    participant U as User
    participant A as API
    participant Q as SQS
    participant W as Worker
    U->>A: POST /jobs
    A->>Q: enqueue(jobId)
    A-->>U: 202 {jobId}
    Q->>W: deliver(jobId)
    W->>A: PATCH /jobs/{id} status=DONE

````

Use sequence when order matters. Add autonumber for traceability in long sequences.

State — lifecycles

````markdown

stateDiagram-v2
    [*] --> QUEUED
    QUEUED --> EXECUTING
    EXECUTING --> SUCCEEDED
    EXECUTING --> FAILED
    FAILED --> QUEUED: retry  DLQ: retry >= 3
    SUCCEEDED --> [*]
    DLQ --> [*]

````

ER — data model

````markdown

erDiagram
    USER ||--o{ JOB : creates
    JOB ||--|{ JOB_EVENT : has
    USER {
        uuid id PK
        string email
    }
    JOB {
        uuid id PK
        uuid user_id FK
        string status
    }

````

Class — type relationships

````markdown

classDiagram
    class JobHandler {
        +handle(event) void
    }
    class TextTranslationHandler
    class AudioEnhanceHandler
    JobHandler |HTTPS|`, `-->|enqueue|`, `-->|writes|`. Unlabeled arrows are noise.
- **Use shape semantics**:
  - `[Rectangle]` — service / process
  - `[(Cylinder)]` — datastore / queue
  - `((Circle))` — actor / start
  - `{Diamond}` — decision
- **Subgraph** to show trust boundaries, VPCs, accounts:

````markdown
```mermaid
flowchart LR
    subgraph AWS[AWS Account]
        API --> DB[(Postgres)]
    end
    User -->|HTTPS| API

````

  • Keep node names short. Put detail in labels, not in IDs.
  • Prefer flowchart over the older graph keyword.

Where to Use

  • READMEs — show how the project hangs together at a glance
  • Specs (spec-before-code skill) — Architecture and Threat Model sections
  • ADRs — visualize the decision and its impact
  • PR descriptions — when changing data flow, show before/after
  • Reports (research-and-report skill) — when a sequence or state transition explains the result
  • Wikis / runbooks — operational flows, on-call decision trees

Where Mermaid Renders Out-of-the-Box

  • GitHub markdown (issues, PRs, READMEs, wikis)
  • Azure DevOps wikis and PR descriptions (recent versions)
  • VS Code markdown preview (with extension or built-in on recent versions)
  • Most static site generators (Docusaurus, MkDocs Material, GitBook)
  • Notion (paste as code block with mermaid language)

If a renderer doesn't support Mermaid, that's a renderer problem, not a diagram problem. Don't fall back to ASCII; export the Mermaid to SVG/PNG and link it.

Migration Recipe

When you encounter ASCII art in an existing markdown file:

  1. Read what the diagram is trying to communicate.
  2. Pick the correct Mermaid diagram type.
  3. Replace the ASCII block with a mermaid fenced code block.
  4. Keep the surrounding prose; only swap the diagram.
  5. Render-check it (GitHub preview, VS Code preview) before committing.

Anti-Patterns

  • ASCII boxes-and-arrows in any new markdown file.
  • One mega-flowchart trying to show every component, every call, and every state.
  • Unlabeled arrows.
  • Embedding screenshots of diagrams when the source could be Mermaid (loses editability).
  • Mermaid for things Mermaid is bad at — pixel-perfect layouts, freeform sketches, photos. Use a real diagram tool (Excalidraw, draw.io) and embed the export.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.