diagramming
Generate Excalidraw diagrams. Use when creating flowcharts, ER diagrams, sequence diagrams, block diagrams, or any .excalidraw files.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Diagramming with Excalidraw
Generate valid .excalidraw JSON files.
File Format
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [],
"appState": {
"viewBackgroundColor": "#ffffff"
},
"files": {}
}
| Field | Type | Description |
|---|---|---|
type |
string | Always "excalidraw" |
version |
number | Schema version (currently 2) |
source |
string | Origin URL |
elements |
array | All diagram elements |
appState |
object | Canvas settings (background, etc.) |
files |
object | Binary files keyed by fileId (images) |
Workflow
- Plan - Choose diagram type, layout, colors
- Generate - Create elements with proper structure
- Validate - Check bindings and structure before writing
Validation Checklist
Before writing a diagram, verify:
Bindings
- Arrows connecting shapes have both
startBindingandendBindingset - Arrow
x,ysits at the source shape's edge, not floating in space - Shapes list connected arrows in their
boundElements(bidirectional) - Text labels have
containerIdpointing to their container - Containers have
boundElementsreferencing their text
Polygons
- Polygon labels use
groupIds(notcontainerId) - Text positioned manually at polygon center
- Polygons cannot have arrow bindings - bind to grouped text label instead
- Polygon's
boundElementsmust benull
Layout
- Elements don't overlap unexpectedly
- Arrows route around shapes, not through them
- Minimum 40px between sibling elements
- All IDs are unique
- Label text matches actual names (verify spelling)
Text
- Use standard font sizes: S (16), M (20), L (28), XL (36)
- Bound text: set
containerId,textAlign: "center",verticalAlign: "middle" - Position bound text at container center; Excalidraw adjusts automatically
Frames (presentations only)
- Frames are slides/artboards, not for grouping elements in a single diagram
Reference Index
Load references progressively based on need:
Elements
| Reference | Load When |
|---|---|
| shapes.md | Using rectangles, diamonds, ellipses |
| text.md | Adding labels, fonts, text styling |
| linear.md | Creating arrows, lines, bindings |
| freedraw.md | Hand-drawn paths |
| images.md | Embedding images |
| frames.md | Slides/artboards for presentations |
| polygons.md | Custom polygon shapes |
Styling
| Reference | Load When |
|---|---|
| fill-stroke.md | Fill patterns, strokes |
| colors.md | Color palette selection |
| positioning.md | Layout, alignment, spacing |
| grouping.md | Groups, z-ordering |
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-02-04
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!