Langsung ke konten
Skillpedia
Dokumentasi7.1k Β· #13570

mermaid-studio

Fungsinya

Skill ini menulis kode diagram Mermaid, memeriksanya dari kesalahan, dan merendernya menjadi berkas gambar. Skill ini ditujukan untuk pengembang dan penulis yang menginginkan diagram yang jelas dalam dokumentasi tanpa menggambarnya dengan tangan.

Kapan dipakai

  • βœ“Saat Anda menginginkan diagram alur, diagram sekuens, atau diagram database yang ditulis dengan kode Mermaid.
  • βœ“Ketika Anda memerlukan diagram yang dirender menjadi berkas gambar untuk dokumen atau presentasi.
  • βœ“Ketika Anda ingin mengubah kode yang ada menjadi diagram yang menjelaskan cara kerjanya.

Link skill

https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/mermaid-studio/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/mermaid-studio/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda membuat diagram sekuens Mermaid tentang bagaimana alur login saya bekerja dan mengekspornya sebagai PNG?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menulis kode Mermaid dengan tema warna, memeriksa sintaksnya, lalu merender hasilnya. Agent juga bisa menganalisis kode yang ada untuk membuat diagram strukturnya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Mermaid Studio

Expert-level Mermaid diagram creation, validation, and multi-format rendering. Creates diagrams from descriptions or code analysis, validates syntax, and renders to SVG, PNG, or ASCII with professional theming.

Golden Rules β€” Elegant Diagrams by Default

Every diagram MUST follow these principles. They are not optional β€” they define the difference between a mediocre diagram and a gold-standard one.

Rule 1: Always Use an Init Directive for Professional Styling

NEVER create a diagram without an %%{init} directive or frontmatter config. The default Mermaid theme produces harsh black lines and generic colors. Always apply a curated palette.

For general diagrams (flowchart, sequence, state, class, ERD):

%%{init: {'theme': 'base', 'themeVariables': {
  'primaryColor': '#4f46e5', 'primaryTextColor': '#ffffff',
  'primaryBorderColor': '#3730a3', 'lineColor': '#94a3b8',
  'secondaryColor': '#10b981', 'tertiaryColor': '#f59e0b',
  'background': '#ffffff', 'mainBkg': '#f8fafc',
  'nodeBorder': '#cbd5e1', 'clusterBkg': '#f1f5f9',
  'clusterBorder': '#e2e8f0', 'titleColor': '#1e293b',
  'edgeLabelBackground': '#ffffff', 'textColor': '#334155'
}}}%%

⚠️ Font Warning: Do NOT set fontFamily in theme variables. The Mermaid default font (trebuchet ms, verdana, arial, sans-serif) works everywhere. Setting system-ui, Segoe UI, or -apple-system will render as Times New Roman in headless Chromium (used by mmdc).

For C4 diagrams β€” see the dedicated C4 styling section below.

For architecture-beta diagrams β€” see the dedicated AWS/Architecture section below.

Rule 2: Soft Lines, Never Harsh Black

The single biggest visual improvement is using lineColor: '#94a3b8' (slate-400) instead of the default black. This creates a modern, breathable diagram. For dark themes, use lineColor: '#64748b' (slate-500).

Rule 3: Limit Density β€” Breathe

  • Maximum 15 nodes per diagram (not 20 β€” fewer is more elegant)
  • Use subgraph or boundaries to create whitespace and visual grouping
  • Prefer LR (left-right) for process flows β€” it reads more naturally
  • Use invisible links (A ~~~ B) to add spacing when the layout is cramped

Rule 4: Meaningful Labels and Consistent Style

  • Node IDs: camelCase (orderService, not s1 or os)
  • Labels: short, clear natural language ([Order Service])
  • Arrows: action verbs with protocol info ("Sends order via gRPC")
  • Descriptions: one-line, role-focused ("Handles order lifecycle")

Rule 5: Color Harmony Over Color Variety

Use max 3-4 colors per diagram. Map colors to meaning:

  • Blue tones (#4f46e5, #3b82f6) β†’ primary systems, internal services
  • Green tones (#10b981, #059669) β†’ success states, data stores
  • Amber tones (#f59e0b, #d97706) β†’ external systems, warnings
  • Slate tones (#64748b, #94a3b8) β†’ lines, borders, secondary elements
  • Red tones (#ef4444) β†’ errors ONLY, never as decoration

Modes of Operation

This skill operates in three modes based on user intent:

Mode Trigger What happens
Create "draw a diagram of...", "visualize my..." Generates .mmd code only
Render "render this mermaid", "convert to SVG/PNG/ASCII" Renders existing .mmd
Full "create and render...", ambiguous requests Create β†’ Validate β†’ Render

Default to Full mode when intent is unclear.

Step 1: Understand the Request

Before writing any Mermaid code, determine:

  1. What to diagram β€” system, flow, schema, architecture, code structure?
  2. Which diagram type β€” use the Decision Matrix below
  3. Output format β€” code only, SVG, PNG, or ASCII?
  4. Theme preference β€” ask only if rendering; default to base theme with curated palette

Diagram Type Decision Matrix

User describes... Diagram Type Syntax keyword
Process, algorithm, decision tree, workflow Flowchart flowchart TD/LR
API calls, message passing, request/response Sequence sequenceDiagram
Database schema, table relationships ERD erDiagram
OOP classes, domain model, interfaces Class `classDiagra
Pertanyaan umum

Jenis diagram apa yang didukung?

Skill ini mendukung lebih dari 20 jenis Mermaid, termasuk diagram alur, sekuens, ERD, state, class, dan arsitektur.

Format keluaran apa yang diberikan?

Skill ini merender ke SVG, PNG, atau ASCII.

Apakah diagram diperiksa sebelum dirender?

Ya. Skill ini memvalidasi sintaks, sehingga kesalahan tertangkap sebelum berkas dibuat.

Detail

Deskripsi asli dari pembuat

Expert Mermaid diagram creation, validation, and rendering with dual-engine output (SVG/PNG/ASCII). Supports all 20+ diagram types including C4 architecture, AWS architecture-beta with service icons, flowcharts, sequence, ERD, state, class, mindmap, timeline, git graph, sankey, and more. Features code-to-diagram analysis, batch rendering, 15+ themes, and syntax validation. Use when users ask to create diagrams, visualize architecture, render mermaid files, generate ASCII diagrams, document system flows, model databases, draw AWS infrastructure, analyze code structure, or anything involving "me

repo: tech-leads-club/agent-skills

Popularitas

Bintang GitHub
7.1k
Peringkat
#13570
Lisensi
β€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa