excalidraw-diagrams
Skill167 starsChanged 10 days agoApache-2.0View on GitHub
Use when asked to create or update Excalidraw diagrams. Provides guidance on Excalidraw best practices.
We split this skill into the rules it gives an agent
10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
When creating Excalidraw diagrams, ensure you:
- Very specific: line 17
Call read_me before your first create_view call each session - it provides the colour palette, camera sizes, layout rules, and element …
- Distinctive: line 26
Use when the diagram is for the conversation only - the user wants to see it in the chat and does not need a file.
- Very specific: line 28
Use create_view with label on shapes (works fine here)
- Very specific: line 29
Use cameraUpdate to animate and guide attention
- Distinctive: line 30
No file output needed
- Very specific: line 34
Use when the user needs a .excalidraw file to open, share, edit, or keep.
- Distinctive: line 42
Use when the user wants to see the diagram in the chat AND keep a file.
- Very specific: line 53
Do NOT use export_to_excalidraw for shareable diagrams.
- Very specific: line 61
All elements in .excalidraw files also need: angle, seed, version, versionNonce, isDeleted, groupIds, frameId, updated, link, locked.
“Common” is measured: kept by at least 6 in 10 of the 6 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
Creating Excalidraw Diagrams
When creating Excalidraw diagrams, ensure you:
- Generate the layout with correct spacing
- Make consistent and logical use of colours, fonts, and shapes
- Text is correctly added within shapes, not as separate text elements (unless desired)
- Arrows and lines are correctly anchored / connected to shapes (not floating) so that when objects are moved any connections remain intact
- You save the Excalidraw diagram content to a file and link the file path
- Call
read_mebefore your firstcreate_viewcall each session - it provides the colour palette, camera sizes, layout rules, and element format reference. - If the user has asked you to create Excalidraw diagrams but you do not have the Excalidraw MCP enabled, you should ask them to add it for you, they can configured it by using the HTTP MCP URL of: https://excalidraw-mcp-app.vercel.app/mcp and they can view the MCP documentation here: https://github.com/excalidraw/excalidraw-mcp
Choose your workflow
Pick one based on what the user needs. Do not default to doing both.
Inline preview only (create_view)
Use when the diagram is for the conversation only - the user wants to see it in the chat and does not need a file.
- Use
create_viewwithlabelon shapes (works fine here) - Use
cameraUpdateto animate and guide attention - No file output needed
File output only (Python script)
Use when the user needs a .excalidraw file to open, share, edit, or keep. Skip create_view entirely.
- Generate the file with
scripts/generate_excalidraw.py(see below) - Provide the file path to the user
- Files can be opened by dragging into excalidraw.com, the Excalidraw desktop app, or VS Code with the Excalidraw extension
Both (inline preview + file)
Use when the user wants to see the diagram in the chat AND keep a file. Note: these are built independently with different element formats. There is no data bridge between them - you define the diagram structure once conceptually but render it twice.
create_viewwithlabelfor the inline preview- Python script with
labeled_rectfor the.excalidrawfile
Critical: text does not survive export
The label property on shapes is a create_view convenience only. It does NOT work in:
export_to_excalidrawuploads (shapes render, text is invisible).excalidrawfiles written fromcreate_viewcheckpoint data
Do NOT use export_to_excalidraw for shareable diagrams. It seems to have a bug that can silently drop all text.
Native Excalidraw represents text inside shapes as two linked elements:
- Shape:
"boundElements": [{"id": "text-id", "type": "text"}] - Text:
"containerId": "shape-id","textAlign": "center","verticalAlign": "middle"
The text element requires fields the label shorthand omits: fontFamily (1), width, height, originalText, lineHeight (1.25), autoResize (true).
All elements in .excalidraw files also need: angle, seed, version, versionNonce, isDeleted, groupIds, frameId, updated, link, locked.
Hand-writing this JSON is error-prone. Use the Python script instead.
Python script: scripts/generate_excalidraw.py
Generates native .excalidraw files with all required fields. Can be used inline in a bash heredoc or imported as a library.
Key functions:
| Function | Returns | Purpose |
labeled_rect(id, x, y, w, h, bg, stroke, label, ...) | [rect, text] | Shape with centred bound text (handles all binding and field generation) |
rect(id, x, y, w, h, bg, stroke, ...) | element | Rectangle without text |
txt(id, x, y, w, h, text, size, ...) | element | Standalone or bound text |
bound_arrow(id, elements, start_id, start_point, end_id, end_point, ...) | element | Arrow anchored to two shapes (mutates shapes' boundElements) |
arrow(id, x, y, w, h, points, ...) | element | Unbound/floating arrow (use bound_arrow instead when connecting shapes) |
ellipse(...) / diamond(...) | element | Other shape types |
write_scene(elements, path) | writes file | Wraps in scene structure and saves |
Example:
python3 << 'PYEOF'
import sys, random
sys.path.insert(0, "/Users/samm/.claude/skills/excalidraw-diagrams/scripts")
from generate_excalidraw import *
random.seed(42)
elements = []
elements.append(txt("t1", 200, 10, 300, 30, "My Diagram", 24))
elements.extend(labeled_rect("a", 50, 60, 200, 70, "#a5d8ff", "#4a9eed", "Step One"))
elements.extend(labeled_rect("b", 350, 60, 200, 70, "#b2f2bb", "#22c55e", "Step Two"))
elements.append(bound_arrow("a1", elements, "a", [1, 0.5], "b", [0, 0.5]))
write_scene(elements, "/path/to/output.excalidraw")
PYEOFFor shapes without the labeled_rect convenience, pair rect(..., bound_text="tid") with txt(..., container="rid", align="center", valign="middle").
Arrow anchoring
By default, arrows float free - moving a shape leaves the arrow behind. Use bound_arrow instead of arrow to anchor arrows to shapes. It handles the bidirectional binding automatically (arrow references shapes, shapes list the arrow in boundElements).
fixedPoint values for connection points on shapes: top=[0.5, 0], right=[1, 0.5], bottom=[0.5, 1], left=[0, 0.5]. Any [fx, fy] value works where 0,0 is the shape's top-left corner and 1,1 is bottom-right.
Important:
- Shapes must already exist in
elementsbefore callingbound_arrow, since it looks them up and mutates theirboundElements. - Minimum 60px between connected shapes. Excalidraw recalculates bound arrow geometry at render time. When shapes are too close together (under ~60px gap), arrows overlap and pass through boxes instead of connecting at edges. The script warns if this threshold is violated. Plan layouts with adequate spacing.
- Avoid large background rectangles that overlap connectable shapes. Excalidraw's binding resolution can misfire when a bound arrow's endpoint falls inside a background rect that overlaps the intended target shape. If you need section backgrounds, add them after all bound arrows, or use standalone text labels and colour-coded boxes instead.
For the inline create_view workflow, use startBinding/endBinding with fixedPoint directly on arrow elements.
Privacy
Note that if the diagram contains potentially sensitive information (e.g. detailed network diagrams, identifiable information etc...) and the user asks you to upload the diagram to excalidraw.com - you should first warn them that this will make the diagram publicly accessible and ask if they want to proceed.
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- rbrown101010/codex-marketing-skills★ 95same name
- rbrown101010/Rileys-Top-Skills★ 9same name
- shaharsha/claude-skills★ 5same name
- adtn0810/truestack★ 2same name
- alemdarlabs/sage-unreal-mcp★ 2same name
- shreyas-makes/agent-skills★ 2same name
- elad-cohen-dev/claude-skills★ 0same name
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 repository71 other files it gives its agents.
- Rules/CLAUDE.mdCLAUDE.md
- Skills/ambitious-model-use/CLAUDE.mdCLAUDE.md
- Skills/authoring-claude-md/CLAUDE.mdCLAUDE.md
- Skills/bento-slides/CLAUDE.mdCLAUDE.md
- Skills/extract-wisdom/CLAUDE.mdCLAUDE.md
- Skills/ghostty-config/CLAUDE.mdCLAUDE.md
- Skills/llm-wiki/CLAUDE.mdCLAUDE.md
- Skills/llm-wiki/examples/CLAUDE.mdCLAUDE.md
- Skills/openspec-bootstrap/CLAUDE.mdCLAUDE.md
- Skills/openspeccer/CLAUDE.mdCLAUDE.md
- Skills/rewrite-slop/CLAUDE.mdCLAUDE.md
- Skills/skill-creator-primer/CLAUDE.mdCLAUDE.md
- Skills/yue2-music/CLAUDE.mdCLAUDE.md
- ai-changelogSkill
- ambitious-model-useSkill
- analyse-designSkill
- apply-mantel-stylesSkill
- authoring-claude-mdSkill
- backlogSkill
- bento-slidesSkill
- code-reviewSkill
- code-simplificationSkill
- creating-development-plansSkill
- critical-thinking-logical-reasoningSkill
- deeperSkill
- deferred-task-executionSkill
- demo-recorderSkill
- explainSkill
- extract-wisdomSkill
- find-docsSkill
- ghostty-configSkill
- githubSkill
- golang-developmentSkill
- graphifySkill
- grill-meSkill
- guided-demoSkill
- handoffSkill
- hardware-designSkill
- herdrSkill
- home-assistantSkill
- html-design-examplesSkill
- improve-codebase-architectureSkill
- json-schema-lookupSkill
- liteparseSkill
- llm-prompting-guideSkill
- ml-llm-wikiSkill
- llm-wikiSkill
- mermaid-diagramsSkill
- openspec-bootstrapSkill
- openspeccerSkill
- pptx-to-mdSkill
- prompt-enhancerSkill
- prototypeSkill
- python-developmentSkill
- raspberry-pi-pico2Skill
- release-debriefSkill
- retroSkill
- rewrite-slopSkill
- rexSkill
- rust-developmentSkill
- The first 60 shown.
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.

