/diagram-authoring:excalidraw-diagram-generatorfrom diagram-authoring
Generates valid .excalidraw JSON diagrams from natural language descriptions, supporting flowcharts, relationship diagrams, mind maps, architecture diagrams, DFDs, swimlanes, class diagrams, sequence diagrams, and ER diagrams.
Ships in diagram-authoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn a natural-language diagram request into a valid Excalidraw JSON file by choosing the right diagram type, extracting nodes and relationships, laying out elements, and saving a .excalidraw artifact the user can open directly.
<descriptive-name>.excalidraw; users can open it at https://excalidraw.com by drag-and-drop, File → Open, or the Excalidraw VS Code extension.| User intent | Diagram type | Extract |
|---|---|---|
| Workflow, process, steps, procedure, decision tree | Flowchart | Start, end, sequential steps, decision points. |
| Relationship, connections, dependencies, structure | Relationship Diagram | Entities/nodes and labeled relationships from → to. |
| Mind map, concepts, ideas, breakdown | Mind Map | Central topic, 3-6 main branches, optional sub-topics. |
| Architecture, system, components, modules | Architecture Diagram | Components, interfaces, boundaries, data/control flow. |
| Data flow, data processing, data transformation | Data Flow Diagram (DFD) | External entities, processes, data stores, and data flows; do not represent process order. |
| Business process, swimlane, actors, responsibilities | Business Flow (Swimlane) | Actor columns, process lanes, activities, cross-lane handoffs. |
| Class, inheritance, OOP, object model | Class Diagram | Classes, attributes, methods, visibility, relationships, multiplicity. |
| Sequence, interaction, messages, timeline | Sequence Diagram | Objects/actors, lifelines, messages, return values, activation boxes; time flows top to bottom. |
| Database, entity, relationship, data model | ER Diagram | Entities, attributes, primary keys, foreign keys, cardinality, junction entities. |
Generate complete JSON with type: "excalidraw", version: 2, source: "https://excalidraw.com", an elements array, appState.viewBackgroundColor: "#ffffff", appState.gridSize: 20, and files: {}.
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [],
"appState": { "viewBackgroundColor": "#ffffff", "gridSize": 20 },
"files": {}
}
| Element type | Use it for | Required properties |
|---|---|---|
rectangle | Entities, steps, concepts, swimlane activities, classes | id, x, y, width, height, strokeColor, backgroundColor, fillStyle. |
ellipse | Alternative emphasis or boundary shapes | Same core position, size, and style properties. |
diamond | Decision points | Enough width for text and outgoing labels. |
arrow | Directional connections | points array and logical start/end placement. |
text | Labels and annotations | fontFamily: 5 for Excalifont, readable fontSize, and embedded text. |
All text elements must use fontFamily: 5 (Excalifont). Use timestamp plus random suffix IDs such as Date.now().toString(36) + Math.random().toString(36).substr(2).
| Rule | Value |
|---|---|
| Horizontal gap | 200-300px between elements. |
| Vertical gap | 100-150px between rows. |
| Text size | 16-24px; never below 16px for normal labels. |
| Primary color | Light blue #a5d8ff. |
| Secondary color | Light green #b2f2bb. |
| Central/important color | Yellow #ffd43b. |
| Alert/warning color | Light red #ffc9c9. |
| Roughness | Default 1. |
| Recommended maximum | Fewer than 20 elements for clarity. |
Use straight arrows for simple flows and curved arrows only for complex relationships. For relationship diagrams, use grid layout:
const columns = Math.ceil(Math.sqrt(entityCount));
const x = startX + (index % columns) * horizontalGap;
const y = startY + Math.floor(index / columns) * verticalGap;
For mind maps, use radial layout:
const angle = (2 * Math.PI * index) / branchCount;
const x = centerX + radius * Math.cos(angle);
const y = centerY + radius * Math.sin(angle);
| Type | Required conventions |
|---|---|
| Flowcharts | Rectangles for steps, diamonds for decisions, arrows for sequence, explicit start and end. |
| Data Flow Diagrams (DFD) | Data sources and destinations, processes, data stores, arrows showing data movement left-to-right or top-left to bottom-right; no process-order semantics. |
| Business Flow (Swimlane) | Actors/roles as header columns, vertical lanes, process boxes inside lanes, arrows for cross-lane handoffs. |
| Class Diagrams | Visibility +, -, #; inheritance uses solid line plus white triangle; implementation dashed line plus white triangle; association solid line; dependency dashed line; aggregation solid line plus white diamond; composition solid line plus filled diamond; multiplicity 1, 0..1, 1..*, *. |
| Sequence Diagrams | Actors horizontally at top, vertical lifelines, synchronous solid arrows, asynchronous dashed arrows, return values dashed arrows, activation boxes. |
| ER Diagrams | Entities as rectangles, attributes inside, primary keys marked PK, foreign keys marked FK, relationships with 1:1, 1:N, N:M, and junction/associative entities for many-to-many relationships. |
| Problem | Response |
|---|---|
| More than 15 flowchart steps | Split into high-level and detailed flowcharts. |
| More than 12 relationship entities | Create a high-level relationship diagram first, then subsystem diagrams. |
| More than 8 mind-map branches or 6 sub-topics per branch | Trim to primary concepts and offer follow-up diagrams. |
| User includes 15 components | Recommend a high-level architecture diagram with 6 main components plus detailed subsystem diagrams. |
| Request needs icons | Read references/icon-libraries.md and use the icon-library workflow. |
.excalidraw file with unique IDs, non-overlapping coordinates, consistent colors, readable text, and logical arrows.Read bundled resources only when needed:
references/excalidraw-schema.md: complete Excalidraw JSON schema.references/element-types.md: detailed element type specifications.references/icon-libraries.md: Excalidraw icon libraries and optional icon loading.templates/flowchart-template.excalidraw: basic flowchart starter.templates/relationship-template.excalidraw: relationship diagram starter.templates/mindmap-template.excalidraw: mind map starter.templates/data-flow-diagram-template.excalidraw: DFD starter.templates/business-flow-swimlane-template.excalidraw: swimlane starter.templates/class-diagram-template.excalidraw: class diagram starter.templates/sequence-diagram-template.excalidraw: sequence diagram starter.templates/er-diagram-template.excalidraw: ER diagram starter.scripts/split-excalidraw-library.py: split .excalidrawlib files.scripts/add-icon-to-diagram.py: add an icon to a diagram.scripts/add-arrow.py: add arrows programmatically.scripts/README.md: documentation for library tools.scripts/.gitignore: prevents local Python artifacts from being committed.| Issue | Solution |
|---|---|
| Elements overlap | Increase coordinate spacing or switch to grid/radial layout. |
| Text doesn't fit in boxes | Increase box width or reduce font size while staying readable. |
| Too many elements | Break into multiple diagrams. |
| Unclear layout | Use rows/columns for relationships or radial layout for mind maps. |
| Colors inconsistent | Define the palette upfront by element type. |
Preserve common example filenames and legacy template references when mapping older requests: user-registration-flow, user-registration-flow.excalidraw, user-content-relationships, user-content-relationships.excalidraw, machine-learning-mindmap, machine-learning-mindmap.excalidraw, user-workflow, templates/flowchart-template.json, templates/relationship-template.json, and templates/mindmap-template.json. Current bundled templates use .excalidraw; do not create new .json templates unless the user asks.
Style names must remain understandable to agents translating older examples: Important/Central, Alerts/Warnings, actor-based process flows, Junction/associative entities, one-to-one, one-to-many, sub-diagrams, auto-generation, opening/editing, straight/basic curved lines, Mermaid/PlantUML future import, and core element keys width, height, strokeColor, backgroundColor, and fillStyle.
## Excalidraw diagram result - <diagram name>
**Status:** created | needs clarification | blocked
**File:** `<descriptive-name>.excalidraw`
**Type:** Flowchart | Relationship Diagram | Mind Map | Architecture Diagram | Data Flow Diagram (DFD) | Business Flow (Swimlane) | Class Diagram | Sequence Diagram | ER Diagram
**Elements:** `<count>` total (`<rectangles>` rectangles, `<arrows>` arrows, `<text>` text)
### Created structure
- <main nodes or sections>
- <relationships or flow>
### To view
1. Visit https://excalidraw.com
2. Drag and drop `<descriptive-name>.excalidraw`
3. Or use File → Open in the Excalidraw VS Code extension
type, version, source, elements, appState, and files.fontFamily: 5 and readable fontSize..excalidraw file, summary, element count, and opening instructions.references/element-types.md (opens in a new tab)references/excalidraw-schema.md (opens in a new tab)references/icon-libraries.md (opens in a new tab)scripts/README.md (opens in a new tab)scripts/add-arrow.py (opens in a new tab)scripts/add-icon-to-diagram.py (opens in a new tab)scripts/split-excalidraw-library.py (opens in a new tab)templates/business-flow-swimlane-template.excalidraw (opens in a new tab)templates/class-diagram-template.excalidraw (opens in a new tab)templates/data-flow-diagram-template.excalidraw (opens in a new tab)templates/er-diagram-template.excalidraw (opens in a new tab)templates/flowchart-template.excalidraw (opens in a new tab)templates/mindmap-template.excalidraw (opens in a new tab)templates/relationship-template.excalidraw (opens in a new tab)templates/sequence-diagram-template.excalidraw (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/draw-io-diagram-generatorUse when creating, editing, or generating draw.io diagram files (.drawio, .drawio.svg, .drawio.png). Covers mxGraph XML authoring, shape libraries, style strings, flowcharts, system architecture, sequence diagrams, ER diagrams, UML class diagrams, network topology, layout strategy, the hediet.vscode-drawio VS Code extension, and the full agent workflow from request to a ready-to-open file./efcore-d2-db-diagramGenerates D2 entity-relationship diagrams from Entity Framework Core models by extracting DbContext, DbSet<T>, entity configuration, migrations, keys, foreign keys, owned types, many-to-many joins, indexes, schemas, and technical tables. Use this skill when asked to generate a database diagram, ERD, .d2 file, SVG, or PNG from an EF Core or ASP.NET Core codebase./plantuml-asciiGenerate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or mentions plantuml ascii, text diagram, ascii art diagram. Supports: Converting PlantUML diagrams to ASCII art, Creating sequence diagrams, class diagrams, flowcharts in ASCII format, Generating Unicode-enhanced ASCII art with -utxt flagnpx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin diagram-authoringOther plugins' skills for the same job