Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
.claude/skills/excalidraw-diagram-generator/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 680% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 111% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 158% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 140% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 246% | 0% |
A skill for generating Excalidraw-format diagrams from natural language descriptions. This skill helps create visual representations of processes, systems, relationships, and ideas without manual drawing.
Use this skill when users request:
Supported diagram types:
Analyze the user's description to determine:
| User Intent | Diagram Type | Example Keywords | |-------------|--------------|------------------| | Process flow, steps, procedures | Flowchart | "workflow", "process", "steps", "procedure" | | Connections, dependencies, associations | Relationship Diagram | "relationship", "connections", "dependencies", "structure" | | Concept hierarchy, brainstorming | Mind Map | "mind map", "concepts", "ideas", "breakdown" | | System design, components | Architecture Diagram | "architecture", "system", "components", "modules" | | Data flow, transformation processes | Data Flow Diagram (DFD) | "data flow", "data processing", "data transformation" | | Cross-functional processes, actor responsibilities | Business Flow (Swimlane) | "business process", "swimlane", "actors", "responsibilities" | | Object-oriented design, class structures | Class Diagram | "class", "inheritance", "OOP", "object model" | | Interaction sequences, message flows | Sequence Diagram | "sequence", "interaction", "messages", "timeline" | | Database design, entity relationships | ER Diagram | "database", "entity", "relationship", "data model" |
For Flowcharts:
For Relationship Diagrams:
For Mind Maps:
For Data Flow Diagrams (DFD):
For Business Flow (Swimlane):
For Class Diagrams:
For Sequence Diagrams:
For ER Diagrams:
Create the .excalidraw file with appropriate elements:
Available element types:
rectangle: Boxes for entities, steps, conceptsellipse: Alternative shapes for emphasisdiamond: Decision pointsarrow: Directional connectionstext: Labels and annotationsKey properties to set:
x, y coordinateswidth, heightstrokeColor, backgroundColor, fillStylefontFamily: 5 (Excalifont - required for all text elements)points array for arrowsImportant: All text elements must use fontFamily: 5 (Excalifont) for consistent visual appearance.
Structure the complete Excalidraw file:
json{ "type": "excalidraw", "version": 2, "source": "https://excalidraw.com", "elements": [ // Array of diagram elements ], "appState": { "viewBackgroundColor": "#ffffff", "gridSize": 20 }, "files": {} }
<descriptive-name>.excalidraw| Diagram Type | Recommended Count | Maximum | |--------------|-------------------|---------| | Flowchart steps | 3-10 | 15 | | Relationship entities | 3-8 | 12 | | Mind map branches | 4-6 | 8 | | Mind map sub-topics per branch | 2-4 | 6 |
#a5d8ff)#b2f2bb)#ffd43b)#ffc9c9)fontFamily: 5 (Excalifont) for all text elementsIf user request has too many elements:
Example response:
"Your request includes 15 components. For clarity, I recommend:
1. High-level architecture diagram (6 main components)
2. Detailed diagram for each subsystem
Would you like me to start with the high-level view?"User: "Create a flowchart for user registration"
Agent generates:
user-registration-flow.excalidrawUser: "Diagram the relationship between User, Post, and Comment entities"
Agent generates:
user-content-relationships.excalidrawUser: "Mind map about machine learning concepts"
Agent generates:
machine-learning-mindmap.excalidraw| Issue | Solution | |-------|----------| | Elements overlap | Increase spacing between coordinates | | Text doesn't fit in boxes | Increase box width or reduce font size | | Too many elements | Break into multiple diagrams | | Unclear layout | Use grid layout (rows/columns) or radial layout (mind maps) | | Colors inconsistent | Define color palette upfront based on element types |
javascriptconst columns = Math.ceil(Math.sqrt(entityCount)); const x = startX + (index % columns) * horizontalGap; const y = startY + Math.floor(index / columns) * verticalGap;
javascriptconst angle = (2 * Math.PI * index) / branchCount; const x = centerX + radius * Math.cos(angle); const y = centerY + radius * Math.sin(angle);
Use timestamp + random string for unique IDs:
javascriptconst id = Date.now().toString(36) + Math.random().toString(36).substr(2);
Always provide:
.excalidraw JSON fileExample summary:
Created: user-workflow.excalidraw
Type: Flowchart
Elements: 7 rectangles, 6 arrows, 1 title text
Total: 14 elements
To view:
1. Visit https://excalidraw.com
2. Drag and drop user-workflow.excalidraw
3. Or use File → Open in Excalidraw VS Code extensionBefore delivering the diagram:
fontFamily: 5 (Excalifont)For specialized diagrams (e.g., AWS/GCP/Azure architecture diagrams), you can use pre-made icon libraries from Excalidraw. This provides professional, standardized icons instead of basic shapes.
If user asks for AWS/cloud architecture diagrams or mentions wanting to use specific icons:
libraries/<library-name>/reference.md To use AWS/GCP/Azure/etc.] architecture icons, please follow these steps:
python skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py skills/excalidraw-diagram-generator/libraries/icon-set-name]/
This will split the library into individual icon files for efficient use. After setup is complete, I can create your diagram using the actual AWS/cloud icons.
Alternatively, I can create the diagram now using simple shapes (rectangles, ellipses) which you can later replace with icons manually in Excalidraw.
Step 1: Create Library Directory
bashmkdir -p skills/excalidraw-diagram-generator/libraries/aws-architecture-icons
Step 2: Download Library
.excalidrawlib fileStep 3: Place Library File
aws-architecture-icons.excalidrawlib)Step 4: Run Splitter Script
bashpython skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py skills/excalidraw-diagram-generator/libraries/aws-architecture-icons/
Step 5: Verify Setup After running the script, verify the following structure exists:
skills/excalidraw-diagram-generator/libraries/aws-architecture-icons/
aws-architecture-icons.excalidrawlib (original)
reference.md (generated - icon lookup table)
icons/ (generated - individual icon files)
API-Gateway.json
CloudFront.json
EC2.json
Lambda.json
RDS.json
S3.json
...When icon libraries are available in libraries/:
RECOMMENDED APPROACH: Use Python Scripts (Efficient & Reliable)
The repository includes Python scripts that handle icon integration automatically:
.excalidraw file with basic layout (title, boxes, regions)bash python skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py \ <diagram-path> <icon-name> <x> <y> [--label "Text"] [--library-path PATH]
.excalidraw.edit is enabled by default to avoid overwrite issues; pass --no-use-edit-suffix to disable.Examples: bash # Add EC2 icon at position (400, 300) with label python scripts/add-icon-to-diagram.py diagram.excalidraw EC2 400 300 --label "Web Server"
# Add VPC icon at position (200, 150) python scripts/add-icon-to-diagram.py diagram.excalidraw VPC 200 150
# Add icon from different library python scripts/add-icon-to-diagram.py diagram.excalidraw Compute-Engine 500 200 \ --library-path libraries/gcp-icons --label "API Server"
bash python skills/excalidraw-diagram-generator/scripts/add-arrow.py \ <diagram-path> <from-x> <from-y> <to-x> <to-y> [--label "Text"] [--style solid|dashed|dotted] [--color HEX]
.excalidraw.edit is enabled by default to avoid overwrite issues; pass --no-use-edit-suffix to disable.Examples: bash # Simple arrow from (300, 250) to (500, 300) python scripts/add-arrow.py diagram.excalidraw 300 250 500 300
# Arrow with label python scripts/add-arrow.py diagram.excalidraw 300 250 500 300 --label "HTTPS"
# Dashed arrow with custom color python scripts/add-arrow.py diagram.excalidraw 400 350 600 400 --style dashed --color "#7950f2"
bash # Step 1: Create base diagram with title and structure # (Create .excalidraw file with initial elements)
# Step 2: Add icons with labels python scripts/add-icon-to-diagram.py my-diagram.excalidraw "Internet-gateway" 200 150 --label "Internet Gateway" python scripts/add-icon-to-diagram.py my-diagram.excalidraw VPC 250 250 python scripts/add-icon-to-diagram.py my-diagram.excalidraw ELB 350 300 --label "Load Balancer" python scripts/add-icon-to-diagram.py my-diagram.excalidraw EC2 450 350 --label "EC2 Instance" python scripts/add-icon-to-diagram.py my-diagram.excalidraw RDS 550 400 --label "Database"
# Step 3: Add connecting arrows python scripts/add-arrow.py my-diagram.excalidraw 250 200 300 250 # Internet → VPC python scripts/add-arrow.py my-diagram.excalidraw 300 300 400 300 # VPC → ELB python scripts/add-arrow.py my-diagram.excalidraw 400 330 500 350 # ELB → EC2 python scripts/add-arrow.py my-diagram.excalidraw 500 380 600 400 # EC2 → RDS
Benefits of Python Script Approach:
ALTERNATIVE: Manual Icon Integration (Not Recommended)
Only use this if Python scripts are unavailable:
List directory: skills/excalidraw-diagram-generator/libraries/ Look for subdirectories containing reference.md files
Open: libraries/<library-name>/reference.md This is lightweight (typically <300 lines) and lists all available icons
Search the reference.md table for icon names matching diagram needs Example: For AWS diagram with EC2, S3, Lambda → Find "EC2", "S3", "Lambda" in table
Read ONLY the needed icon files:
Note: Each icon file is 200-1000 lines - this consumes significant tokens
Each icon JSON contains an "elements" array Calculate bounding box (min_x, min_y, max_x, max_y) Apply offset to all x/y coordinates Generate new unique IDs for all elements Update groupIds references Copy transformed elements into your diagram
Adjust x/y coordinates to position icons correctly in the diagram Update IDs to ensure uniqueness across diagram Add connecting arrows and labels as needed
Manual Integration Challenges:
Request: "Create an AWS architecture diagram with Internet Gateway, VPC, ELB, EC2, and RDS"
Recommended Workflow (using Python scripts): Request: "Create an AWS architecture diagram with Internet Gateway, VPC, ELB, EC2, and RDS"
Recommended Workflow (using Python scripts):
bash# Step 1: Create base diagram file with title # Create my-aws-diagram.excalidraw with basic structure (title, etc.) # Step 2: Check icon availability # Read: libraries/aws-architecture-icons/reference.md # Confirm icons exist: Internet-gateway, VPC, ELB, EC2, RDS # Step 3: Add icons with Python script python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw "Internet-gateway" 150 100 --label "Internet Gateway" python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw VPC 200 200 python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw ELB 350 250 --label "Load Balancer" python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw EC2 500 300 --label "Web Server" python scripts/add-icon-to-diagram.py my-aws-diagram.excalidraw RDS 650 350 --label "Database" # Step 4: Add connecting arrows python scripts/add-arrow.py my-aws-diagram.excalidraw 200 150 250 200 # Internet → VPC python scripts/add-arrow.py my-aws-diagram.excalidraw 265 230 350 250 # VPC → ELB python scripts/add-arrow.py my-aws-diagram.excalidraw 415 280 500 300 # ELB → EC2 python scripts/add-arrow.py my-aws-diagram.excalidraw 565 330 650 350 --label "SQL" --style dashed # Result: Complete diagram with professional AWS icons, labels, and connections
Benefits:
Alternative Workflow (manual, if scripts unavailable):
libraries/aws-architecture-icons/reference.md exists → Yesicons/Internet-gateway.json (298 lines)icons/VPC.json (550 lines)icons/ELB.json (363 lines)icons/EC2.json (231 lines) icons/RDS.json (similar size)Total: ~2000+ lines of JSON to process
.excalidraw fileChallenges with manual approach:
.excalidrawlib file you provide.If no icon libraries are set up:
See bundled references for:
references/excalidraw-schema.md - Complete Excalidraw JSON schemareferences/element-types.md - Detailed element type specificationstemplates/flowchart-template.excalidraw - Basic flowchart startertemplates/relationship-template.excalidraw - Relationship diagram startertemplates/mindmap-template.excalidraw - Mind map startertemplates/business-flow-swimlane-template.excalidraw - Business flow swimlane startertemplates/class-diagram-template.excalidraw - Class diagram startertemplates/data-flow-diagram-template.excalidraw - Data flow diagram startertemplates/er-diagram-template.excalidraw - Entity-relationship diagram startertemplates/sequence-diagram-template.excalidraw - Sequence diagram starterscripts/add-icon-to-diagram.py - Add icons from Excalidraw libraries to diagramsscripts/add-arrow.py - Add arrows (connections) between elements in diagramsscripts/split-excalidraw-library.py - Tool to split .excalidrawlib filesscripts/README.md - Documentation for library toolsscripts/.gitignore - Prevents local Python artifacts from being committedPotential improvements:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 39,847 | 37,754 | -5% | 1 | 1 | 0% | 8,291 | 14,862 | +79% | 0 | 0 | — |
case-02 | fail→fail | 40,531 | 40,728 | +0% | 1 | 1 | 0% | 8,271 | 14,842 | +79% | 0 | 0 | — |
case-03 | fail→fail | 38,299 | 38,246 | -0% | 1 | 1 | 0% | 8,264 | 14,835 | +80% | 0 | 0 | — |
case-04 | fail→pass | 9,639 | 8,294 | -14% | 1 | 1 | 0% | 910 | 7,095 | +680% | 0 | 0 | — |
case-05 | pass→pass | 14,490 | 12,673 | -13% | 1 | 1 | 0% | 1,554 | 7,802 | +402% | 0 | 0 | — |
case-06 | fail→pass | 22,313 | 10,306 | -54% | 1 | 1 | 0% | 3,509 | 7,419 | +111% | 0 | 0 | — |
case-07 | pass→pass | 8,938 | 6,489 | -27% | 1 | 1 | 0% | 1,638 | 7,834 | +378% | 0 | 0 | — |
case-08 | fail→pass | 20,493 | 3,293 | -84% | 1 | 1 | 0% | 2,812 | 7,265 | +158% | 0 | 0 | — |
case-09 | fail→pass | 16,150 | 8,520 | -47% | 1 | 1 | 0% | 3,023 | 7,258 | +140% | 0 | 0 | — |
case-10 | pass→pass | 11,005 | 10,941 | -1% | 1 | 1 | 0% | 920 | 7,505 | +716% | 0 | 0 | — |
case-11 | pass→pass | 4,193 | 8,421 | +101% | 1 | 1 | 0% | 676 | 7,183 | +963% | 0 | 0 | — |
case-12 | pass→pass | 18,697 | 9,058 | -52% | 1 | 1 | 0% | 2,532 | 8,346 | +230% | 0 | 0 | — |
case-13 | pass→pass | 9,961 | 2,937 | -71% | 1 | 1 | 0% | 1,691 | 6,980 | +313% | 0 | 0 | — |
case-14 | fail→pass | 13,861 | 11,762 | -15% | 1 | 1 | 0% | 2,226 | 7,707 | +246% | 0 | 0 | — |
case-15 | pass→pass | 17,040 | 7,429 | -56% | 1 | 1 | 0% | 2,114 | 6,951 | +229% | 0 | 0 | — |
case-16 | pass→pass | 11,203 | 7,519 | -33% | 1 | 1 | 0% | 2,133 | 7,992 | +275% | 0 | 0 | — |
case-17 | pass→pass | 9,726 | 11,200 | +15% | 1 | 1 | 0% | 2,006 | 7,709 | +284% | 0 | 0 | — |
case-18 | pass→pass | 2,483 | 2,535 | +2% | 1 | 1 | 0% | 434 | 6,957 | +1503% | 0 | 0 | — |
case-19 | fail→fail | 10,005 | 9,450 | -6% | 1 | 1 | 0% | 1,788 | 7,289 | +308% | 0 | 0 | — |
case-20 | pass→pass | 8,799 | 8,678 | -1% | 1 | 1 | 0% | 673 | 7,159 | +964% | 0 | 0 | — |
case-21 | fail→pass | 13,896 | 3,924 | -72% | 1 | 1 | 0% | 1,531 | 7,190 | +370% | 0 | 0 | — |
case-22 | pass→pass | 6,858 | 6,864 | +0% | 1 | 1 | 0% | 246 | 6,816 | +2671% | 0 | 0 | — |
case-23 | pass→fail | 19,818 | 19,736 | -0% | 1 | 1 | 0% | 3,508 | 10,181 | +190% | 0 | 0 | — |
case-24 | fail→fail | 18,715 | 10,832 | -42% | 1 | 1 | 0% | 2,750 | 8,639 | +214% | 0 | 0 | — |
case-25 | fail→pass | 18,352 | 6,168 | -66% | 1 | 1 | 0% | 2,177 | 7,566 | +248% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +24 percentage points is the difference between those two pass rates over the 25 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/26/2026 | +50% |
Other measured skills in the registry, with their headline benchmark lift.