Creative

Tldraw

Read, create, and edit tldraw.tldr canvas files deterministically — sketch hand-drawn-register diagrams (boxes, arrows, sticky notes, frames, text) directly into a canvas file the user opens in any tldraw surface, and read a rough canvas back as structured data to organize it

02
Workflows
01
Tool
00
References
12
Triggers

Key Points

Not for polished static images, infographics, or mermaid diagrams (use Art), web UI design (use Webdesign), programmatic video (use Remotion)

Inside the Skill

The thinking, frameworks, and architecture that distinguish this skill from a generic version of the same task.

Quick Reference

  • Tool: bun ~/.claude/skills/Tldraw/Tools/Tldr.ts <create|inspect|add|remove|move|settext|validate> <file.tldr> [flags]
  • Record shapes, spec format, coordinate conventions: References/TldrFormat.md
  • Vendored schema (tldraw 5.2.5): References/SchemaSnapshot.json

Examples

Example 1: Diagram for a post

User: "Sketch the three-stage pipeline as a hand-drawn diagram"
→ Invokes SketchDiagram workflow
→ Writes spec JSON, runs Tldr.ts create + add, validates
→ Returns the.tldr path and how to open it; user nudges shapes and exports

Example 2: Organize an ideation canvas

User: "I dumped ideas on my canvas — structure them"
→ Invokes StructureCanvas workflow
→ Tldr.ts inspect --json reads every shape's text and position
→ Clusters related items, adds frames + arrows, moves shapes into groups
→ User reopens the same file and sees the organized version

Gotchas

  • zsh echo mangles spec JSON — it expands \n inside strings into real newlines, breaking JSON. Write the spec to a file (or use printf '%s') and pass --spec <file>; the tool also accepts --spec - on stdin, but only feed it from something that doesn't reinterpret escapes.
  • Text is richText, never a plain string — labels on geo/text/note/arrow shapes are ProseMirror doc JSON ({"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"..."}]}]}). A bare string prop is rejected by tldraw's validator. Tldr.ts builds this for you; never hand-write a text prop.
  • Arrow bindings require terminal: "start"|"end" — tldraw's own ArrowBindingUtil.getDefaultProps() omits it, but the schema validator rejects a binding without it (verified against tldraw 5.2.5). The tool sets it; if you hand-edit bindings, keep it.
  • Raw records need every prop — records written to the file bypass editor defaulting, so a missing prop (e.g. growY on geo) fails validation on load. Always go through Tldr.ts add; don't append hand-rolled records.
  • Fractional index strings order shapesindex values (a1, a2, …) are base62 lexicographic and must never end in 0. The tool generates them; duplicates cause z-order glitches in the editor.
  • The desktop-app .tldraw format is a different thing — the tldraw desktop app's native save is a zip (sqlite + assets + scripts), not this JSON. This skill targets portable .tldr JSON, which the web editor, the VS Code extension, and the desktop app can all open/import.
  • Editors hold files in memory — if the user has the canvas open while you edit it on disk, their surface may not reload (or may overwrite your change on save). Edit while closed, or tell the user to reopen after your write.

Opening a canvas

  • VS Code / Cursor: the official tldraw extension opens .tldr files in-editor — fully local, right choice for private content.
  • tldraw.com: File → Open. Content goes to a third-party web app — only for content already public-destined.
  • Export to image: from any tldraw surface, select all → Export as SVG/PNG. (No headless export path ships with this skill.)

Workflows & Routing · 2

Each workflow is one job the skill runs. The trigger phrases route your request to the right one — this is the skill's routing table.

  1. 01
    SketchDiagram Workflows/SketchDiagram.md

    sketch a diagram, draw this on a canvas, tldraw diagram

  2. 02
    StructureCanvas Workflows/StructureCanvas.md

    structure my canvas, organize my whiteboard, read my canvas

Tools · 1

Deterministic executables the workflows call — the code that does the real work, not prompt scaffolding.

  • Tldr.ts

How to Invoke

Say any of these to your DA and LifeOS activates the Tldraw skill automatically:

  • "tldraw"
  • ".tldr file"
  • "whiteboard"
  • "canvas"
  • "sketch a diagram"
  • "hand-drawn diagram"
  • "draw this on a canvas"
  • "put this on the whiteboard"
  • "structure my canvas"
  • "organize my whiteboard"
  • "read my canvas"
  • "cluster my sticky notes"

Or invoke explicitly:

Skill("Tldraw")

Want LifeOS to do this for you?

Install LifeOS on your machine — your DA gets the Tldraw skill plus 55 others, all hooked into one Life OS.