/excalidraw:excalidrawfrom excalidraw
Draws and iterates on Excalidraw diagrams inside an Obsidian vault, verifying results via screenshots. Use for process diagrams, sketches, or any visual request.
Ships in excalidraw. 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.
You write a short JavaScript file that uses the Excalidraw plugin's drawing commands (ea). The helper draw.mjs (in this skill's folder) runs it inside Obsidian, opens the drawing and takes a screenshot. You look at the screenshot and fix what is wrong.
obsidian) must be turned on: Settings → General → Command line interface.obsidian eval code="typeof ExcalidrawAutomate" must print => object.foldername: the plugin then uses the user's own drawing folder.drawing.js) in a scratch folder, not in the vault.node <this skill's folder>/draw.mjs drawing.js. It uses the vault that is open in front and prints its name, the path of the new drawing and the path of the screenshot. If that is the wrong vault, ask the user to bring the right one to the front.drawing.js. Before running again, delete the drawing your last run made (only that one, never a drawing you did not create): obsidian vault="<vault>" delete path="<drawing path>".Write plain lines of JavaScript, with no function around them. ea is ready to use, and await works. The last line creates the drawing and returns its path.
ea.style.fontFamily = 5; // hand-drawn font
ea.style.fillStyle = "solid";
ea.style.roundness = { type: 3 }; // rounded corners
ea.style.backgroundColor = "#a5d8ff";
const a = ea.addText(0, 0, "Idea", { box: "box", textAlign: "center", textVerticalAlign: "middle" });
ea.style.backgroundColor = "#b2f2bb";
const b = ea.addText(250, 0, "Done", { box: "box", textAlign: "center", textVerticalAlign: "middle" });
ea.style.backgroundColor = "transparent";
ea.connectObjects(a, "right", b, "left", { endArrowHead: "arrow" });
return ea.create({ filename: "my-drawing", silent: true }); // add foldername: "..." to pick a folder
| Call | What it does |
|---|---|
ea.style.strokeColor, .backgroundColor, .fontSize, .strokeStyle ("dashed"), .strokeWidth | Style for the next shapes you add |
ea.addRect(x, y, w, h), ea.addEllipse(...), ea.addDiamond(...) | Shapes. Return the shape's id |
ea.addText(x, y, text, { box: "box", width, textAlign }) | Text, optionally inside a box. With a box it returns the box's id |
ea.connectObjects(idA, "right", idB, "left", { endArrowHead: "arrow" }) | Arrow that stays attached to both shapes |
ea.addArrow([[x1, y1], [x2, y2], ...], { endArrowHead: "arrow", startObjectId, endObjectId }) | Arrow with bends, e.g. a loop back |
ea.addLine([[x1, y1], ...]) | Line or outline |
ea.measureText(text) | Width and height of text at the current font size |
ea.addToGroup([ids]) | Group shapes so they move together |
box, width is the width of the text. The box grows by the padding on each side, so leave room between boxes.ea.getElement(id).polygon = true.ea.create never replaces a file. If the name is taken, it adds a number (my-drawing_0). Check the path the helper prints: if it has a number you did not choose, the name belongs to another drawing. Pick a new name; do not delete that drawing.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub pandysp/claude-plugins --plugin excalidraw