Generate Excalidraw diagrams from text content. Supports three output modes - Obsidian (.md), Standard (.excalidraw), and Animated (.excalidraw with animation order). Triggers on "Excalidraw", "diagram", "standard excalidraw", "animate".
64
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/excalidraw-diagram/SKILL.mdCreate Excalidraw diagrams from text content with multiple output formats.
Select output mode based on the user's trigger words:
| Trigger Words | Output Mode | File Format | Use Case |
|---|---|---|---|
Excalidraw, diagram, flowchart, mind map | Obsidian (default) | .md | Open directly in Obsidian |
standard excalidraw | Standard | .excalidraw | Open/edit/share on excalidraw.com |
animate, animated excalidraw | Animated | .excalidraw | Drag to excalidraw-animate to generate animation |
Output strictly in the following structure, with no modifications:
---
excalidraw-plugin: parsed
tags: [excalidraw]
---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'
# Excalidraw Data
## Text Elements
%%
## Drawing
\`\`\`json
{complete JSON data}
\`\`\`
%%Key points:
tags: [excalidraw]%% markersexcalidraw-* plugin settings in frontmatter other than excalidraw-plugin: parsed (the tags: [excalidraw] entry above is separate and still required).mdOutput pure JSON file, openable on excalidraw.com:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [...],
"appState": {
"gridSize": null,
"viewBackgroundColor": "#ffffff"
},
"files": {}
}Key points:
source uses https://excalidraw.com (not the Obsidian plugin).excalidrawSame as Standard format, but each element adds a customData.animate field to control animation order:
{
"id": "element-1",
"type": "rectangle",
"customData": {
"animate": {
"order": 1,
"duration": 500
}
},
...other standard fields
}Animation order rules:
order: Playback order (1, 2, 3...) — lower numbers appear firstduration: Drawing duration for the element (milliseconds), default 500order appear simultaneouslyUsage:
.excalidraw fileFile extension: .excalidraw
Choose the appropriate diagram type to maximize clarity and visual impact.
| Type | Use Case | Approach |
|---|---|---|
| Flowchart | Step-by-step processes, workflows, task sequences | Connect steps with arrows, clearly show process flow |
| Mind Map | Concept expansion, topic categorization, brainstorming | Radiate outward from a central core |
| Hierarchy | Org charts, content levels, system decomposition | Build level nodes top-down or left-to-right |
| Relationship | Dependencies, influences, interactions between elements | Use lines between shapes to show relationships, with arrows and labels |
| Comparison | Side-by-side analysis of two or more approaches | Two columns or table format, with comparison dimensions labeled |
| Timeline | Event progression, project milestones, evolution | Use time as axis, mark key dates and events |
| Matrix | Two-dimensional categorization, priority grids, positioning | Establish X and Y dimensions, place items on coordinate plane |
| Freeform | Scattered content, brainstorming, initial information gathering | No structural constraints, freely place blocks and arrows |
fontFamily: 5 (Excalifont handwriting font)" with 『』() with 「」lineHeight: 1.25estimatedWidth = text.length * fontSize * 0.5x = centerX - estimatedWidth / 2estimatedWidth = 5 * 20 * 0.5 = 50 → x = 300 - 25 = 275Text colors (strokeColor for text):
| Purpose | Hex | Description |
|---|---|---|
| Title | #1e40af | Deep blue |
| Subtitle/connectors | #3b82f6 | Bright blue |
| Body text | #374151 | Dark gray (minimum #757575 on white background) |
| Emphasis/highlight | #f59e0b | Gold |
Shape fill colors (backgroundColor, fillStyle: "solid"):
| Hex | Semantic | Use Case |
|---|---|---|
#a5d8ff | Light blue | Input, data source, primary nodes |
#b2f2bb | Light green | Success, output, completed |
#ffd8a8 | Light orange | Warning, pending, external dependency |
#d0bfff | Light purple | Processing, middleware, special items |
#ffc9c9 | Light red | Error, critical, alert |
#fff3bf | Light yellow | Notes, decisions, planning |
#c3fae8 | Light teal | Storage, data, cache |
#eebefa | Light pink | Analysis, metrics, statistics |
Region background colors (large rectangle + opacity: 30, for layered diagrams):
| Hex | Semantic |
|---|---|
#dbe4ff | Frontend/UI layer |
#e5dbff | Logic/processing layer |
#d3f9d8 | Data/tools layer |
Contrast rules:
#757575#15803d, not #22c55e)#b0b0b0, #999) on white backgroundsSee references/excalidraw-schema.md for full reference.
Obsidian mode:
{
"type": "excalidraw",
"version": 2,
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin",
"elements": [...],
"appState": { "gridSize": null, "viewBackgroundColor": "#ffffff" },
"files": {}
}Standard / Animated mode:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [...],
"appState": { "gridSize": null, "viewBackgroundColor": "#ffffff" },
"files": {}
}Each element requires these fields (do NOT add extra fields like frameId, index, versionNonce, rawText -- they may cause issues on excalidraw.com. boundElements must be null not [], updated must be 1 not timestamps):
{
"id": "unique-id",
"type": "rectangle",
"x": 100, "y": 100,
"width": 200, "height": 50,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"roundness": {"type": 3},
"seed": 123456789,
"version": 1,
"isDeleted": false,
"boundElements": null,
"updated": 1,
"link": null,
"locked": false
}strokeStyle values: "solid" (default) | "dashed" | "dotted". Dashed lines are suitable for optional paths, async flows, weak associations, etc.
Text elements add:
{
"text": "Display text",
"fontSize": 20,
"fontFamily": 5,
"textAlign": "center",
"verticalAlign": "middle",
"containerId": null,
"originalText": "Display text",
"autoResize": true,
"lineHeight": 1.25
}Animated mode additionally adds a customData field:
{
"id": "title-1",
"type": "text",
"customData": {
"animate": {
"order": 1,
"duration": 500
}
},
...other fields
}See references/excalidraw-schema.md for all element types.
## Text Elements section in Markdown must be left empty, using only %% as delimitersid (can be strings like "title", "box1", etc.)IMPORTANT: Do NOT include frameId, index, versionNonce, or rawText fields. Use boundElements: null (not []), and updated: 1 (not timestamps).
{
"id": "unique-identifier",
"type": "rectangle|text|arrow|ellipse|diamond",
"x": 100, "y": 100,
"width": 200, "height": 50,
"angle": 0,
"strokeColor": "#color-hex",
"backgroundColor": "transparent|#color-hex",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid|dashed|dotted",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"roundness": {"type": 3},
"seed": 123456789,
"version": 1,
"isDeleted": false,
"boundElements": null,
"updated": 1,
"link": null,
"locked": false
}Text elements (type: "text") require additional properties (do NOT include rawText):
{
"text": "Display text",
"fontSize": 20,
"fontFamily": 5,
"textAlign": "center",
"verticalAlign": "middle",
"containerId": null,
"originalText": "Display text",
"autoResize": true,
"lineHeight": 1.25
}"appState": {
"gridSize": null,
"viewBackgroundColor": "#ffffff"
}"files": {}x is the left edge, not center. Must use the centering formula to manually calculate, or text will be off to one side#757575; colored text should use dark variantsWhen generating an Excalidraw diagram, automatically execute these steps:
Select file extension based on output mode:
| Mode | Filename Format | Example |
|---|---|---|
| Obsidian | [topic].[type].md | business-model.relationship.md |
| Standard | [topic].[type].excalidraw | business-model.relationship.excalidraw |
| Animated | [topic].[type].animate.excalidraw | business-model.relationship.animate.excalidraw |
{current_directory}/[filename].mdMust generate in the following format (no modifications allowed):
---
excalidraw-plugin: parsed
tags: [excalidraw]
---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'
# Excalidraw Data
## Text Elements
%%
## Drawing
\`\`\`json
{complete JSON data}
\`\`\`
%%fontFamily: 5" with 『』 in text() with 「」 in textid valuesappState and files: {} fieldsReport to the user:
Obsidian mode:
Excalidraw diagram generated!
Saved to: business-model.relationship.md
Usage:
1. Open this file in Obsidian
2. Click the MORE OPTIONS menu (top right)
3. Select "Switch to EXCALIDRAW VIEW"Standard mode:
Excalidraw diagram generated!
Saved to: business-model.relationship.excalidraw
Usage:
1. Open https://excalidraw.com
2. Click top-left menu → Open → select this file
3. Or drag and drop the file onto the excalidraw.com pageAnimated mode:
Animated Excalidraw diagram generated!
Saved to: business-model.relationship.animate.excalidraw
Animation order: Title(1) → Main framework(2-4) → Connectors(5-7) → Detail text(8-10)
To generate animation:
1. Open https://dai-shi.github.io/excalidraw-animate/
2. Click Load File and select this file
3. Preview the animation
4. Click Export to save as SVG or WebMaa16349
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.