mermaid-studio
यह क्या करती है
यह स्किल Mermaid डायग्राम का कोड लिखती है, उसकी गलतियाँ जाँचती है और उसे इमेज फ़ाइलों में बदलती है। यह उन डेवलपर्स और लेखकों के लिए है जिन्हें दस्तावेज़ों में हाथ से बनाए बिना साफ़ डायग्राम चाहिए।
कब इस्तेमाल करें
- ✓जब आपको Mermaid कोड में फ़्लोचार्ट, सीक्वेंस डायग्राम या डेटाबेस डायग्राम चाहिए।
- ✓जब आपको किसी दस्तावेज़ या प्रेज़ेंटेशन के लिए डायग्राम इमेज फ़ाइल में चाहिए।
- ✓जब आप मौजूदा कोड को ऐसे डायग्राम में बदलना चाहते हों जो बताए कि वह कैसे काम करता है।
Skill का लिंक
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/mermaid-studio/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे लॉगिन फ़्लो का Mermaid सीक्वेंस डायग्राम बना सकते हैं और उसे PNG में एक्सपोर्ट कर सकते हैं?”
हर हफ़्ते 5 नई skills, 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
subgraphor 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, nots1oros) - 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:
- What to diagram — system, flow, schema, architecture, code structure?
- Which diagram type — use the Decision Matrix below
- Output format — code only, SVG, PNG, or ASCII?
- Theme preference — ask only if rendering; default to
basetheme 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 |
अक्सर पूछे जाने वाले सवाल
कौन-से डायग्राम प्रकार सपोर्ट होते हैं?
स्किल 20 से ज़्यादा Mermaid प्रकार सपोर्ट करती है, जिनमें फ़्लोचार्ट, सीक्वेंस, ERD, स्टेट, क्लास और आर्किटेक्चर डायग्राम शामिल हैं।
कौन-से आउटपुट फ़ॉर्मेट मिलते हैं?
यह 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
लोकप्रियता
- GitHub स्टार
- 7.1k
- रैंकिंग में स्थान
- #13570
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
component-common-domain-detection
7.1kयह आपके एजेंट को कोडबेस के कई हिस्सों में दोहराए गए बिज़नेस लॉजिक को ढूँढने और उन्हें मिलाने का तरीका सुझाने में मदद करती है।
component-flattening-analysis
7.1kयह आपके एजेंट को गलत जगह रखा गया कोड ढूँढने और उलझे हुए कंपोनेंट फ़ोल्डर ढाँचे को सीधा करने में मदद करती है, ताकि हर चीज़ अपनी सही जगह रहे।
component-identification-sizing
7.1kयह आपके एजेंट को कोडबेस के हिस्सों का नक्शा बनाने और उनका आकार मापने में मदद करती है, ताकि पता चले कि पहले किस मॉड्यूल को तोड़ना है।
coupling-analysis
7.1kयह आपके एजेंट को जाँचने में मदद करती है कि कोडबेस के हिस्से एक-दूसरे पर कितनी कसकर निर्भर हैं, और पहले कौन से जोड़ ढीले करने चाहिए।
मिलती-जुलती skills
technical-documentation
394kयह आपके एजेंट को साफ़ तकनीकी डॉक्स और एजेंट निर्देश फ़ाइलें लिखने और जांचने में मदद करती है, ताकि लोग और AI टूल उन्हें आसानी से समझ सकें।
architecture-decision-records
280kयह आपके एजेंट को project structure से जुड़े ज़रूरी फैसलों को दर्ज करने देता है। इससे पता चलता है कि कोई चुनाव क्यों किया गया, और बदलावों का साफ़ इतिहास बना रहता है।
code-tour
280kआपके एजेंट को exact file और line references के साथ step-by-step code walkthrough बनाने देता है। intro, explanations और reviews के लिए उपयोगी है।