# tldraw Canvas Scripting

Drive offline tldraw canvases from an agent through scripts.

- Repository: https://github.com/NousResearch/hermes-agent (259479 stars)
- Category: Design
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add NousResearch/hermes-agent --skill tldraw-offline -g -a claude-code -y`
Codex: `npx skills add NousResearch/hermes-agent --skill tldraw-offline -g -a codex -y`
Cursor: `npx skills add NousResearch/hermes-agent --skill tldraw-offline -g -a cursor -y`
Gemini CLI: `npx skills add NousResearch/hermes-agent --skill tldraw-offline -g -a gemini-cli -y`

## Description

Drive and script tldraw offline canvases with an agent.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# tldraw offline Skill

Work with the tldraw offline desktop app (offline.tldraw.com): read the open
canvas, make edits, and write **document scripts**, JavaScript embedded in a
`.tldraw` file that runs on load and gives the file durable behavior. The app
runs a **local HTTP API** (default `localhost:7236`) that a coding agent drives
with plain `curl` from its terminal, this is exactly how the app's own homepage
demo (Codex editing a canvas live) works. The agent does NOT use computer-use /
GUI clicking, and does NOT hand-edit the `.tldraw` file directly. Keep tldraw
offline open while you work.

## When to Use

- The user has tldraw offline open and asks you to build or modify a canvas
  (diagrams, wireframes, layouts).
- You want to add durable behavior to a drawing (reactive shapes, interactive
  buttons, animation, connection logic) via an embedded document script.

Do NOT hand-place shapes to imitate a drawing, write the code that generates
them. Agents are far better at scripting the canvas than at drawing on it.

## Prerequisites

The rest: https://github.com/NousResearch/hermes-agent/blob/HEAD/optional-skills/creative/tldraw-offline/SKILL.md
