mermaid-diagram-patterns

mermaid-diagram-patterns is a skill for Claude Code from thapaliyabikendra/ai-artifacts. It costs 67 tokens per session (1,726 once invoked), scanned A, original, Apache-2.0.

A reference for creating Mermaid diagrams in technical documentation. Mermaid is a text-based format for drawing diagrams such as database relationships, API interactions, workflows, and system architecture.

In plain words
What is it for?
Use it to document database schemas, API call sequences, process flows, architecture, state changes, user journeys, and decision trees.
Why use it?
It helps turn complex technical relationships and processes into diagrams that are easier to read and keep alongside source documentation.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to document database schemas, API call sequences, process flows, architecture, state changes, user journeys, and decision trees.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thapaliyabikendra/ai-artifacts/mermaid-diagram-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add thapaliyabikendra/ai-artifacts --skill mermaid-diagram-patterns
Clone the repo
git clone --depth 1 https://github.com/thapaliyabikendra/ai-artifacts

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mermaid-diagram-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/mermaid-diagram-patterns/github.svg)](https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/mermaid-diagram-patterns)
Your own site
<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/mermaid-diagram-patterns"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/mermaid-diagram-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mermaid-diagram-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/mermaid-diagram-patterns"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/mermaid-diagram-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,726 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01726
Opus 5 $0.00034 $0.00863
Sonnet 5 $0.00013 $0.00345
Haiku 4.5 $0.00007 $0.00173

Measured 8d ago against content hash b0dd1c33951d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mermaid-diagram-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/mermaid-diagram-patterns/SKILL.md · 266 lines

How it starts

The opening of the file, as written. The whole thing — 266 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mermaid Diagram Patterns

Create clear, professional Mermaid diagrams for technical documentation.

When to Use

  • Database schema visualization (ERD)
  • API interaction sequences
  • Process and workflow flowcharts
  • System architecture diagrams
  • State machines and user journeys
  • Decision trees

Diagram Type Selection

Scenario Diagram Type Mermaid Syntax
Database schema ERD erDiagram
API calls Sequence sequenceDiagram
Process flow Flowchart graph TD or flowchart TD
Component architecture Flowchart graph LR
State transitions State stateDiagram-v2
User workflow Journey journey
Project timeline Gantt gantt
Class relationships Class classDiagram

ERD Pattern (Database Schema)

Use for entity definitions in technical design documents.

erDiagram
    %% Entity definitions with attributes
    PATIENT {
        uuid Id PK
        string FirstName
        string LastName
        string Email UK
        string Phone
        date DateOfBirth
        timestamp CreationTime
        uuid CreatorId FK
        boolean IsDeleted
    }

    DOCTOR {
        uuid Id PK
        string FullName
        string Specialization
        string Email UK
        string Phone
    }

    APPOINTMENT {
        uuid Id PK
        uuid PatientId FK
        uuid DoctorId FK
        timestamp AppointmentDate
        string Description
        smallint Status "0=Scheduled,1=Completed,2=Cancelled"
    }

    %% Relationships
    PATIENT ||--o{ APPOINTMENT : "has"
    DOCTOR ||--o{ APPOINTMENT : "conducts"

ERD Conventions

Symbol Meaning
PK Primary Key
FK Foreign Key
UK Unique Key
`
`
}o--o{ Many-to-Many

Sequence Diagram Pattern (API Interactions)

Use for documenting API flows in technical design.

sequenceDiagram
    autonumber
    participant C as Client
    participant API as API Gateway
    participant S as AppService
    participant DB as Database

    C->>+API: POST /api/app/patients
    API->>API: Validate JWT
    API->>+S: CreateAsync(dto)
    S->>S: Validate input
    S->>+DB: Insert Patient
    DB-->>-S: Patient entity
    S-->>-API: PatientDto
    API-->>-C: 201 Created

    Note over C,DB: Error handling
    C->>+API: POST /api/app/patients (invalid)
    API->>+S: CreateAsync(dto)
    S-->>-API: ValidationException
    API-->>-C: 400 Bad Request

Read the full file on GitHub · 266 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 266 lines · 67 tokens per session scan A b0dd1c33951d

Subscribe to this mod's changes

mermaid-diagram-patterns is a skill published in the GitHub repository thapaliyabikendra/ai-artifacts (24 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,726 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories