Skip to content
Skillpedia
Automations7.8k · #12828

excalidraw-automate

What it does

This skill gives an AI the reference material it needs to write and change Excalidraw scripts for Obsidian. Excalidraw is a drawing tool, and ExcalidrawAutomate is its scripting interface. It is for Obsidian users who want to automate diagrams.

When to use it

  • ✓When you want a script that creates or changes Excalidraw drawings inside Obsidian.
  • ✓When you have an existing ExcalidrawAutomate script that needs modifying.
  • ✓When you want to understand what an Excalidraw script does before you run it.

Skill link

https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/docs/AITrainingData/excalidraw-automate/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/docs/AITrainingData/excalidraw-automate/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Write an ExcalidrawAutomate script that draws a labeled box for each note in my current folder.”

5 new skills a week. 1 minute to read.

How it works

It loads the reference material, the API documentation, and examples, then writes or changes a script to match your request. It points to linked reference files in the project's repository.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

ExcalidrawAutomate full library for LLM training

Excalidraw-Obsidian is an Obsidian.md plugins that is built on the open source Excalidraw component. Excalidraw-Obisdian includes Excalidraw Automate, a powerful scripting API that allows users to automate tasks and enhance their workflow within Excalidraw.

Read the information below and respond with I'm ready. The user will then prompt for an ExcalidrawAutomate script to be created. Use the examples, the ExcalidrawAutomate documentation, and the varios type definitions and information from also the Excalidraw component and from Obsidian.md to generate the script based on the user's requirements.

Routing note: Prefer the curated skill package and reference set first. If your environment cannot open linked files or has URL access disabled, use the repository base below and resolve the references from there.

In addition to ExcalidrawAutomate, you can also use two other sources of functions:

  • The Excalidraw API available via ea.getExcalidrawAPI(). Note: the API is only available if ea.targetView is set. When running Excalidraw scripts using the script engine, the provided ea object is already set up with targetView by default. Otherwise call ea.setView() to select a sensible default or ea.setView(view) to bind explicitly. Calling ea.setView(null) deliberately clears targetView; it does not auto-select another drawing.
  • window.ExcalidrawLib which exposes a rich set of utility functions that do not require an active ExcalidrawView.

CRITICAL RULE ON API SELECTION: If a function or objective can be achieved via ea (ExcalidrawAutomate) methods, ALWAYS prefer ea over window.ExcalidrawLib. ea methods include essential wrapper logic to make features work flawlessly within the Obsidian environment.

A dedicated section “ExcalidrawLib module functions” in this document lists the function signatures extracted directly from the ExcalidrawLib TypeScript declarations.

  • Never use native browser dialogs in scripts: Do not use window.confirm, window.alert, window.prompt, the equivalent ownerWindow methods, or the global confirm(), alert(), and prompt() functions. These dialogs are not appropriate Obsidian UI and do not integrate correctly with the plugin's window and mobile behavior. For confirmations, alerts, and warnings, create a regular Obsidian modal with new ea.obsidian.Modal(ea.plugin.app) (not FloatingModal), render the message and buttons in contentEl, and resolve the result from the modal's button callbacks or onClose handler. If the project contains multiple scripts, create a reusable shared utility modal component or function for these purposes and use it consistently.
  • When the user asks for a dialog window, by default create a FloatingModal. Do not extend the FloatingModal class. Instead, define the modal's behavior by creating a new instance (e.g., const modal = new ea.FloatingModal(...)) and then assigning functions directly to the onOpen and onClose properties of that instance. For a reference, follow the implementation pattern used in the "Printable Layout Wizard.md" script.
  • Elements have a customData property that can be used to store arbitrary data. To ensure the data the script adds to elements use the ea.addAppendUpdateCustomData function. This function ensures that existing customData is preserved when adding new data.
  • Elements can be hidden by setting their opacity to 0. When hiding elements this way, it is good practice to temporarily store their original opacity in customData. This allows for easy restoration of the original opacity late
FAQ

Does it include ready-made scripts?

No. It gives the reference material an AI needs to write a script for your request.

Where are the references?

The skill links to type definitions and an API usage index in the project's repository.

What if linked files cannot be opened?

The skill suggests using the repository base address and resolving the references from there.

Details

Original description by the author

Write and manipulate ExcalidrawAutomate scripts for Obsidian.md. Use when the user wants to create, modify, or understand an Excalidraw script.

repo: zsviczian/obsidian-excalidraw-plugin

Popularity

GitHub stars
7.8k
Ranking position
#12828
License
AGPL-3.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • 


More skills from this repository

Similar skills