Diagram Layout Engine — Data skill for Claude Code
A from-scratch layout engine for Mermaid flowcharts: a parser, the Sugiyama pipeline, edge routing and themeable SVG, with a stage-by-stage inspector, visual diffs that keep nodes in place, and a 50-g.
How to install Diagram Layout Engine
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open pisan-labs/diagram-layout-engine and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Diagram Layout Engine does
A from-scratch layout engine for Mermaid flowcharts: a parser, the Sugiyama pipeline, edge routing and themeable SVG, with a stage-by-stage inspector, visual diffs that keep nodes in place, and a 50-graph benchmark. Built with Claude Code.
Alternatives in Data
- n8n Code JavaScript — JavaScript in n8n Code nodes with data access patterns 3.6k ★
- SVG Diagram — Agent skill that draws architecture, flowchart, sequence, data-flow and lifecycle diagrams as hand-placed SVG 414 ★
- Dashboard Layout — Design and build a complete dashboard layout — sidebar navigation, KPI cards, chart areas, data tables, filter 309 ★
README
Diagram Layout Engine
A layout engine for a subset of Mermaid flowchart syntax, written from scratch: a recursive-descent parser, the five-step Sugiyama pipeline, an edge router and a themeable SVG writer, plus a visual diff, a stage-by-stage inspector and a benchmark. No Mermaid, dagre or ELK; no dependencies at runtime. Everything runs in the browser.
Live: [diagram-layout-engine.hintwise.org](https://diagram-layout-engine.hintwise.org)

Built from the 2026-10-18 idea "Build Your Own Diagram Layout Engine", a five-week classroom assignment prompted by the HN thread on Pele (Obsidian's themeable Mermaid renderer), where people mostly asked for readable large diagrams and for visual diffs. This is a reference solution and a test harness for that assignment.

What you can do
- Editor. Type Mermaid and the diagram re-lays out as you type. Ten bundled examples cover a CI/CD pipeline, a login flow with retry loops, nested microservice subgraphs, a compiler pipeline whose middle end runs in another direction, the TCP state machine, a CS prerequisite DAG, release branching drawn right to left, a shape gallery, a styled order flow and the engine's own pipeline. Every step of the pipeline has a switch (cycle removal, layering, ordering, transposition, sweeps, coordinates, edge style, gaps), and the metrics strip shows crossings, layers, dummy nodes, reversed edges, area, edge length, bends and time. Hover a node to highlight its edges; click it for its layer, order and size and a jump to its line in the source. Pan by dragging or scrolling, zoom with ctrl/cmd + wheel, pinch or the buttons, double-click to fit.
- Errors. The first par
Related Skills
Architecture Docs
Generate architecture documentation — from a quick Mermaid diagram to full system overview with data flow, com
Mermaid
create a mermaid diagrams that represent all the sql together with their entity relationship. ie an entity rel
Masyv Enhance
AI-powered image enhancement engine — smart pipeline routing, Real-ESRGAN upscaling, SVG vectorization, CLI &
Claude Code For Marketers
Workshop pack: Claude Code for marketers — Edge of Search 2026 masterclass with Brogan Renshaw. Sample data an
MCP Safe DB
Zero-risk, strictly read-only SQL database inspector for AI agents (Claude, Antigravity, Cursor)
Hotel Booking Agent
Conversational hotel booking agent: Claude (tool use) + SQLite room database. Checks availability, confirms ex
Related Agents
Mermaid Expert
Create Mermaid diagrams for flowcharts, sequences, ERDs, and architectures. Masters syntax for all diagram typ
Image Importer
Use this agent to turn a picture of a diagram (a whiteboard photo, a screenshot, a PNG or SVG from another too
Bfl Explorer
Read-only code-search agent for the ComfyUI-FLUX-BFL-API repo. Answers questions like "which nodes call post_r