Excalidraw Automate library file (not only) for LLM training

Download the latest Excalidraw AI training file from GitHub. This file includes several inputs:

  • The ExcalidrawAutomate library with documentation
  • Relevant type definitions from the Plugin, from the Excalidraw component, and from Obsidian’s type defintions
  • The source code and documentation of all of the ExcalidrawAutomate scripts available in the plugin
  • The template ExcalidrawStartup script, and a sample implementation of the ExcalidrawStartup script

Because this file is large, I recommend using Google’s Gemini (aka. AI Studio) for generating code using this training file.

The process is very simple.

  • Download the training file
  • Open Gemini
  • Copy/Paste the contents of the training file (don’t just attach the file, but open it in a text editor and copy the contents to the prompt, attaching a file behaves different in the context window of the chatbot)
  • Run the prompt
  • Gemini will respond “I’m Ready”
  • Describe the script or automation you need
  • Copy the resulting script to Excalidraw/Scripts/Your New Script.md or to where ever you’ve defined your SCRIPT folder, and run the script in Excalidraw using the Obsidian Command Panel (CTRL/CMD+P and type in the title of your script)

Link to video on youtube
Link to video transcript

For more information about Excalidraw scripting visit my playlist on YouTube

Hi Zsolt,

since publishing the video, the training file has grown quite a bit, right? When pasting it in AI Studio it shows me 500k tokens used right away. With two prompts and a short script I already seem to reach the overall token limit - even with Gemini 3. Do you have any idea how to work around that issue? Can you think of parts of the library that are not essential to the training and could be left out?

Thanks for your input :slight_smile:

Robert

ps: I desperately NEED that layer manager :smiley:

The single biggest chunk of code that could be deleted from the training file is the MindMap Builder Source code. You can manually remove that from the training file, though then you lose the example implementation for using the new side panel API.

I use https://aistudio.goole.com, there you have 1M token context with Gemini 3 and with 3.1.

To remove MindMap Builder open a text editor and delete the section between

<!-- Source: ea-scripts/Mindmap Builder.js -->

and

<!-- Source: ea-scripts/Mindmap connector.md -->

If you find the time, I’d welcome collaboration on the training file generation script. Should be converted into a collection of skills for better agent efficiency.

1 Like

Okay, I’m going to try with the reduced file first. When the proof of concept is done, I’ll think about adding the sidepanel – would definitely make sense for scripts like the layer manager.

Also, I am going to check Google AI Studio again. I looked like it cut the output at about 513k tokens but that could’ve been an error rather than a general limitation.

I will have a look at the generating script and let you know in case a clever thought crosses my mind :slight_smile:

Thanks!

1 Like