New to Claude Skills? Learn how to install them →

danielmiessler on GitHub

Tldraw

Free

Effortlessly manage and structure your tldraw canvases.

Get this skill

Free · Opens the source repo

What Tldraw does

Tldraw is a specialized skill designed for working with tldraw canvas files, specifically in the .tldr format. This skill allows users to read, create, and edit hand-drawn-register diagrams directly within a canvas file that can be opened in any tldraw surface. The core functionality revolves around sketching diagrams, such as boxes, arrows, sticky notes, and text, while also enabling users to convert rough sketches back into structured data. This makes Tldraw particularly useful for individuals who frequently use tldraw for brainstorming, ideation, and visual organization of their thoughts.

The skill operates by utilizing a deterministic read/write process for tldraw canvases, ensuring that any generated files are compatible with the tldraw web editor, VS Code extension, and desktop application. Users can invoke specific workflows to either sketch diagrams or structure existing canvases. For instance, the "SketchDiagram" workflow allows users to create a hand-drawn representation of their ideas, while the "StructureCanvas" workflow helps in organizing and clustering related items on a canvas, making it easier to visualize and manage complex thoughts.

Customization options are available, allowing users to set preferences for their canvas, such as default colors and the preferred directory for saving files. Notifications are also integrated into the workflow execution process, providing real-time feedback when a task is being performed. This skill is particularly suited for developers and designers who need to quickly visualize concepts and organize ideas in a collaborative or individual setting.

While Tldraw excels at managing and structuring canvas files, it is not intended for creating polished static images or infographics. Users looking for advanced graphic design capabilities or web UI design should consider other tools that specialize in those areas. Tldraw is best utilized in scenarios where quick sketches and organizational tasks are required, making it a practical addition to any workflow that involves visual brainstorming and ideation.

When to use it

Use Tldraw when you need to sketch diagrams or organize rough ideas on a tldraw canvas, particularly in collaborative environments.

When not to use it

Avoid Tldraw for creating polished graphics, infographics, or for web UI design tasks, as it is tailored for quick sketches and organizational workflows.

What you can build with it

Creating a Visual Workflow

A user can quickly sketch a visual representation of a workflow using the SketchDiagram workflow, saving time on initial design.

Organizing Brainstorming Ideas

After a brainstorming session, a user can structure their messy canvas into organized clusters, making it easier to review ideas.

Collaborative Diagramming

In a team setting, users can collaboratively sketch and edit diagrams, ensuring that all ideas are captured and organized effectively.

How to install Tldraw

View source

1. Install with the skills CLI

npx skills add danielmiessler/lifeos/Tldraw --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by danielmiessler

Tldraw

Deterministic read/write for tldraw canvases. The .tldr format is plain JSON ({tldrawFileFormatVersion: 1, schema, records}); Tools/Tldr.ts writes records that pass tldraw's own validator, so generated files open cleanly in the tldraw web editor, the VS Code tldraw extension, or the desktop app. Two directions: model → canvas (sketch diagrams) and canvas → model (read and structure a human's rough thinking).

Customization

Before executing, check for user customizations at: ~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Tldraw/

If this directory exists, load and apply any PREFERENCES.md found there (default canvas directory, preferred colors/register, default open surface). If not, proceed with defaults.

Voice Notification

When executing a workflow, do BOTH:

  1. Send voice notification:

    curl -s -X POST http://localhost:31337/notify \
      -H "Content-Type: application/json" \
      -d '{"message": "Running WORKFLOWNAME in Tldraw"}' \
      > /dev/null 2>&1 &
    
  2. Output text notification:

    Running **WorkflowName** in **Tldraw**...
    

Workflow Routing

WorkflowTriggerFile
SketchDiagram"sketch a diagram", "draw this on a canvas", "tldraw diagram"Workflows/SketchDiagram.md
StructureCanvas"structure my canvas", "organize my whiteboard", "read my canvas"Workflows/StructureCanvas.md

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.)

Execution Log

After completing any workflow, append a single JSONL entry:

echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"Tldraw","workflow":"WORKFLOW_USED","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl

Frequently asked questions about Tldraw

Similar skills