Create or edit Excalidraw scenes or clipboard payloads by producing valid Excalidraw JSON (type/version/source/elements/appState/files) to render diagrams; use when asked to draw, update, or share Excalidraw diagrams.
Use this skill to generate or edit Excalidraw .excalidraw files or clipboard payloads. Keep JSON minimal and valid; prefer small examples and only the properties needed for the diagram.
type: "excalidraw", include version, source, appState) or clipboard (type: "excalidraw/clipboard", no version/source/appState).id, type, x, y, width, height (or points for lines/arrows), and text for labels.strokeColor, backgroundColor, strokeWidth, roughness, opacity, roundness.points (array of [dx, dy]) and startBinding/endBinding if connecting IDs.gridSize, viewBackgroundColor, scrollX, scrollY, zoom.value.files keyed by id with mimeType, id, dataURL, created, lastRetrieved; reference that id in an image element.type: "excalidraw", include version (number), source (URL), elements, appState, files.type: "excalidraw/clipboard", include elements, optional files; omit version, source, appState.id per element; coordinates in pixels; width/height positive.elements ordered for intended z-index.files, ensure matching id in both files map and image element.containerId hosts) so text is not clipped; prefer multiline with \n over over-wide boxes.startBinding/endBinding) and route around shapes (no crossing over objects); arrow paths must terminate at edges, not centers.containerId to the host shape and center with textAlign: "center", verticalAlign: "middle". Break long labels with \n instead of over-wide boxes.gap 4–8) so connectors appear attached but not overlapping borders.startBinding/endBinding so arrows terminate at shape edges, not centers; adjust points to keep paths clear. Prefer gently curved paths (multiple points) over sharp zigzags.elements from background to foreground so lanes/frames render first, then shapes, then text, then arrows.fontSize 16–20 for labels; increase for titles; ensure contrast between strokeColor and backgroundColor.fontSize 16–20 for labels; increase for titles; ensure contrast between strokeColor and backgroundColor.node scripts/generate-basic-diagram.js > diagram.excalidraw. Adjust coordinates/text in the arrays inside the script to change the layout.