tldraw-offline
Qué hace
Hace que tu agente lea y cambie un lienzo en la app de escritorio sin conexión de tldraw a través de su interfaz local. Es para personas que quieren diagramas, wireframes o lienzos interactivos construidos por un agente.
Cuándo usarla
- ✓Cuando tienes tldraw sin conexión abierto y quieres un diagrama o un wireframe construido.
- ✓Cuando quieres que un dibujo tenga un comportamiento interactivo, como botones o animación.
- ✓Cuando quieres una disposición del lienzo generada por código en lugar de dibujada a mano.
Link de la skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/creative/tldraw-offline/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Con tldraw sin conexión abierto, construye un wireframe de nuestro flujo de inicio de sesión en el lienzo.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente envía comandos a la interfaz local de la app en tu ordenador, normalmente con curl. Escribe las formas mediante código y puede incrustar un script que se ejecuta al cargar el archivo.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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
- tldraw offline installed and running, with a document open. Releases:
https://github.com/tldraw/tldraw-offline/releases/latest (macOS DMG, Windows
x64/Arm64, Linux
x86_64/arm64AppImage or amd64/arm64.deb). - Agent skills installed in the app:
Develop → Install Agent Skills. The app writes its own tldraw skill into~/.codex/skills/,~/.claude/skills/,~/.cursor/skills/, and~/.gemini/skills/— teaching that agent thecurlrecipes below. (This Hermes skill mirrors that guidance for Hermes.) - The local control API. On launch the app writes
server.jsonto its config dir (Linux~/.config/tldraw/, macOS~/Library/Application Support/tldraw/, Windows%APPDATA%\tldraw\) withport(default7236), a bearertoken,pid, andstartedAt. Every request exceptGET /needsAuthorization: Bearer <token>. A clean quit removesserver.json; if it's present but the port doesn't answer, the app quit uncleanly — treat as not running. - Re-read port + token on EVERY shell call. Each terminal call is a fresh
shell, so an
exported token does not persist — "export once and reuse" sends an empty token and 401s. Read both inline at the top of each call:PORT=$(jq -r .port <server.json>); TOKEN=$(jq -r .token <server.json>). - No account or network needed for local editing.
How to Run
Two distinct workflows. Pick by whether the change must survive a reload.
A. One-off canvas edits (/exec) — layout, generating shapes, cleanup. This
is a live edit, not saved script:
BASE=http://localhost:7236
TOKEN=$(python -c "import json;print(json.load(open('$HOME/.config/tldraw/server.json'))['token'])")
# find the focused document id
DOC=$(curl -s "$BASE/api/search" -X POST -H 'content-type: application/json' \
-H "Authorization: Bearer $TOKEN" \
-d '{"code":"return (await api.getFocusedDoc()).id"}' | python -c "import sys,json;print(json.load(sys.stdin)['result'])")
# run code with the live `editor` + `helpers` in scope
curl -s "$BASE/api/doc/$DOC/exec" -X POST -H 'content-type: application/json' \
-H "Authorization: Bearer $TOKEN" \
-d '{"code":"const {createShapeId,toRichText}=await import(\"tldraw\"); editor.createShape({id:createShapeId(),type:\"geo\",x:0,y:0,props:{geo:\"rectangle\",w:200,h:100,color:\"blue\",fill:\"solid\",richText:toRichText(\"hello\")}}); return editor.getCurrentPageShapes().length"}'
B. Durable behavior (script/main.js) — reactive/interactive logic that must
survive reload. Edit the file on disk; the app's watcher applies it:
# get the live script file path for the doc
curl -s "$BASE/api/doc/$DOC/script-workspace" -X POST \
-H "Authorization: Bearer $TOKEN" # -> result.mainJsPath, result.isDefaultScript
# edit result.mainJsPath with read_file / patch / write_file (see scripts/main.js)
# then confirm the watcher applied it:
curl -s "$BASE/api/doc/$DOC/script-status" -H "Authorization: Bearer $TOKEN"
The ready-to-adapt document script is scripts/main.js.
Quick Reference
The document-script contract (verified against the app's bundled
script-context.d.ts):
import { createShapeId, toRichText } from 'tldraw' // primitives: import, not globals
export default function ({ editor, helpers, signal }) {
editor.run(() => { // batch = one undo step
helpers.createShapeIfMissing({ //
Preguntas frecuentes
¿Tiene que estar abierta la app?
Sí. La skill indica mantener tldraw sin conexión abierto mientras trabaja el agente.
¿El agente edita el archivo directamente?
No. La skill indica que no modifica a mano el archivo .tldraw y que no usa control de la pantalla con clics.
¿Dónde consigo la app?
La skill remite a la página de versiones de tldraw sin conexión en GitHub, que tiene compilaciones para macOS, Windows y Linux.
Detalles
Descripción original del autor
Drive and script tldraw offline canvases with an agent.
Popularidad
- Estrellas en GitHub
- 260 mil
- Posición en el ranking
- #479
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
agent-merge-conflict-arbiter
260 milResuelve un conflicto de fusión de git entre las ramas de dos agentes como tercera parte neutral, produciendo un único resultado fusionado para el repositorio.
antigravity-cli
260 milTe guía para instalar, actualizar y resolver problemas con la herramienta de línea de comandos Antigravity, incluidos sus plugins, el inicio de sesión y el entorno aislado.
blackbox
260 milPermite que tu agente entregue una tarea de programación a la herramienta de línea de comandos Blackbox AI, que ejecuta varios modelos de IA y elige el mejor resultado.
dynamic-workflow
260 milEnseña a tu agente a ejecutar grandes lotes de trabajo similar como un script guardado, de modo que solo los resultados verificados vuelvan a la conversación principal.
Skills parecidas
canvas
394 milPermite que tu agente muestre un widget visual alojado en un panel de Mac conectado y después ocultar el panel o moverlo a otra página.
control-ui
394 milAyuda a tu agente a organizar y resolver problemas de la interfaz de control de OpenClaw, incluidas las sesiones, los paneles y las Gateways conectadas.
diagram-maker
394 milAyuda a tu agente a crear diagramas claros en SVG, HTML o Excalidraw editable para procesos, arquitectura de sistemas y bocetos de pizarra.