excalidraw-diagram
SKILL.md
Excalidraw Diagram Skill
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.
Quick workflow
- Choose format: full file (
type: "excalidraw", includeversion,source,appState) or clipboard (type: "excalidraw/clipboard", noversion/source/appState). - Sketch elements: rectangles/ellipses/diamonds/lines/arrows/text. Set
id,type,x,y,width,height(orpointsfor lines/arrows), andtextfor labels. - Set styling only if needed:
strokeColor,backgroundColor,strokeWidth,roughness,opacity,roundness. - For arrows/lines: include
points(array of [dx, dy]) andstartBinding/endBindingif connecting IDs. - Optional appState:
gridSize,viewBackgroundColor,scrollX,scrollY,zoom.value. - For images: add file entry under
fileskeyed byidwithmimeType,id,dataURL,created,lastRetrieved; reference thatidin animageelement.
Clipboard vs file payloads
- File:
type: "excalidraw", includeversion(number),source(URL),elements,appState,files. - Clipboard:
type: "excalidraw/clipboard", includeelements, optionalfiles; omitversion,source,appState.