tldraw-offline
O que ela faz
Faz seu agente ler e alterar uma tela no aplicativo tldraw offline, para computador, pela interface local dele. É indicado para quem quer diagramas, wireframes ou telas interativas criados por um agente.
Quando usar
- ✓Quando você tem o tldraw offline aberto e quer um diagrama ou wireframe criado.
- ✓Quando quer que um desenho tenha comportamento interativo, como botões ou animação.
- ✓Quando quer um layout de tela gerado por código, e não desenhado à mão.
Link da skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/creative/tldraw-offline/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Com o tldraw offline aberto, monte um wireframe do nosso fluxo de login na tela.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente envia comandos para a interface local do aplicativo no seu computador, normalmente com curl. Ele escreve as formas por código e pode incorporar um script que roda quando o arquivo é carregado.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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({ //
Perguntas frequentes
O aplicativo precisa estar aberto?
Sim. A skill diz para manter o tldraw offline aberto enquanto o agente trabalha.
O agente edita o arquivo diretamente?
Não. A skill diz que ele não edita o arquivo .tldraw à mão e não usa cliques na tela.
Onde consigo o aplicativo?
A skill aponta para a página de versões do tldraw offline no GitHub, que tem builds para macOS, Windows e Linux.
Detalhes
Descrição original do autor
Drive and script tldraw offline canvases with an agent.
Popularidade
- Estrelas no GitHub
- 260 mil
- Posição no ranking
- #479
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
agent-merge-conflict-arbiter
260 milResolve um conflito de merge no git entre as branches de dois agentes como terceiro neutro, produzindo um único resultado unificado para o repositório.
antigravity-cli
260 milOrienta você na instalação, atualização e solução de problemas da ferramenta de linha de comando Antigravity, incluindo plugins, login e sandbox.
blackbox
260 milPermite que seu agente entregue uma tarefa de programação para a ferramenta de linha de comando Blackbox AI, que roda vários modelos de IA e escolhe o melhor resultado.
dynamic-workflow
260 milEnsina seu agente a rodar grandes lotes de trabalhos semelhantes como um script salvo, de modo que só resultados verificados voltem para a conversa principal.
Skills parecidas
canvas
394 milPermite que seu agente mostre um widget visual hospedado em um painel conectado a um Mac e depois oculte o painel ou o mova para outra página.
control-ui
394 milAjuda seu agente a organizar e diagnosticar a Control UI do OpenClaw, incluindo sessões, painéis e Gateways conectados.
diagram-maker
394 milAjuda seu agente a criar diagramas claros em SVG, HTML ou Excalidraw editável, para processos, arquitetura de sistemas e esboços de quadro branco.