
excalidraw-diagrams
Use when asked to create or update Excalidraw diagrams. Provides guidance on Excalidraw best practices.
- Installs
- 111
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/sammcj/agentic-coding --skill excalidraw-diagrams- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads excalidraw-diagrams automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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")
PYEOF
For 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.
FAQ
What does the excalidraw-diagrams skill do?
Use when asked to create or update Excalidraw diagrams. Provides guidance on Excalidraw best practices.
How do I install excalidraw-diagrams?
Run npx skills add https://github.com/sammcj/agentic-coding --skill excalidraw-diagrams in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/excalidraw-diagrams/ (personal) or .claude/skills/excalidraw-diagrams/ (project).
Which AI agents can use excalidraw-diagrams?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is excalidraw-diagrams safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains excalidraw-diagrams?
It is published by sammcj in sammcj/agentic-coding. It has 111 recorded installs.
More from sammcj/agentic-coding
critical-thinking-logical-reasoning
sammcj/agentic-coding
Critically analyse the reasoning in written content (articles, blogs, transcripts, reports), not code. Use only when explicitly asked to critically analyse or critique an argument.
writing-documentation-with-diataxis
sammcj/agentic-coding
Applies the Diataxis framework to create or improve technical documentation. Use when being asked to write high quality tutorials, how-to guides, reference docs, or explanations, when reviewing documentation quality, or when deciding what type of documentation to create. Helps identify documentation types using the action/cognition and acquisition/application dimensions.
creating-development-plans
sammcj/agentic-coding
Creates structured development plans with phased task breakdowns, requirements, and QA checklists. Use when the user explicitly asks to create a dev plan, development plan, or document development requirements.
ghostty-config
sammcj/agentic-coding
Open the skill to read its SKILL.md instructions.
code-simplification
sammcj/agentic-coding
Open the skill to read its SKILL.md instructions.
prompt-enhancer
sammcj/agentic-coding
Open the skill to read its SKILL.md instructions.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available