tldraw-offline
Fungsinya
Skill ini meminta agent Anda membaca dan mengubah kanvas di aplikasi desktop tldraw offline melalui antarmuka lokalnya. Skill ini ditujukan bagi orang yang menginginkan diagram, wireframe, atau kanvas interaktif yang dibangun oleh agent.
Kapan dipakai
- βSaat tldraw offline sedang terbuka dan Anda ingin diagram atau wireframe dibangun.
- βKetika Anda menginginkan gambar yang memiliki perilaku interaktif seperti tombol atau animasi.
- βKetika Anda menginginkan tata letak kanvas yang dihasilkan oleh kode, bukan digambar tangan.
Link skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/creative/tldraw-offline/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βDengan tldraw offline terbuka, bangun wireframe alur login kami di kanvas.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengirim perintah ke antarmuka lokal aplikasi di komputer Anda, biasanya dengan curl. Agent menulis bentuk melalui kode dan dapat menyisipkan skrip yang berjalan saat file dimuat.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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({ //
Pertanyaan umum
Apakah aplikasinya harus terbuka?
Ya. Skill menyatakan tldraw offline harus tetap terbuka selama agent bekerja.
Apakah agent mengedit file secara langsung?
Tidak. Skill menyatakan agent tidak mengedit file .tldraw secara manual dan tidak memakai klik layar.
Di mana saya mendapatkan aplikasinya?
Skill mengarah ke halaman rilis tldraw offline di GitHub, yang memiliki build untuk macOS, Windows, dan Linux.
Detail
Deskripsi asli dari pembuat
Drive and script tldraw offline canvases with an agent.
Popularitas
- Bintang GitHub
- 260k
- Peringkat
- #479
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
agent-merge-conflict-arbiter
260kMenyelesaikan konflik merge git antara cabang dua agent sebagai pihak ketiga yang netral, menghasilkan satu hasil gabungan untuk repo.
antigravity-cli
260kMemandu Anda memasang, memperbarui, dan memecahkan masalah alat baris perintah Antigravity, termasuk plugin, login, dan sandbox-nya.
blackbox
260kMemungkinkan agent Anda menyerahkan tugas pemrograman ke alat baris perintah Blackbox AI, yang menjalankan beberapa model AI dan memilih hasil terbaik.
dynamic-workflow
260kMengajari agent Anda menjalankan pekerjaan sejenis dalam jumlah besar sebagai skrip tersimpan, sehingga hanya hasil terverifikasi yang kembali ke percakapan utama.
Skill serupa
canvas
394kMemungkinkan agent Anda menampilkan widget visual yang di-hosting di panel Mac yang terhubung, lalu menyembunyikan panel atau memindahkannya ke halaman lain.
control-ui
394kMembantu agent Anda mengatur dan memecahkan masalah OpenClaw Control UI, termasuk sesi, dasbor, dan Gateway yang terhubung.
diagram-maker
394kMembantu agent Anda membuat diagram yang jelas sebagai SVG, HTML, atau Excalidraw yang dapat diedit untuk proses, arsitektur sistem, dan sketsa papan tulis.