Creates, reads, modifies, and exports Excalidraw diagrams (hand-drawn style, flowcharts, architecture sketches) as .excalidraw JSON files.
Ships in common. 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.
The official Excalidraw MCP server (https://mcp.excalidraw.com) supports natural-language diagram generation. It uses Streamable HTTP transport, which isn't supported by the plugin MCP system — users who want it must add it manually to their Claude Code settings.
If the Excalidraw MCP tools are available in the current session, use them for quick one-shot diagrams. Otherwise, use direct JSON generation as described below.
This skill includes detailed reference files. Read them when you need deeper guidance:
| Reference | When to read |
|---|---|
| references/element-reference.md | Need exact properties for a specific element type (text fields, arrow points, image embedding, frames, groups, freedraw) |
| references/diagram-patterns.md | Building a flowchart, sequence diagram, mind map, architecture diagram, ERD, or DFD — includes layout patterns and shape conventions |
| references/color-palette.md | Choosing colors — semantic fills/strokes, text hierarchy, evidence-artifact palette. Single source of truth for all colors. |
| references/design-methodology.md | Diagram needs to teach or argue (technical architectures, tutorials, documentation). Covers evidence artifacts, multi-zoom, visual patterns, container discipline, and section-by-section authoring for large diagrams |
For most simple diagrams the information in this SKILL.md is sufficient. Consult the references for complex or specific diagram types.
Generate the JSON directly. No subagent needed for creation.
Every .excalidraw file is a JSON object:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [],
"appState": {
"gridSize": null,
"viewBackgroundColor": "#ffffff"
},
"files": {}
}
| Type | Use for |
|---|---|
rectangle | Boxes, nodes, containers |
ellipse | Circles, ovals |
diamond | Decision / branching nodes |
arrow | Connections between shapes |
line | Non-connecting line segments |
text | Standalone labels |
Every element needs all of these:
{
"id": "V1StGXR8_Z5jdHi6B-myT",
"type": "rectangle",
"x": 100,
"y": 100,
"width": 200,
"height": 80,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"frameId": null,
"roundness": null,
"seed": 1482348421,
"version": 1,
"versionNonce": 391154490,
"isDeleted": false,
"boundElements": null,
"updated": 1700000000000,
"link": null,
"locked": false
}
IDs must be random alphanumeric strings (~21 chars, nanoid-style). Never use sequential integers — duplicate or predictable IDs corrupt the file silently.
seed and versionNonce must be random positive integers. Using 0 causes rendering glitches.
When an arrow connects two shapes, three elements need updating:
Arrow:
{
"type": "arrow",
"startBinding": { "elementId": "<source-id>", "focus": 0, "gap": 1 },
"endBinding": { "elementId": "<target-id>", "focus": 0, "gap": 1 },
"points": [[0, 0], [200, 0]]
}
Source shape's boundElements:
"boundElements": [{ "type": "arrow", "id": "<arrow-id>" }]
Target shape's boundElements:
"boundElements": [{ "type": "arrow", "id": "<arrow-id>" }]
All three must be in sync. A broken binding renders as a disconnected floating arrow.
Arrow points always start at [0, 0] — coordinates are relative to the arrow's x,y position.
To place text inside a shape, create a separate text element with containerId set to the parent shape's ID, and add the text to the parent's boundElements:
Parent shape:
"boundElements": [{ "type": "text", "id": "<text-id>" }]
Text element:
"containerId": "<parent-shape-id>"
The text element's strokeColor IS the text color — omitting it can cause invisible text on white backgrounds.
Never use the Read tool on .excalidraw files. Excalidraw JSON consumes 4k-22k tokens — nearly all visual metadata. Always delegate to a subagent.
Main agent Subagent
-------------------------------------------------------------
Receive edit request
Create subagent task -------> Read .excalidraw file
Return semantic summary:
- element labels + types
- connection topology
- NO raw JSON
Specify changes ------------> Apply changes to JSON
Write updated file
Confirm: added/changed/removed
Understand a diagram:
Read
<path>. Return: a list of all elements with their text labels and types, and which elements are connected to which. Do not return any JSON.
Modify a diagram:
Read
<path>. Make these changes:<plain-language changes>. Write the updated file. Confirm which elements were added, changed, or removed.
Compare two diagrams:
Read
<file-a>and<file-b>. Return the architectural differences — which elements exist in one but not the other, and how the connection topology differs. Do not return any JSON.
roughness: 0 for technical/formal diagrams (hand-drawn feel only when explicitly requested)fontFamily: 2 (Helvetica) for professional diagrams, 1 (Virgil) for casual/sketch, 3 (Cascadia) for code-heavy diagramsreferences/color-palette.md — don't invent ad-hoc hex values. Edit that file to customize for a brand.opacity: 25-40 on the background to avoid obscuring contentsFor comprehensive/technical diagrams that would exceed a single output response, build section by section instead of all at once — see the Section-by-Section for Large Diagrams section in references/design-methodology.md.
| Purpose | Size |
|---|---|
| Title | 28px |
| Section | 24px |
| Label | 20px |
| Description | 16px |
| Notes | 14px |
Calculate width: max(160, charCount * 9) for Latin text. Height: 60px for single-line, +24px per additional line.
You cannot judge a diagram from JSON alone. For anything beyond a trivial sketch, render the file to PNG and read the image back so you can see what you produced.
From the skill's scripts/ directory:
python render_excalidraw.py <path-to-file.excalidraw>
The PNG is written next to the .excalidraw file. Use the Read tool on the PNG to actually see the result — the JSON output alone doesn't tell you whether text is clipped, arrows overlap shapes, or spacing is unbalanced.
pip install -r requirements.txt
playwright install chromium
Both commands run from the skill's scripts/ directory. Python 3.11+ is required.
After rendering:
points arrays to route around elements, rebalance sizes across sections.Drag and drop any .excalidraw file into excalidraw.com to open, edit, and export to PNG/SVG. Or use the renderer above for programmatic PNG export.
| Pitfall | Fix |
|---|---|
seed or versionNonce is 0 | Use random positive integers |
| Arrow added but endpoint shapes not updated | Update boundElements on both source and target shapes |
containerId set but container missing entry | Keep containerId and boundElements in sync |
IDs are sequential integers (1, 2, 3) | Use nanoid-style random strings (~21 chars) |
| Main agent reads file to "quickly check" | No exceptions — delegate to subagent |
| Text invisible on white background | Set strokeColor on text element (it IS the text color) |
| Text on container overlaps children | Use a free-standing text at the top, not bound text |
boundElements set to [] | Use null for empty — [] can cause issues |
| Cross-zone diagonal arrows look messy | Route arrows along zone perimeters instead |
references/color-palette.md (opens in a new tab)references/design-methodology.md (opens in a new tab)references/diagram-patterns.md (opens in a new tab)references/element-reference.md (opens in a new tab)scripts/render_excalidraw.py (opens in a new tab)scripts/render_template.html (opens in a new tab)scripts/requirements.txt (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
excalidraw, diagrams, whiteboard, flowcharts, architecture-diagrams
/common:excalidrawfrom common
npx claudepluginhub atc-net/atc-agentic-toolkit --plugin common15 skills in this plugin
/clean-architecture-refactorAct as a senior software architect rebuilding a messy production codebase using clean architecture principles: separate concerns properly, increase modularity, reduce tight coupling, improve scalability, and make the codebase easier to maintain long term. Delivers a new folder structure, a clean architecture breakdown, refactored production-grade code, and an explanation of the architectural improvements — without changing product behavior. Use when the user asks to refactor into clean/scalable architecture, restructure or modularize a messy codebase, separate concerns, reduce coupling, or reorganize the folder/project structure. For .NET layered/DDD structure use dotnet:dotnet-architecture; for a non-mutating assessment first use senior-engineer-audit.
/coding-disciplineBehavioral guardrails that reduce common AI coding mistakes: understand before implementing, write the minimum that solves the problem, change only what the task requires, and define verifiable success criteria. Apply this skill whenever writing, reviewing, refactoring, editing, or debugging code in any language -- even when the user does not explicitly ask for "discipline" or "best practices." Bias toward caution over speed; use judgment on trivial tasks.
Other plugins' skills for the same job