Generate Excalidraw JSON format diagrams for documentation, architecture diagrams, flowcharts, entity relationships, and visual explanations. Use when users request Excalidraw diagrams, .excalidraw files, visual diagrams for docs, architecture visualizations, flowcharts, or when converting ASCII art/placeholder diagrams to proper Excalidraw format.
Generate valid Excalidraw JSON for diagrams that can be opened in Excalidraw, embedded in documentation, or used in Obsidian.
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [],
"appState": {
"gridSize": 20,
"viewBackgroundColor": "#ffffff"
},
"files": {}
}
{
"id": "unique-id",
"type": "rectangle|ellipse|diamond|text|arrow|line",
"x": 0,
"y": 0,
"width": 100,
"height": 50,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"seed": 12345,
"version": 1,
"isDeleted": false,
"groupIds": [],
"frameId": null,
"roundness": { "type": 3 },
"boundElements": null
}
Use for boxes, containers, nodes. Diamond for decision points.
{
"type": "text",
"text": "Label",
"fontSize": 20,
"fontFamily": 1,
"textAlign": "center",
"verticalAlign": "middle",
"containerId": null
}
fontFamily: 1=Virgil (hand-drawn), 2=Helvetica, 3=Cascadia (code)
{
"type": "arrow",
"points": [[0, 0], [100, 0]],
"startBinding": null,
"endBinding": null,
"startArrowhead": null,
"endArrowhead": "arrow"
}
startArrowhead/endArrowhead: null, "arrow", "bar", "dot", "triangle"
To connect arrows to shapes, use bindings:
{
"startBinding": {
"elementId": "target-shape-id",
"focus": 0,
"gap": 5
},
"endBinding": {
"elementId": "target-shape-id",
"focus": 0,
"gap": 5
}
}
When binding, add boundElements to the target shape:
{
"boundElements": [
{ "id": "arrow-id", "type": "arrow" }
]
}
| Property | Values | |----------|--------| | fillStyle | "solid", "hachure", "cross-hatch" | | strokeStyle | "solid", "dashed", "dotted" | | roughness | 0 (architect), 1 (artist), 2 (cartoonist) | | roundness.type | 2 (small radius), 3 (adaptive radius) |
Stroke: #1e1e1e (black), #e03131 (red), #2f9e44 (green), #1971c2 (blue)
Background: transparent, #ffc9c9 (light red), #b2f2bb (light green),
#a5d8ff (light blue), #ffec99 (light yellow), #d0bfff (light purple)
Use descriptive IDs: "memory-client-box", "arrow-client-to-store", "label-extraction"
[
{
"id": "box-1",
"type": "rectangle",
"x": 100, "y": 100,
"width": 200, "height": 80,
"strokeColor": "#1e1e1e",
"backgroundColor": "#a5d8ff",
"fillStyle": "solid",
"boundElements": [{ "id": "text-1", "type": "text" }]
},
{
"id": "text-1",
"type": "text",
"x": 200, "y": 140,
"text": "Component",
"fontSize": 20,
"textAlign": "center",
"containerId": "box-1"
}
]
See references/examples.md for complete flowchart and architecture examples.
Save as .excalidraw file (JSON with .excalidraw extension). Present to user for download.
When converting asciidoc placeholder diagrams like:
+------------------+
| Component |
+------------------+
Map to proper Excalidraw elements with appropriate sizing, colors, and connections.
This project uses a structured workflow for managing documentation diagrams:
Placeholder diagrams in AsciiDoc files use this pattern:
.Diagram Title
[cols="1", options="header"]
|===
| [DIAGRAM PLACEHOLDER: Diagram Name]
a|
[source,text]
----
ASCII art representation here
----
|===
# List all placeholder diagrams
make docs-diagrams-list
# Show status (which have Excalidraw files)
make docs-diagrams-status
# Show only missing diagrams
make docs-diagrams-missing
# Add image references after generating diagrams
make docs-diagrams-add-refs
docs/assets/images/diagrams/excalidraw/{slug}.excalidrawdocs/assets/images/diagrams/{slug}.pngscripts/manage_diagrams.pymake docs-diagrams-missing to see what's neededdocs/assets/images/diagrams/excalidraw/{slug}.excalidrawmake docs-diagrams-add-refs to update AsciiDoc filesMemory types: Use distinct colors per memory type
#b2f2bb / #2f9e44)#ffec99 / #f08c00)#d0bfff / #9c36b5)#a5d8ff / #1971c2)Pipeline stages: Use vertical flow with colored boxes
Graph schemas: Use ellipses for nodes, labeled arrows for relationships
Architecture: Use rectangles with hierarchy (top-level → components → storage)
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer