agentsclimarketplace

Obsidian excalidraw

Skill kev-hu/ai-toolkit/skills/obsidian-excalidraw

AI tools, hooks, skills, and prompts I actually use day to day — each with a what/why/how write-up

Install
npx -y skills add kev-hu/ai-toolkit --skill obsidian-excalidraw

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Draw and modify Excalidraw diagrams inside an open Obsidian vault by creating elements via the ExcalidrawAutomate API and invoking Downloaded scripts. Use when the user wants to create diagrams, concept graphics, mindmaps, sketches, visual metaphors, or annotate existing Excalidraw drawings through conversation — especially for YouTube AI-education visuals. Triggers on "draw", "diagram", "sketch", "visualize", "graphic", "metaphor", "mindmap", "concept art", or modifying an open `.excalidraw` file.

SKILL.md

6.8 KB, as published. Nobody here has run it

obsidian-excalidraw

Draw into live Obsidian Excalidraw files by chatting, via obsidian CLI + ExcalidrawAutomate (ea) API.

Prerequisite: Obsidian running with the Excalidraw plugin loaded.

Principles

  1. ea API is source of truth. No direct JSON edits, no standalone renderer — everything happens in the open vault.
  2. Visual verification is mandatory. Ship nothing you haven't inspected element-by-element.
  3. Archetypes, palettes, and sizes are starting scaffolds — not a cage. Hybridize or invent when the material calls for it. Make it tasteful; the rules below are the floor, not the ceiling.

Hard Rules

Deviation produces silent failures.

  1. Never write .excalidraw JSON directly for authoring — use the ea API. (Clobbers live view, races with Obsidian's save, loses undo.)
  2. Target drawings by path, not basename — e.g. Excalidraw/foo.excalidraw.md.
  3. Always call await ea.addElementsToView(false, true) with save=true. (Otherwise: renders but doesn't persist; next Cmd+Z wipes it.)
  4. Reset ea.style between differently-styled elements. ea.style is shared mutable state — any property you ever set per-element must also be in the reset helper, or it sticks. (See LESSONS: strokeStyle bleed.)
  5. Visually verify before declaring done. Read the sidecar PNG at <drawing-path>.excalidraw.png (plugin writes it on save); fall back to obsidian dev:screenshot /tmp/check.png only if no sidecar. Inspect element-by-element, not overall vibe — check each for: alignment (grid-snapped, same-axis elements share coords), overflow (text fits container; use Virgil width formula), style bleed (no unintended dashed/colored leaks), font-size minimums (26pt+ for secondary labels on YouTube), container fit (no wrap past text-height cap). Cap at 3 verify-fix cycles — if issues remain after 3, flag to the user rather than looping.
  6. For any drawing above ~5 primitives, propose plan in plain English first, wait for confirmation, then execute. Skip for SKETCH.
  7. Before invoking any Downloaded script, check its classification in SCRIPTS.md. Selection-only scripts fail silently without a selection (use Pattern 2 to select first). Hard-interactive scripts (in_scope: no) block on a modal and return false success — ask the user to run them manually or fall back to ea primitives.

Archetype menu

Pick the archetype whose triggers match. Default: DIAGRAM. Archetypes are scaffolds, not a cage — hybridize freely, or compose primitives directly when nothing fits. The ea API is complete; don't wait for permission to invent.

ArchetypeTriggersLoad
DIAGRAMdiagram, architecture, system, flow, pipelinereferences/archetypes/diagram.md
LAYERED-ARCHITECTUREenterprise architecture, layered, n-tier, trust zone, service architecture, system topology, tenant architecture, cloud architecturereferences/archetypes/layered-architecture.md
METAPHORmetaphor, visualize X as Y, concept art, thumbnailreferences/archetypes/metaphor.md
CHARTchart, graph, plot, data viz, histogramreferences/archetypes/chart.md
MINDMAPmindmap, brainstorm, radial, concept mapreferences/archetypes/mindmap.md
COMPARISONvs, compare, before/afterreferences/archetypes/comparison.md
FRAMEWORK2x2, quadrant, matrix, decision treereferences/archetypes/framework.md
SKETCHsketch, rough, just, quick, draftreferences/archetypes/sketch.md
ANNOTATIONannotate, mark up, add to, labelreferences/archetypes/annotation.md

Commands cheat sheet

Simple ops use obsidian CLI directly. (For broader CLI usage, see obsidian-cli skill.)

PurposeCommand
Create new drawing at known path + draw into itPattern 0 in references/eval-templates.md
Run a JS payload >2KBscripts/obsidian-draw <file.js> [--target <path> --create]
Read saved drawing PNG (preferred)Read <drawing-path>.excalidraw.png
Screenshot active view (fallback)obsidian dev:screenshot /tmp/check.png
Run Downloaded script (no selection needed)obsidian command id="obsidian-excalidraw-plugin:Downloaded/<Script Name>"
List drawings in vaultobsidian files folder=Excalidraw ext=md
Get active Excalidraw file pathobsidian eval code="app.workspace.getLeavesOfType('excalidraw').map(l => l.view.file?.path)" — not activeLeaf (that's often the terminal pane)

For inline JS, use an obsidian eval block — see references/eval-templates.md. For anything over a couple of KB, write the JS to a file and run it via scripts/obsidian-draw to skip the shell-quoting + readFileSync boilerplate. Don't use excalidraw-autocreate for scripted flows; Pattern 0 replaces it.

Eval patterns

Three copy-adapt templates in references/eval-templates.md:

  1. Draw primitives — add new elements via ea.add*. Most common.
  2. Select + invoke script — programmatic selection then run a script.
  3. Query state — read current elements.

Load the template file when writing an eval block. Don't write one from memory.

Progressive disclosure

When to loadFile
Start of every sessionLESSONS.md
Before writing any ea.* codereferences/EA_API.md
Before invoking any Downloaded scriptreferences/SCRIPTS.md
Before writing any obsidian eval blockreferences/eval-templates.md
Before any drawing with 3+ aligned elementsreferences/layout-helpers.js (require + use; eliminates coordinate math + style-reset boilerplate)
Archetype matching user's triggersreferences/archetypes/<name>.md
User's idea maps cleanly to a flywheel / 3-step / 3-col comparison / 4-frame storyboard / grid backdropreferences/templates.md
Adding cloud-service icons (Azure / AWS / etc.) to a diagramreferences/icons/manifest.json (logical name → file path; use H.serviceIcon(name, {x,y,size}) from layout-helpers)
User wants PNG/SVG outputreferences/export.md

Scope boundaries

In scope: create/modify drawings in open vault; 21 of 33 Downloaded scripts; PNG/SVG export; screenshot-verify loop.

Out of scope: offline .excalidraw JSON (that's excalidraw-diagram); cross-vault; multiplayer; mouse-event-reactive; plugin install/config; 12 hard-interactive scripts (see SCRIPTS.md).

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.