본문으로 건너뛰기
Skillpedia
문서화7.1k · #13570

mermaid-studio

하는 일

이 스킬은 Mermaid 다이어그램 코드를 쓰고, 오류를 확인하고, 이미지 파일로 렌더링합니다. 문서에서 손으로 그리지 않고 명확한 다이어그램을 원하는 개발자와 작성자를 위한 것입니다.

사용하는 경우

  • ✓흐름도, 시퀀스 다이어그램, 데이터베이스 다이어그램을 Mermaid 코드로 쓰고 싶을 때.
  • ✓문서나 발표 자료에 쓸 다이어그램을 이미지 파일로 렌더링해야 할 때.
  • ✓기존 코드를 그 구조를 설명하는 다이어그램으로 바꾸고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/mermaid-studio/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 로그인 흐름을 보여 주는 Mermaid 시퀀스 다이어그램을 만들고, PNG로 내보내 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 색상 테마를 포함한 Mermaid 코드를 쓰고, 문법을 확인한 뒤, 결과를 렌더링합니다. 기존 코드를 분석해 구조를 보여주는 다이어그램을 만들 수도 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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
자주 묻는 질문

어떤 다이어그램 유형을 지원하나요?

흐름도, 시퀀스, ERD, 상태, 클래스, 아키텍처 다이어그램 등 20가지 이상의 Mermaid 유형을 지원합니다.

어떤 출력 형식을 주나요?

SVG, PNG, ASCII로 렌더링합니다.

렌더링 전에 다이어그램을 확인하나요?

네. 문법을 검사하므로 파일을 만들기 전에 오류를 잡아냅니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
7.1k
순위
#13570
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬