| domain | archive |
|---|---|
| title | Excalidraw |
| verification | metadata-normalized |
| source | skill-pipeline |
| status | draft |
| created | 2026-05-09 |
(此 lesson 从 skill excalidraw 自动提取,待补全)
(待补充)
Create diagrams by writing standard Excalidraw element JSON and saving as .excalidraw files. These files can be drag-and-dropped onto excalidraw.com for viewing and editing. No accounts, no API keys, no rendering libraries -- just JSON.
Generate .excalidraw files for architecture diagrams, flowcharts, sequence diagrams, concept maps, and more. Files can be opened at excalidraw.com or uploaded for shareable links.
- Load this skill (you already did)
- Write the elements JSON -- an array of Excalidraw element objects
- Save the file using
write_fileto create a.excalidrawfile - Optionally upload for a shareable link using
scripts/upload.pyviaterminal
Wrap your elements array in the standard .excalidraw envelope and save with write_file:
{
"type": "excalidraw",
"version": 2,
"source": "hermes-agent",
"elements": [ ...your elements array here... ],
"appState": {
"viewBackgroundColor": "#ffffff"
}
}Save to any path, e.g. ~/diagrams/my_diagram.excalidraw.
Run the upload script (located in this skill's scripts/ directory) via terminal:
python skills/diagramming/excalidraw/scripts/upload.py ~/diagrams/my_diagram.excalidrawThis uploads to excalidraw.com (no account needed) and prints a shareable URL. Requires the cryptography pip package (pip install cryptography).
type, id (unique string), x, y, width, height
strokeColor:"#1e1e1e"backgroundColor:"transparent"fillStyle:"solid"strokeWidth:2roughness:1(hand-drawn look)opacity:100
Canvas background is white.
Rectangle:
{ "type": "rectangle", "id": "r1", "x": 100, "y": 100, "width": 200, "height": 100 }roundness: { "type": 3 }for rounded cornersbackgroundColor: "#a5d8ff",fillStyle: "solid"for filled
Ellipse:
{ "type": "ellipse", "id": "e1", "x": 100, "y": 100, "width": 150, "height": 150 }Diamond:
{ "type": "diamond", "id": "d1", "x": 100, "y": 100, "width": 150, "height": 150 }Labeled shape (container binding) -- create a text element bound to the shape:
WARNING: Do NOT use
"label": { "text": "..." }on shapes. This is NOT a valid Excalidraw property and will be silently ignored, producing blank shapes. You MUST use the container binding approach below.
The shape needs boundElements listing the text, and the text needs containerId pointing back:
{ "type": "rectangle", "id": "r1", "x": 100, "y": 100, "width": 200, "height": 80,
"roundness": { "type": 3 }, "backgroundColor": "#a5d8ff", "fillStyle": "solid",
"boundElements": [{ "id": "t_r1", "type": "text" }] },
{ "typ
## 验证
(待补充)