/diagram-code:excalidrawfrom diagram-code
Generates Excalidraw diagram JSON files for whiteboarding, flowcharts, architecture diagrams, sequence diagrams, mind maps, wireframes, and org charts with hand-drawn aesthetic.
Ships in diagram-code. 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.
Generate .excalidraw JSON files that open directly in Excalidraw. These diagrams have a distinctive hand-drawn aesthetic.
Minimal valid file:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [],
"appState": { "viewBackgroundColor": "#ffffff" },
"files": {}
}
.excalidraw fileAlways bind text to container bidirectionally:
// Rectangle
{
"type": "rectangle",
"id": "box_1",
"x": 100, "y": 100, "width": 150, "height": 60,
"backgroundColor": "#a5d8ff",
"boundElements": [{ "id": "text_1", "type": "text" }],
...baseProps
}
// Bound text
{
"type": "text",
"id": "text_1",
"containerId": "box_1",
"textAlign": "center",
"verticalAlign": "middle",
...textProps
}
Update both arrow and shapes:
// Arrow
{
"type": "arrow",
"id": "arrow_1",
"points": [[0, 0], [150, 0]],
"startBinding": { "elementId": "box_1", "fixedPoint": [1.0, 0.5001], "mode": "orbit" },
"endBinding": { "elementId": "box_2", "fixedPoint": [0.0, 0.5001], "mode": "orbit" },
"endArrowhead": "arrow",
...baseProps
}
// Both shapes need boundElements updated
"boundElements": [{ "id": "arrow_1", "type": "arrow" }]
Flowchart: Ellipse (start/end), Rectangle (process), Diamond (decision), vertical flow with 70px gaps
Sequence Diagram: Rectangles (actors) at top, dashed vertical lines (lifelines), horizontal arrows (messages)
Architecture: Rectangles with rounded corners, group related components, use frames for boundaries
Mind Map: Central ellipse, radiating lines to topic rectangles, organic layout
Org Chart: Rectangles with hierarchy, lines (not arrows) for connections
Wireframe: Rectangles for UI sections, text placeholders, simple shapes for buttons/forms
Bidirectional bindings - When arrow connects to shape, update BOTH:
startBinding/endBindingboundElements arrayfixedPoint precision - Use 0.5001 not 0.5 to avoid floating point issues
Unique IDs - Every element needs unique id
Calculate width/height for lines/arrows from points array
Required base properties for every element:
id, type, x, y, width, height, angle, strokeColor, backgroundColor,
fillStyle, strokeWidth, strokeStyle, roughness, opacity, roundness,
seed, version, versionNonce, isDeleted, updated, groupIds, frameId,
boundElements, link, locked, index
Colors:
#1e1e1e (black), #e03131 (red), #2f9e44 (green), #1971c2 (blue)#a5d8ff (blue), #b2f2bb (green), #ffec99 (yellow), #ffc9c9 (red), #d0bfff (purple)Defaults:
strokeWidth: 2roughness: 1 (hand-drawn), 0 (smooth for text)opacity: 100fontFamily: 5 (Excalifont)fontSize: 20seed: any random integerversion: 1, versionNonce: 0index: "a0", "a1", "a2"...| Type | Use For |
|---|---|
rectangle | Process, container, UI element |
ellipse | Start/end, central node |
diamond | Decision point |
line | Connection without arrow |
arrow | Directional flow |
text | Labels, standalone text |
frame | Grouping boundary |
See references/format-spec.md for complete element schemas, all property values, and detailed examples.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub johnlarkin1/claude-code-extensions --plugin diagram-code3 skills in this plugin
/graphvizGenerate GraphViz DOT files (.dot) for directed/undirected graphs, hierarchical layouts, network diagrams, dependency graphs, state machines, and complex graph visualizations. Use when precise node positioning is needed, when rendering to PNG/SVG/PDF is required, when complex graph algorithms (clustering, ranking) are needed, or when dealing with large graphs (100+ nodes). Triggers on requests mentioning GraphViz, DOT language, network diagrams, dependency graphs, or when sophisticated graph layout is required./mermaidGenerate Mermaid diagrams (.mmd, .mermaid files, or markdown code blocks) for flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, Gantt charts, pie charts, mindmaps, timelines, and git graphs. Use when user requests diagrams for documentation, markdown files, README visualizations, or any text-based diagram format that renders in GitHub/GitLab. Triggers on requests mentioning Mermaid, markdown diagrams, documentation diagrams, or when output needs to be embedded in markdown.Other plugins' skills for the same job