mermaid-studio
Qué hace
Esta skill escribe código de diagramas de Mermaid, lo revisa en busca de errores y lo convierte en archivos de imagen. Es para desarrolladores y redactores que quieren diagramas claros en su documentación sin dibujarlos a mano.
Cuándo usarla
- ✓Cuando quieres un diagrama de flujo, de secuencia o de base de datos escrito en código de Mermaid.
- ✓Cuando necesitas generar un diagrama en un archivo de imagen para un documento o una presentación.
- ✓Cuando quieres convertir código existente en un diagrama que explique cómo funciona.
Link de la skill
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/mermaid-studio/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes hacer un diagrama de secuencia en Mermaid de cómo funciona mi flujo de inicio de sesión y exportarlo como PNG?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente escribe código de Mermaid con un tema de colores, comprueba la sintaxis y genera el resultado. También puede analizar código existente para crear un diagrama de su estructura.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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 |
Preguntas frecuentes
¿Qué tipos de diagrama admite?
La skill admite más de 20 tipos de Mermaid, incluidos diagramas de flujo, de secuencia, ERD, de estados, de clases y de arquitectura.
¿En qué formatos entrega el resultado?
Genera SVG, PNG o ASCII.
¿Comprueba el diagrama antes de generarlo?
Sí. Valida la sintaxis, así que los errores se detectan antes de crear el archivo.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 7,1 mil
- Posición en el ranking
- #13570
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
component-common-domain-detection
7,1 milAyuda a tu agente a encontrar la lógica de negocio repetida en varias partes de una base de código y a sugerir cómo combinarla.
component-flattening-analysis
7,1 milAyuda a tu agente a encontrar código mal colocado y aplanar las estructuras de carpetas de componentes desordenadas, para que cada pieza esté donde debe.
component-identification-sizing
7,1 milAyuda a tu agente a mapear las partes de una base de código y medir su tamaño, para encontrar qué módulo conviene dividir primero.
coupling-analysis
7,1 milAyuda a tu agente a comprobar cuán estrechamente dependen unas partes de una base de código de otras, y qué conexiones conviene aflojar primero.
Skills parecidas
technical-documentation
394 milAyuda a tu agente a escribir y revisar documentación técnica clara y archivos de instrucciones para agentes, para que personas y herramientas de IA puedan seguirlos fácilmente.
architecture-decision-records
280 milHace que tu agente registre las decisiones importantes sobre la estructura del proyecto. Así se entiende el motivo de cada elección y se mantiene un historial claro.
code-tour
280 milPermite que tu agente cree recorridos paso a paso por el código, con referencias exactas a archivos y líneas. Útil para introducciones, explicaciones y revisiones.