Skip to content
Back to skills

Mermaider Layout Msagl

ASecurity

Use when a Mermaider user needs flowchart, state, class or ER output laid out by Microsoft MSAGL to match SVGs produced by earlier Mermaider versions. Mermaider.Layout.Msagl is an IGraphLayoutProvider that swaps MSAGL in for the built-in engine.

  • 62 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
designgo

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add nullean/mermaider --skill mermaider-layout-msagl --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mermaider Layout Msagl?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mermaider Layout Msagl
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nullean-mermaider-layout-msagl/badge)](https://www.skillsdirectory.com/skills/nullean-mermaider-layout-msagl)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mermaider-layout-msagl
description: >-
  Use when a Mermaider user needs flowchart, state, class or ER output laid out by Microsoft MSAGL to match SVGs
  produced by earlier Mermaider versions. Mermaider.Layout.Msagl is an IGraphLayoutProvider that swaps MSAGL in for
  the built-in engine.
---

# Mermaider.Layout.Msagl

`using Mermaider; using Mermaider.Layout.Msagl;` It only exists for compatibility. For new code keep the built-in
engine: it is about ten times faster, does compound subgraph layout and routes edges orthogonally.

## The calls you need

```csharp
// one render
var svg = MermaidRenderer.RenderSvg(source, new RenderOptions { LayoutProvider = new MsaglLayoutProvider() });

// every render in the process
var builtIn = MermaidRenderer.LayoutProvider;   // keep it: there is no public way to get the default back
MermaidRenderer.SetLayoutProvider(new MsaglLayoutProvider());
// ...
MermaidRenderer.SetLayoutProvider(builtIn);
```

`RenderOptions` lives in `Mermaider.Models`.

## Gotchas

- Prefer the per-call `RenderOptions.LayoutProvider`. `SetLayoutProvider` is global and affects every caller,
  tests running in parallel included.
- It applies to flowchart, state, class and ER diagrams only. Requirement diagrams and `RenderAscii` always use the
  built-in engine.
- MSAGL has no compound layout: subgraph boxes are drawn around their members afterwards and can overlap. Class
  namespaces and notes, lollipop interfaces and state notes are ignored.
- The provider is stateless; one instance can be shared.

Docs: https://mermaider.nullean.net

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in design →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.