excalidraw
Installation
SKILL.md
Excalidraw Diagram Generator
Generate valid .excalidraw JSON files that open directly in Excalidraw with clean, professional layout.
Workflow
- Parse the request — identify diagram type (flowchart, architecture, ER, sequence, mind map, or free-form) and extract all nodes and relationships.
- Read the theme — read
references/theme-default.mdfor colors, fonts, spacing, and layout values. Never hardcode style values. - Read layout strategy — read
references/layout-strategies.mdand apply the matching diagram type strategy. - Build logical graph — list all nodes (id, label, shape type, semantic color) and edges (source, target, label, arrow style).
- Assign positions — apply the layout algorithm to compute
(x, y, width, height)for every node. - Route arrows — compute arrow attachment points, paths, and elbowed bends.
- Generate legend — if the diagram uses multiple semantic colors, shape types, or arrow styles, add a legend row at the bottom of the main frame.
- Wrap in frame — enclose the entire diagram (all nodes, arrows, and legend) inside a single frame element whose
nameis the diagram title. Do NOT add a separate title text element. Compute frame bounds from ALL visual elements — see "Frame Sizing" below. - Assemble and write — build the full JSON and write to
<name>.excalidraw.
Element JSON Quick Reference
For full templates with all fields, read references/element-spec.md. Here's the minimum you need to remember: