excalidraw-diagram
Skill4 starsChanged 6 months agoMITView on GitHub
Create Excalidraw diagrams as editable `.excalidraw` JSON that make a visual argument — architecture, flowchart, sequence, state, ER, timeline, swimlane, quadrant, loop/flywheel, layers, nested, tree, org chart, venn, pyramid, process, medallion, data flow, IT current-state, evidence/protocol explainers, before/after comparisons, and charts — with themed brand skins, a taste gate, progressive type refs, and a mandatory render-inspect loop. Prefer this over static HTML/SVG or Mermaid-slop when the diagram must open in Excalidraw/Obsidian/VS Code, prove claims with evidence artifacts, or iterate until it looks right. Triggers on "make a diagram", "draw the architecture", "visualize this", "excalidraw", "flowchart", "system design diagram", "sketch this out", "whiteboard it", or brand-matched technical diagrams.
37 other projects use a version of this, 20 of them edited.
Adopted by
Most recently taken up by
- hmjBill/skillstheir own version, first seen Oct 5, 2026
- microsoft/frontier-ai-governance-rvasedited, first seen Oct 3, 2026
- microsoft/frontier-agentic-cobuild-rvasedited, first seen Oct 3, 2026
- oldwinter/skillstheir own version, first seen Sep 26, 2026
- microsoft/frontier-ghcp-ttt-rvasedited, first seen Sep 9, 2026
- breferrari/obsidian-mindtheir own version, first seen Aug 17, 2026
Used with
Projects with it also use mermaid-visualizer, obsidian-canvas-creator and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
BCS1037Skillmermaid-visualizer
Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, or make diagrams from text. Supports process flows, system architectures, comparisons, mindmaps, and more with built-in syntax error prevention.
Also in 7 projects that use this
BCS1037Skillobsidian-canvas-creator
Create Obsidian Canvas files from text content, supporting both MindMap and freeform layouts. Use this skill when users want to visualize content as an interactive canvas, create mind maps, or organize information spatially in Obsidian format.
Also in 4 projects that use this
BlockSkillskill-builder
Create, edit, or inspect Berd skills stored as skill folders with SKILL.md files. Use when the user wants to build a new skill, update an existing skill, convert a workflow into a reusable skill, or decide whether instructions, scripts, references, or assets belong in a skill.
Also in 4 projects that use this
KKodiacSkillobsidian-bases
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
Also in 3 projects that use this
VercelSkillremotion-best-practices
Best practices for Remotion - Video creation in React
Also in 3 projects that use this
VercelSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Also in 8 projects that use this
Other versions37 projects use a version of this.
Word for word · 0
None found.
Edited · 20
- coleam00/excalidraw-diagram-skill★ 4.9k45% same
- walidboulanouar/Ay-Skills★ 9146% same
- kv0906/cc-skills★ 1645% same
- ccomkhj/skills★ 845% same
- Harmeet10000/skills★ 745% same
- kevin-burns/claude-skills★ 732% same
- microsoft/frontier-agentic-cobuild-rvas★ 545% same
- Bosh-Kuo/awesome-agent-toolkit★ 250% same
- ShellyDeng08/codebase-slideshow★ 245% same
- Yesterday-AI/skills★ 230% same
10 more not listed
Wrote their own version · 17
- breferrari/obsidian-mind★ 4.9ksame name
- axtonliu/axton-obsidian-visual-skills★ 3.6ksame name
- xstongxue/best-skills★ 2.9ksame name
- aiagentwithdhruv/skills★ 17same name
- BCS1037/awesome-obsidian-skills★ 9same name
- oldwinter/skills★ 8same name
- shahzadahmadv1/ExcaliClaude★ 3same name
- skizha/agent-skills★ 3same name
- austinpeechatt/claude-code-skills★ 2same name
- dqtx760/skills-manage★ 2same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- web/llms.txtllms.txt
The file
Show its rules and text
We split this skill into the rules it gives an agent
44 rules. 5 are common, 25 are distinctive, and 14 are very specific to this project.
5
Common
Most of the 33 edited versions we read keep these.
25
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Setup: If the user asks you to set up this skill (renderer, dependencies, etc.), use the installed adapter docs or the project README.
- Distinctive: line 30
Don't silently ship default-skinned diagrams into a branded project.
- Distinctive: line 34
When you create or edit a diagram:
- Very specific: line 37
Prefer skeleton format while drafting.
- Very specific: line 38
If the user names an output path, write there.
- Very specific: line 39
Prefer the active theme for all color, typography, element, and layout decisions — read its palette.md before drawing.
- Very specific: line 41
Run the taste gate in references/taste-gate.md before declaring done.
- Very specific: line 47
Cursor note: when installed via the Cursor adapter, progressive-disclosure files live at .cursor/excalidraw-skill-pack/references/ (same …
- Distinctive: line 67
The Isomorphism Test: If you removed all text, would the structure alone communicate the concept?
- Distinctive: line 113
If a 3-column table communicates the same thing, pick the table.
- Distinctive: line 114
If combining two types, pick the dominant axis — don't hybridize grammars.
- Distinctive: line 115
If past the complexity budget, split into overview + detail.
- Distinctive: line 116
Prefer Evidence or Comparison when the goal is to *teach or convince*, not merely *label*.
- Common: line 120
Before designing, determine what level of detail this diagram needs:
- Common: line 123
Use abstract shapes when:
- Common: line 129
Use concrete examples when:
- Distinctive: line 143
If you're diagramming a protocol, API, or framework:
- Distinctive: line 144
Look up the actual JSON/data formats
- Distinctive: line 147
Use real terminology, not generic placeholders
- Common: line 233
Not every piece of text needs a shape around it: Default to free-floating text.
- Distinctive: line 243
Typography as hierarchy: Use font size, weight, and color to create visual hierarchy without boxes.
- Distinctive: line 252
Before anything else, determine if this needs to be:
- Distinctive: line 256
If comprehensive: Do research first. Look up actual specs, formats, event names, APIs.
- Distinctive: line 259
Read the content. For each concept, ask:
- Common: line 284
Before JSON, mentally trace how the eye moves through the diagram.
- Distinctive: line 287
Only now create the Excalidraw elements.
- Very specific: line 290
Run references/taste-gate.md.
- Distinctive: line 293
After generating the JSON, you MUST run the render-view-fix loop until the diagram looks right.
- Distinctive: line 302
Every generated element must be complete enough for Excalidraw and the renderer to load without repair:
- Very specific: line 308
Use descriptive, stable IDs such as ingest_box, eval_loop_arrow, artifact_code_text.
- Very specific: line 309
Use unique numeric seed and versionNonce values.
- Very specific: line 310
Keep opacity: 100; use color, stroke width, scale, and spacing for hierarchy.
- Very specific: line 311
Use roughness: 0 for polished technical diagrams and roughness: 1 only for intentionally sketchy/whiteboard diagrams.
- Distinctive: line 312
Keep text readable at export size.
- Very specific: line 356
All style props you'd normally set (strokeColor, backgroundColor, fillStyle, strokeWidth, strokeStyle, roughness, fontSize, fontFamily, …
- Very specific: line 382
Only flowchart/sequence/class are natively supported.
- Distinctive: line 428
Use the installed renderer (any of these — whichever the environment provides):
- Very specific: line 438
If you're in an MCP-enabled agent, call the render_diagram tool instead.
- Distinctive: line 442
After generating the initial JSON, run this cycle:
- Very specific: line 467
Add intermediate waypoints to arrow points arrays to route around elements
- Distinctive: line 479
No text is clipped, overlapping, or unreadable
- Distinctive: line 517
Connections: Every relationship has an arrow or line
- Distinctive: line 530
No text overflow: All text fits within its container
- Distinctive: line 535
Balanced composition: No large empty voids or overcrowded regions
“Common” is measured: kept by at least 6 in 10 of the 33 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Excalidraw Diagram Creator
Generate .excalidraw JSON files that argue visually, not just display information.
Editable forever. Themeable. Renderable to PNG. Open in Excalidraw, Obsidian, or VS Code. Twenty-nine typed layouts with progressive disclosure, a first-run brand gate, a taste gate that deletes until the argument is sharp, and a mandatory render-inspect loop — so the diagram is never “done” until it looks right.
Setup: If the user asks you to set up this skill (renderer, dependencies, etc.), use the installed adapter docs or the project README.
0. First-run theme gate
Before generating the first diagram in a new project, verify the theme is intentional.
Resolve the active theme (--theme → project .excalidraw-skill-pack.json → ~/.excalidraw-skill-pack/config.json → default-sketchy). If the project still rides the bundled default and the user has a brand, pause and ask:
"This project is still on
default-sketchy. Customize the theme to match your brand first? (a) pull from a website URL, (b) extract from an installed skill, (c) extract from a local design-token folder, (d) paste tokens manually, (e) proceed with the default for now."
Then follow references/onboarding.md. Once onboarded (project config points at a theme, or the user explicitly chose default), skip this gate.
Don't silently ship default-skinned diagrams into a branded project.
Output Contract
When you create or edit a diagram:
- Produce a valid
.excalidraw/excalidraw-skeleton/mermaiddocument, not a prose-only answer. - Prefer skeleton format while drafting; hydrate to a full
.excalidrawfor the shareable deliverable. - If the user names an output path, write there. Otherwise use
./diagram.excalidraw. - Prefer the active theme for all color, typography, element, and layout decisions — read its
palette.mdbefore drawing. - Pick a diagram type from
references/types/index.mdand load that type's reference before generating elements. - Run the taste gate in
references/taste-gate.mdbefore declaring done. - Render and inspect the PNG. Fix visible defects. Loop until it passes.
- In the final response, report the
.excalidrawpath, rendered image path if created, theme used, type used, and any validation caveats.
Do not add nonstandard Excalidraw properties such as label on full elements. Labels are text elements (or skeleton label: { text } which the hydrator converts). For full-element shape labels, bind a text element to the container with containerId, and keep the text element immediately after its container in elements.
Cursor note: when installed via the Cursor adapter, progressive-disclosure files live at .cursor/excalidraw-skill-pack/references/ (same tree as packages/core/references/). Load type/taste/onboarding docs from there.
Customization
All colors, typography, and layout rules live in the active theme. Themes are standalone packages: default-sketchy is bundled in core; additional themes ship as @excalidraw-skill-pack/theme-* (npm) or excalidraw-skill-pack-theme-* (PyPI). See references/color-palette.md.
The active theme is resolved per call (--theme flag), per project (.excalidraw-skill-pack.json), or globally (~/.excalidraw-skill-pack/config.json). The MCP server's generate_diagram_prompt tool splices the active theme's palette.md and any requested layouts/<template>.md into the agent's system prompt at call time.
To author a new theme: npx @excalidraw-skill-pack/create-theme my-brand. See https://excalidraw-skill-pack.vercel.app/themes/create.
Core Philosophy
Diagrams ARGUE, not DISPLAY.
A diagram isn't formatted text. It's a visual argument that shows relationships, causality, and flow that words alone can't express. The shape should BE the meaning.
The highest-quality move is usually deletion. Every node earns its place. Accent color is reserved for the 1–2 things the reader should look at first. Target density: ~4/10. The diagram isn't done when everything is added — it's done when nothing can be removed. See references/taste-gate.md and references/anti-patterns.md.
The Isomorphism Test: If you removed all text, would the structure alone communicate the concept? If not, redesign.
The Education Test: Could someone learn something concrete from this diagram, or does it just label boxes? A good diagram teaches — it shows actual formats, real event names, concrete examples.
Why Excalidraw (not static HTML/SVG): the artifact stays editable, opens in the tools people already use, themes as publishable packages, and the render-inspect loop catches visual defects that prompt-only SVG never sees.
Diagram Types (progressive disclosure)
Always load the matching type file before drawing. The lean index lives in references/types/index.md; each type has layout conventions, Excalidraw patterns, anti-patterns, and a complexity budget.
| If you're showing… | Use | Reference |
| Components + connections in a system | Architecture | type-architecture.md |
| Decision logic with branches | Flowchart | type-flowchart.md |
| Time-ordered messages between actors | Sequence | type-sequence.md |
| States + transitions + guards | State | type-state.md |
| Entities + fields + relationships | ER / data model | type-er.md |
| Events positioned in time | Timeline | type-timeline.md |
| Cross-functional handoffs | Swimlane | type-swimlane.md |
| Two-axis positioning | Quadrant | type-quadrant.md |
| Reinforcing cycle / flywheel | Loop | type-loop.md |
| Hierarchy by containment | Nested | type-nested.md |
| Parent → children | Tree | type-tree.md |
| Ownership / reporting / escalation | Org chart | type-org-chart.md |
| Stacked abstractions | Layers | type-layers.md |
| Set overlap | Venn | type-venn.md |
| Ranked hierarchy or drop-off | Pyramid | type-pyramid.md |
| Multi-actor sequential workflow | Process | type-process.md |
| Protocol / system claim with proof | Evidence (moat) | type-evidence.md |
| Before → after engineered contrast | Comparison (moat) | type-comparison.md |
| Multi-tier data quality | Medallion | type-medallion.md |
| Payload movement + transforms | Data flow | type-data-flow.md |
| Legacy landscape / modernization | IT current-state | type-it-state.md |
| End-to-end stack on a cluster | High-level | type-high-level.md |
| Sources → core → consumers | DP integration | type-dp-integration.md |
| Per-role access permissions | DP security matrix | type-dp-security-matrix.md |
| Multi-axis profile | Radar | type-radar.md |
| Tasks on a schedule | Gantt | type-gantt.md |
| Categorical magnitudes | Bar | type-bar.md |
| Trends over time | Line | type-line.md |
| Distribution / correlation | Scatter | type-scatter.md |
Rules of thumb:
- If a 3-column table communicates the same thing, pick the table.
- If combining two types, pick the dominant axis — don't hybridize grammars.
- If past the complexity budget, split into overview + detail.
- Prefer Evidence or Comparison when the goal is to teach or convince, not merely label.
Depth Assessment (Do This First)
Before designing, determine what level of detail this diagram needs:
Simple/Conceptual Diagrams
Use abstract shapes when:
- Explaining a mental model or philosophy
- The audience doesn't need technical specifics
- The concept IS the abstraction (e.g., "separation of concerns")
Comprehensive/Technical Diagrams
Use concrete examples when:
- Diagramming a real system, protocol, or architecture
- The diagram will be used to teach or explain (e.g., YouTube video)
- The audience needs to understand what things actually look like
- You're showing how multiple technologies integrate
For technical diagrams, you MUST include evidence artifacts (see below).
Research Mandate (For Technical Diagrams)
Before drawing anything technical, research the actual specifications.
If you're diagramming a protocol, API, or framework:
- Look up the actual JSON/data formats
- Find the real event names, method names, or API endpoints
- Understand how the pieces actually connect
- Use real terminology, not generic placeholders
Bad: "Protocol" → "Frontend" Good: "AG-UI streams events (RUN_STARTED, STATE_DELTA, A2UI_UPDATE)" → "CopilotKit renders via createA2UIMessageRenderer()"
Research makes diagrams accurate AND educational.
Evidence Artifacts
Evidence artifacts are concrete examples that prove your diagram is accurate and help viewers learn. Include them in technical diagrams.
Types of evidence artifacts (choose what's relevant to your diagram):
| Artifact Type | When to Use | How to Render |
| Code snippets | APIs, integrations, implementation details | Dark rectangle + syntax-colored text (see color palette for evidence artifact colors) |
| Data/JSON examples | Data formats, schemas, payloads | Dark rectangle + colored text (see color palette) |
| Event/step sequences | Protocols, workflows, lifecycles | Timeline pattern (line + dots + labels) |
| UI mockups | Showing actual output/results | Nested rectangles mimicking real UI |
| Real input content | Showing what goes IN to a system | Rectangle with sample content visible |
| API/method names | Real function calls, endpoints | Use actual names from docs, not placeholders |
Example: For a diagram about a streaming protocol, you might show:
- The actual event names from the spec (not just "Event 1", "Event 2")
- A code snippet showing how to connect
- What the streamed data actually looks like
Example: For a diagram about a data transformation pipeline:
- Show sample input data (actual format, not "Input")
- Show sample output data (actual format, not "Output")
- Show intermediate states if relevant
The key principle: show what things actually look like, not just what they're called.
Multi-Zoom Architecture
Comprehensive diagrams operate at multiple zoom levels simultaneously. Think of it like a map that shows both the country borders AND the street names.
Level 1: Summary Flow
A simplified overview showing the full pipeline or process at a glance. Often placed at the top or bottom of the diagram.
Example: Input → Processing → Output or Client → Server → Database
Level 2: Section Boundaries
Labeled regions that group related components. These create visual "rooms" that help viewers understand what belongs together.
Example: Grouping by responsibility (Backend / Frontend), by phase (Setup / Execution / Cleanup), or by team (User / System / External)
Level 3: Detail Inside Sections
Evidence artifacts, code snippets, and concrete examples within each section. This is where the educational value lives.
Example: Inside a "Backend" section, you might show the actual API response format, not just a box labeled "API Response"
For comprehensive diagrams, aim to include all three levels. The summary gives context, the sections organize, and the details teach.
Bad vs Good
| Bad (Displaying) | Good (Arguing) |
| 5 equal boxes with labels | Each concept has a shape that mirrors its behavior |
| Card grid layout | Visual structure matches conceptual structure |
| Icons decorating text | Shapes that ARE the meaning |
| Same container for everything | Distinct visual vocabulary per concept |
| Everything in a box | Free-floating text with selective containers |
Simple vs Comprehensive (Know Which You Need)
| Simple Diagram | Comprehensive Diagram |
| Generic labels: "Input" → "Process" → "Output" | Specific: shows what the input/output actually looks like |
| Named boxes: "API", "Database", "Client" | Named boxes + examples of actual requests/responses |
| "Events" or "Messages" label | Timeline with real event/message names from the spec |
| "UI" or "Dashboard" rectangle | Mockup showing actual UI elements and content |
| ~30 seconds to explain | ~2-3 minutes of teaching content |
| Viewer learns the structure | Viewer learns the structure AND the details |
Simple diagrams are fine for abstract concepts, quick overviews, or when the audience already knows the details. Comprehensive diagrams are needed for technical architectures, tutorials, educational content, or when you want the diagram itself to teach.
Container vs. Free-Floating Text
Not every piece of text needs a shape around it. Default to free-floating text. Add containers only when they serve a purpose.
| Use a Container When... | Use Free-Floating Text When... |
| It's the focal point of a section | It's a label or description |
| It needs visual grouping with other elements | It's supporting detail or metadata |
| Arrows need to connect to it | It describes something nearby |
| The shape itself carries meaning (decision diamond, etc.) | Typography alone creates sufficient hierarchy |
| It represents a distinct "thing" in the system | It's a section title, subtitle, or annotation |
Typography as hierarchy: Use font size, weight, and color to create visual hierarchy without boxes. A 28px title doesn't need a rectangle around it.
The container test: For each boxed element, ask "Would this work as free-floating text?" If yes, remove the container.
Design Process (Do This BEFORE Generating JSON)
Step 0: Assess Depth Required
Before anything else, determine if this needs to be:
- Simple/Conceptual: Abstract shapes, labels, relationships (mental models, philosophies)
- Comprehensive/Technical: Concrete examples, code snippets, real data (systems, architectures, tutorials)
If comprehensive: Do research first. Look up actual specs, formats, event names, APIs.
Step 1: Understand Deeply
Read the content. For each concept, ask:
- What does this concept DO? (not what IS it)
- What relationships exist between concepts?
- What's the core transformation or flow?
- What would someone need to SEE to understand this? (not just read about)
Step 2: Map Concepts to Patterns
For each concept, find the visual pattern that mirrors its behavior:
| If the concept... | Use this pattern |
| Spawns multiple outputs | Fan-out (radial arrows from center) |
| Combines inputs into one | Convergence (funnel, arrows merging) |
| Has hierarchy/nesting | Tree (lines + free-floating text) |
| Is a sequence of steps | Timeline (line + dots + free-floating labels) |
| Loops or improves continuously | Spiral/Cycle (arrow returning to start) |
| Is an abstract state or context | Cloud (overlapping ellipses) |
| Transforms input to output | Assembly line (before → process → after) |
| Compares two things | Side-by-side (parallel with contrast) |
| Separates into phases | Gap/Break (visual separation between sections) |
Step 3: Ensure Variety
For multi-concept diagrams: each major concept must use a different visual pattern. No uniform cards or grids.
Step 4: Sketch the Flow
Before JSON, mentally trace how the eye moves through the diagram. There should be a clear visual story.
Step 5: Generate JSON
Only now create the Excalidraw elements. See below for how to handle large diagrams.
Step 6: Taste Gate
Run references/taste-gate.md. Delete until the argument is sharp. Reject anything in references/anti-patterns.md.
Step 7: Render & Validate (MANDATORY)
After generating the JSON, you MUST run the render-view-fix loop until the diagram looks right. This is not optional — see the Render & Validate section below for the full process.
Step 8: Report the Artifact
Return the file path, theme, type, and what changed. Do not paste the full JSON unless the user asked for it.
Excalidraw Correctness Contract
Every generated element must be complete enough for Excalidraw and the renderer to load without repair:
- Include
id,type,x,y,width,height,angle,strokeColor,backgroundColor,fillStyle,strokeWidth,strokeStyle,roughness,opacity,seed,version,versionNonce,isDeleted,groupIds,boundElements,link, andlockedwhere applicable. - Text elements include
text,originalText,fontSize,fontFamily,textAlign,verticalAlign,containerId, andlineHeight. - Bound shape labels use
boundElementson the shape andcontainerIdon the text. The text element follows the shape immediately. - Arrows use
points,startBinding,endBinding,startArrowhead, andendArrowhead. Usefocus/gapbindings, not ad hoc endpoint guesses. - Use descriptive, stable IDs such as
ingest_box,eval_loop_arrow,artifact_code_text. - Use unique numeric
seedandversionNoncevalues. For multi-section diagrams, namespace seeds by section. - Keep
opacity: 100; use color, stroke width, scale, and spacing for hierarchy. - Use
roughness: 0for polished technical diagrams androughness: 1only for intentionally sketchy/whiteboard diagrams. - Keep text readable at export size. Minimum body text is 16px; prefer 18-24px for labels.
See element-templates.md and json-schema.md for copy-paste structures.
Comprehensive / large diagram strategy
See references/comprehensive-diagrams.md — consult it when building a large or comprehensive diagram section by section.
Visual language (patterns, shapes, color, layout, text)
See references/visual-language.md — consult it when choosing patterns, shapes, colors, and layout for a diagram.
Authoring Format: Skeleton (recommended) vs Full Elements
There are two ways to write a diagram. Default to the skeleton format — it is dramatically less verbose and eliminates a whole class of malformed-JSON defects.
Skeleton format (preferred)
Set "type": "excalidraw-skeleton" and write the minimum per element. The renderer hydrates it via Excalidraw's convertToExcalidrawElements, which auto-generates id, seed, versionNonce, boundElements, containerId, the bound text-label elements, and arrow point geometry.
{
"type": "excalidraw-skeleton",
"elements": [
{ "type": "rectangle", "id": "ingest", "x": 100, "y": 100, "width": 160, "height": 80,
"strokeColor": "#1e1e1e", "backgroundColor": "#ffffff", "roughness": 0,
"label": { "text": "Ingest" } },
{ "type": "ellipse", "id": "store", "x": 480, "y": 110, "width": 140, "height": 80,
"label": { "text": "Store" } },
{ "type": "arrow", "x": 270, "y": 140, "width": 200, "height": 0,
"start": { "id": "ingest" }, "end": { "id": "store" }, "label": { "text": "writes" } }
]
}What you still provide:
type,x,y, and (for shapes)width/height.label: { text }for a bound text label — no separate text element, nocontainerIdwiring.- All style props you'd normally set (
strokeColor,backgroundColor,fillStyle,strokeWidth,strokeStyle,roughness,fontSize,fontFamily,opacity) — pull these from the active theme exactly as before. The skeleton only removes boilerplate, not styling control.
Arrow binding — the one gotcha: a bound arrow still needs approximate geometry. Give it x/y (a point near the source) and width/height (the delta toward the target), then:
- bind to existing elements with
"start": { "id": "..." }/"end": { "id": "..." }, or - auto-create new endpoint shapes with
"start": { "type": "rectangle" }/"end": { "type": "ellipse" }. Without coordinates (x:0, y:0), the arrow renders detached at the origin.
Frames (native section boundaries): { "type": "frame", "name": "Backend", "children": ["id1", "id2"] }.
Mermaid fast-path (structured diagrams)
For rigid, structured diagrams — flowcharts, sequence diagrams, class diagrams — don't hand-author elements at all. Write Mermaid and let the renderer convert it:
{
"type": "mermaid",
"definition": "flowchart LR\n A[Client] -->|request| B(API)\n B --> C{Auth?}\n C -->|yes| D[(DB)]\n C -->|no| E[Reject]"
}The renderer parses it with @excalidraw/mermaid-to-excalidraw, hydrates to full elements, and renders in the active theme's hand-drawn style. hydrate works on Mermaid docs too, producing an editable .excalidraw.
When to use which:
- Mermaid — the structure is the whole point (a flow, a sequence, a class hierarchy) and Mermaid's auto-layout is good enough. Cheapest possible authoring.
- Skeleton / full elements — a visual argument: evidence artifacts, multi-zoom, deliberate composition, free-floating text, anything Mermaid's rigid layout can't express. This is where the methodology earns its keep.
Only flowchart/sequence/class are natively supported; other Mermaid types fall back to an image. If a Mermaid diagram comes out looking like a generic labeled grid, that's the signal to switch to the skeleton format and argue.
Hydrating to an openable file
A skeleton file does not open directly in Excalidraw (it expects fully-qualified elements). The renderer reads skeletons fine, but to produce an editable/shareable .excalidraw:
excalidraw-render hydrate diagram.excalidraw -o diagram.full.excalidrawDraft as a skeleton → render + iterate (fast, cheap) → hydrate to a full file for the final deliverable.
Full-element format
Hand-write fully-qualified elements (the Excalidraw Correctness Contract above governs this path) only when you need control the skeleton can't express — exact seed reproducibility, custom multi-waypoint arrow points, or hand-tuned geometry. For everything else, skeleton wins.
JSON Structure
Full-element envelope (what hydrate produces and what the full-element path uses):
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [...],
"appState": {
"viewBackgroundColor": "#ffffff",
"gridSize": 20
},
"files": {}
}Element Templates
See references/element-templates.md for copy-paste JSON templates for each element type (text, line, dot, rectangle, arrow). Pull colors from references/color-palette.md based on each element's semantic purpose.
Render & Validate (MANDATORY)
You cannot judge a diagram from JSON alone. After generating or editing the Excalidraw JSON, you MUST render it to PNG, view the image, and fix what you see — in a loop until it's right. This is a core part of the workflow, not a final check.
How to Render
Use the installed renderer (any of these — whichever the environment provides):
# Node CLI (npm)
npx @excalidraw-skill-pack/render <path-to-file.excalidraw> --theme <theme>
# Python CLI (PyPI) — installs the `excalidraw-render` command
excalidraw-render <path-to-file.excalidraw> --theme <theme>If you're in an MCP-enabled agent, call the render_diagram tool instead. All paths accept full .excalidraw, excalidraw-skeleton, and mermaid documents and write a PNG next to the file. Then use the Read tool on the PNG to actually view it.
The Loop
After generating the initial JSON, run this cycle:
1. Render & View — Run the render script, then Read the PNG.
2. Audit against your original vision — Before looking for bugs, compare the rendered result to what you designed in Steps 1-4. Ask:
- Does the visual structure match the conceptual structure you planned?
- Does each section use the pattern you intended (fan-out, convergence, timeline, etc.)?
- Does the eye flow through the diagram in the order you designed?
- Is the visual hierarchy correct — hero elements dominant, supporting elements smaller?
- For technical diagrams: are the evidence artifacts (code snippets, data examples) readable and properly placed?
3. Check for visual defects:
- Text clipped by or overflowing its container
- Text or shapes overlapping other elements
- Arrows crossing through elements instead of routing around them
- Arrows landing on the wrong element or pointing into empty space
- Labels floating ambiguously (not clearly anchored to what they describe)
- Uneven spacing between elements that should be evenly spaced
- Sections with too much whitespace next to sections that are too cramped
- Text too small to read at the rendered size
- Overall composition feels lopsided or unbalanced
4. Fix — Edit the JSON to address everything you found. Common fixes:
- Widen containers when text is clipped
- Adjust
x/ycoordinates to fix spacing and alignment - Add intermediate waypoints to arrow
pointsarrays to route around elements - Reposition labels closer to the element they describe
- Resize elements to rebalance visual weight across sections
5. Re-render & re-view — Run the render script again and Read the new PNG.
6. Repeat — Keep cycling until the diagram passes both the vision check (Step 2) and the defect check (Step 3). Typically takes 2-4 iterations. Don't stop after one pass just because there are no critical bugs — if the composition could be better, improve it.
When to Stop
The loop is done when:
- The rendered diagram matches the conceptual design from your planning steps
- No text is clipped, overlapping, or unreadable
- Arrows route cleanly and connect to the right elements
- Spacing is consistent and the composition is balanced
- You'd be comfortable showing it to someone without caveats
First-Time Setup
The renderer drives headless Chromium via Playwright. If a render fails because the browser isn't installed:
# Node renderer
npx playwright install chromium
# Python renderer
excalidraw-render --help # the package installs Playwright; if missing:
python -m playwright install chromiumQuality Checklist
Depth & Evidence (Check First for Technical Diagrams)
- Research done: Did you look up actual specs, formats, event names?
- Evidence artifacts: Are there code snippets, JSON examples, or real data?
- Multi-zoom: Does it have summary flow + section boundaries + detail?
- Concrete over abstract: Real content shown, not just labeled boxes?
- Educational value: Could someone learn something concrete from this?
Conceptual
- Isomorphism: Does each visual structure mirror its concept's behavior?
- Argument: Does the diagram SHOW something text alone couldn't?
- Variety: Does each major concept use a different visual pattern?
- No uniform containers: Avoided card grids and equal boxes?
Container Discipline
- Minimal containers: Could any boxed element work as free-floating text instead?
- Lines as structure: Are tree/timeline patterns using lines + text rather than boxes?
- Typography hierarchy: Are font size and color creating visual hierarchy (reducing need for boxes)?
Structural
- Connections: Every relationship has an arrow or line
- Flow: Clear visual path for the eye to follow
- Hierarchy: Important elements are larger/more isolated
Technical
- Text clean:
textcontains only readable words - Font:
fontFamily: 3 - Roughness:
roughness: 0for clean/modern (unless hand-drawn style requested) - Opacity:
opacity: 100for all elements (no transparency) - Container ratio: <30% of text elements should be inside containers
Visual Validation (Render Required)
- Rendered to PNG: Diagram has been rendered and visually inspected
- No text overflow: All text fits within its container
- No overlapping elements: Shapes and text don't overlap unintentionally
- Even spacing: Similar elements have consistent spacing
- Arrows land correctly: Arrows connect to intended elements without crossing others
- Readable at export size: Text is legible in the rendered PNG
- Balanced composition: No large empty voids or overcrowded regions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

