Dev swarm mermaid

From X-School-Academy/skill-pilot · View interactive version

Dev swarm mermaid is an AI agent skill from the GitHub repository X-School-Academy/skill-pilot. Create Mermaid diagrams and convert them to images. Use when needing to visualize flows, architecture, or data structures.

How to use this skill

Skill file

Mermaid Diagram Generation

This skill provides instructions for creating Mermaid diagrams and converting them to SVG or PNG images using the Mermaid CLI (mmdc).

When to Use This Skill

Prerequisites

Your Roles in This Skill

Role Communication

As an expert in your assigned roles, you must announce your actions before performing them using the following format:

As a {Role} [and {Role}, ...], I will {action description}

This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.

Installation

We recommend using pnpm dlx to execute the Mermaid CLI without a permanent global installation.

Verify mmdc availability:

pnpm dlx @mermaid-js/mermaid-cli --version

Usage

  1. Create a Mermaid file:

Create a file with .mmd extension (e.g., diagram.mmd) containing the Mermaid diagram definition.

Example diagram.mmd:

```mermaid

flowchart TD

A[Idea] --> B[AI Agent]

B --> C[Design]

C --> D[Code]

D --> E[Test]

E --> F[Deploy]

```

  1. Generate Image:

Use pnpm dlx to run the Mermaid CLI and convert the .mmd file to an image (SVG recommended for scalability).

```bash

pnpm dlx @mermaid-js/mermaid-cli -i diagram.mmd -o diagram.svg

```

For PNG output:

```bash

pnpm dlx @mermaid-js/mermaid-cli -i diagram.mmd -o diagram.png

```

Common Diagram Types

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.