Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Hand-drawn diagrams in Excalidraw JSON (architecture, flowcharts)
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 318% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 131% | 0% |
Generate Excalidraw scene files (.excalidraw) by writing JSON that the Excalidraw app can open directly. Ideal for architecture diagrams, flowcharts, mind maps, and system design sketches in the characteristic hand-drawn style.
An Excalidraw file is a JSON object with this top-level structure:
json{ "type": "excalidraw", "version": 2, "source": "https://excalidraw.com", "elements": [], "appState": { "viewBackgroundColor": "#ffffff" }, "files": {} }
Each element in "elements" is a shape with a common set of fields:
json{ "id": "unique-id", "type": "rectangle", "x": 100, "y": 100, "width": 200, "height": 80, "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": "#a5d8ff", "fillStyle": "hachure", "strokeWidth": 2, "roughness": 1, "opacity": 100 }
Common element types: rectangle, ellipse, diamond, arrow, line, text, freedraw.
Use a text element positioned over or near shapes:
json{ "id": "txt-1", "type": "text", "x": 130, "y": 130, "width": 140, "height": 25, "text": "Web Server", "fontSize": 16, "fontFamily": 1, "textAlign": "center", "verticalAlign": "middle" }
json{ "id": "arrow-1", "type": "arrow", "x": 300, "y": 140, "width": 100, "height": 0, "points": [[0, 0], [100, 0]], "startArrowhead": null, "endArrowhead": "arrow", "strokeColor": "#1e1e1e", "strokeWidth": 2, "roughness": 1 }
pythonimport json, uuid def make_rect(x, y, w, h, label, bg="#a5d8ff"): eid = str(uuid.uuid4())[:8] return [ { "id": eid, "type": "rectangle", "x": x, "y": y, "width": w, "height": h, "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": bg, "fillStyle": "hachure", "strokeWidth": 2, "roughness": 1, "opacity": 100 }, { "id": eid+"t", "type": "text", "x": x+10, "y": y+(h//2)-10, "width": w-20, "height": 20, "text": label, "fontSize": 16, "fontFamily": 1, "textAlign": "center", "verticalAlign": "middle", "strokeColor": "#1e1e1e", "opacity": 100 } ] elements = [] elements += make_rect(100, 100, 160, 60, "Browser", "#ffd43b") elements += make_rect(350, 100, 160, 60, "API Server", "#a5d8ff") elements += make_rect(600, 100, 160, 60, "Database", "#b2f2bb") scene = { "type": "excalidraw", "version": 2, "source": "https://excalidraw.com", "elements": elements, "appState": { "viewBackgroundColor": "#ffffff" }, "files": {} } with open("architecture.excalidraw", "w") as f: json.dump(scene, f, indent=2) print("Saved architecture.excalidraw — open in https://excalidraw.com")
The user can open the .excalidraw file by:
"Draw a simple 3-tier web architecture diagram" → Use step 4 to generate three rectangles (Browser → API Server → Database) with connecting arrows. Save as architecture.excalidraw.
"Create a flowchart for a login process" → Use rectangles for steps, diamonds for decisions, arrows for flow. Generate JSON and save.
"Make a mind map about machine learning concepts" → Place a central ellipse, surround with connected sub-topic ellipses using short arrows.
uuid.uuid4() or similarroughness property (0–2) controls the hand-drawn effect: 0=clean, 1=normal, 2=very rough"version": 2 which is the stable current formatOther measured skills in the registry, with their headline benchmark lift.