Create hand-drawn style diagrams using Excalidraw JSON format. 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.
Create hand-drawn style diagrams using Excalidraw JSON format. 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.
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.
Workflow
Load this skill (you already did)
Write the elements JSON -- an array of Excalidraw element objects
Save the file using write_file to create a .excalidraw file
Optionally upload for a shareable link using scripts/upload.py via terminal
Saving a Diagram
Wrap your elements array in the standard .excalidraw envelope and save with write_file:
{"type":"excalidraw","version":2,"source":"clawg","elements":[ ...your elements array here... ],"appState":{"viewBackgroundColor":"#ffffff"}}
Save to any path, e.g. ~/diagrams/my_diagram.excalidraw.
Uploading for a Shareable Link
Run the upload script (located in this skill's scripts/ directory) via terminal:
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: