Render Mermaid diagrams to SVG or ASCII/Unicode with beautiful-mermaid (Node/Bun/Deno/browser, no DOM). Use when you need Mermaid render without DOM.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Mermaid code -> SVG or ASCII/Unicode. Themed output. TS-first.
pnpm add beautiful-mermaidrenderMermaid(code, opts?) -> Promise<string> (SVG)renderMermaidAscii(code, opts?) -> Promise<string> (ASCII/Unicode)fromShikiTheme(themeName) -> MermaidConfig["theme"]import { renderMermaid, renderMermaidAscii, fromShikiTheme } from "beautiful-mermaid";
const code = "flowchart LR\nA-->B";
const svg = await renderMermaid(code, {
theme: fromShikiTheme("catppuccin-mocha"),
backgroundColor: "#1e1e2e",
});
const ascii = await renderMermaidAscii(code, {
useUnicode: true,
maxWidth: 80,
});theme: MermaidConfig["theme"]. Default "default".backgroundColor: string. Default "transparent".themeConfig: MermaidConfig["themeConfig"].mermaidConfig: MermaidConfig.svgOptimize: SvgoConfig or false.useUnicode: boolean. Default true.wrap: boolean. Default true.maxWidth: number. Default 80.bg: string. Default "#FFFFFF".fg: string. Default "#000000".default, forest, dark, neutral, base, ocean, dimmed, darkes, light, catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha, dracula, dracula-soft, one-dark-pro, material-dark, material-light, material-darker, material-palenight, material-ocean, material-lighter, tokyo-night, tokyo-night-storm, tokyo-night-light, github-light, github-dark, github-dark-dimmed
.svg or inline in HTML.a0eadb2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.