beautiful-mermaid
O que ela faz
Esta skill renderiza código de diagrama Mermaid em arquivos de imagem. Ela é para redatores e desenvolvedores que querem fluxogramas, diagramas de sequência ou diagramas de banco de dados como imagens.
Quando usar
- ✓Quando você quer renderizar como imagem um fluxograma, uma sequência, um estado ou um diagrama de banco de dados.
- ✓Quando você tem uma descrição em texto e quer o código Mermaid e uma imagem dele.
- ✓Quando você quer um diagrama em um tema de cor específico, como um tema escuro.
Link da skill
https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/beautiful-mermaid/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Transforme esta descrição de processo em uma imagem de fluxograma com tema escuro.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente escreve ou verifica o código Mermaid, aplica um tema de cor e renderiza o diagrama como arquivos SVG e PNG. A etapa do PNG usa uma ferramenta de navegador.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Beautiful Mermaid Diagram Rendering
Render Mermaid diagrams as SVG and PNG images using the Beautiful Mermaid library.
Dependencies
This skill requires the agent-browser skill for PNG rendering. Load it before proceeding with PNG capture.
Supported Diagram Types
- Flowchart - Process flows, decision trees, CI/CD pipelines
- Sequence - API calls, OAuth flows, database transactions
- State - State machines, connection lifecycles
- Class - UML class diagrams, design patterns
- Entity-Relationship - Database schemas, data models
Available Themes
Default, Dracula, Solarized, Zinc Dark, Tokyo Night, Tokyo Night Storm, Tokyo Night Light, Catppuccin Latte, Nord, Nord Light, GitHub Dark, GitHub Light, One Dark.
If no theme is specified, use default.
Common Syntax Patterns
Flowchart Edge Labels
Use pipe syntax for edge labels:
A -->|label| B
A ---|label| B
Avoid space-dash syntax which can cause incomplete renders:
A -- label --> B # May cause issues
Node Labels with Special Characters
Wrap labels containing special characters in quotes:
A["Label with (parens)"]
B["Label with / slash"]
Workflow
Step 1: Generate or Validate Mermaid Code
If the user provides a description rather than code, generate valid Mermaid syntax. Consult references/mermaid-syntax.md for full syntax details.
Step 2: Render SVG
Run the rendering script to produce an SVG file:
bun run scripts/render.ts --code "graph TD; A-->B" --output diagram --theme default
Or from a file:
bun run scripts/render.ts --input diagram.mmd --output diagram --theme tokyo-night
Alternative runtimes:
npx tsx scripts/render.ts --code "..." --output diagram
deno run --allow-read --allow-write --allow-net scripts/render.ts --code "..." --output diagram
This produces <output>.svg in the current working directory.
Step 3: Create HTML Wrapper
Run the HTML wrapper script to prepare for screenshot:
bun run scripts/create-html.ts --svg diagram.svg --output diagram.html
This creates a minimal HTML file that displays the SVG with proper padding and background.
Step 4: Capture High-Resolution PNG with agent-browser
Use the agent-browser CLI to capture a high-quality screenshot. Refer to the agent-browser skill for full CLI documentation.
# Set 4K viewport for high-resolution capture
agent-browser set viewport 3840 2160
# Open the HTML wrapper
agent-browser open "file://$(pwd)/diagram.html"
# Wait for render to complete
agent-browser wait 1000
# Capture full-page screenshot
agent-browser screenshot --full diagram.png
# Close browser
agent-browser close
For even higher resolution on complex diagrams, increase the viewport further or use the --padding option when creating the HTML wrapper to give the diagram more space.
Step 5: Clean Up Intermediary Files
After rendering, remove all intermediary files. Only the final .svg and .png should remain.
Files to clean up:
- The HTML wrapper file (e.g.,
diagram.html) - Any temporary
.mmdfiles created to hold diagram code - Any other files created during the rendering process
rm diagram.html
If a temporary .mmd file was created, remove it as well.
Output
Both outputs are always produced:
- SVG: Vector format, infinitely scalable, small file size
- PNG: High-resolution raster, captured at 4K (3840×2160) viewport with minimum 1200px diagram width
Files are saved to the current working directory unless the user explicitly specifies a different path.
Theme Selection Guide
| Theme | Background | Best For |
|---|---|---|
| default | Light grey | General use |
| dracula | Dark purple | Dark mode preference |
| tokyo-night | Dark blue | Modern dark aesthetic |
| tokyo-night-storm | Darker blue | Higher contrast |
| nord | Dark arctic | Muted, calm visuals |
| nord-light | Light arctic | Light mode with soft tones |
| github-dark | GitHub dark | Matches GitHub UI |
| github-light | GitHub light | Matches GitHub UI |
| catppuccin-latte | Warm light | Soft pastel aesthetic |
| solarized | Tan/cream | Solarized colour scheme |
| one-dark | Atom dark | Atom editor aesthetic |
| zinc-dark | Neutral dark | Minimal, no colour bias |
Troubleshooting
Theme not applied
Check the render script output for the bg and fg values, or inspect the SVG's opening tag for --bg and `--
Perguntas frequentes
Que formatos de imagem ela cria?
Ela cria arquivos SVG e PNG.
Quais tipos de diagrama são suportados?
Ela suporta fluxogramas, diagramas de sequência, diagramas de estado, diagramas de classe e diagramas entidade-relacionamento.
E se eu não escolher um tema?
É usado o tema padrão.
Detalhes
Descrição original do autor
Render Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.
repo: calesthio/OpenMontage
Popularidade
- Estrelas no GitHub
- 75 mil
- Posição no ranking
- #2642
- Licença
- AGPL-3.0
- Atualizada em
- 28/10/2026
Comentários
- …
Mais skills deste repositório
3d-asset-generation
75 milAjuda seu agente a escolher como criar objetos 3D para uma cena, usando catálogos, ferramentas de texto ou imagem para 3D e o Blender para a montagem final.
acestep
75 milAjuda seu agente a criar músicas de fundo, canções, jingles e stems para um vídeo usando o gerador de música aberto ACE-Step.
agents
75 milAjuda seu agente a construir assistentes de voz com IA usando o ElevenLabs, como bots de atendimento ao cliente e personagens de voz interativos.
ai-video-gen
75 milAjuda seu agente a gerar clipes de vídeo com IA a partir de uma descrição em texto ou de uma imagem de referência, escolhendo entre vários serviços de geração.
Skills parecidas
technical-documentation
394 milAjuda seu agente a escrever e revisar documentação técnica clara e arquivos de instruções, para que pessoas e ferramentas de IA sigam tudo com facilidade.
architecture-decision-records
280 milFaz seu agente registrar decisões importantes sobre a estrutura do projeto. Ajuda a entender o porquê das escolhas feitas e a manter um histórico claro das mudanças.
code-tour
280 milFaz seu agente criar guias passo a passo no código, com arquivos e linhas exatos. Útil para apresentar projetos, explicar código ou revisar mudanças.