Agent skill

Tldraw

by Mathews-Tom in Mathews-Tom/armory

Generate hand-drawn whiteboard-style diagrams (.tldr) from natural language and export to PNG/SVG via tldraw-cli, with vision-based self-check and an iterative review loop.

MITAuto-check passedDevelopment

Install Tldraw

skills CLI
$ npx skills add Mathews-Tom/armory --skill tldraw -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mathews-Tom/armory tldraw --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tldraw .claude/skills/tldraw && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tldraw
GitHub stars
328
Token cost
~2.4k tokens
SKILL.md length
1,158 words
Files
8 (incl. references)
Skills in repo
80
Repo updated
First seen
Licence
MIT

At a glance

Generate hand-drawn whiteboard-style diagrams (.tldr) from natural language and export to PNG/SVG via tldraw-cli, with vision-based self-check and an iterative review loop.

  • Works in 2 steps: Self-Check → Review Loop
  • : whiteboard diagram
  • SKILL.md covers Overview, When to Use, Prerequisites and Workflow, plus 1 more section
  • Calls npm and npx

What it does

Tldraw is an agent skill from Mathews-Tom/armory. Generate hand-drawn whiteboard-style diagrams (.tldr) from natural language and export to PNG/SVG via tldraw-cli, with vision-based self-check and an iterative review loop. Covers flowcharts, sequence diagrams, ERDs, UML sketches, and ML model diagrams. Triggers on: "whiteboard diagram", "sketch this out", "tldraw diagram", "hand-drawn diagram", "flowchart", "sequence diagram", "ERD diagram", "UML sketch", "ML model diagram", "draw a diagram". NOT for polished business/infra diagrams, use architecture-diagram.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `evals/cases.yaml`, `references/arrows-and-containers.md` and `references/diagram-presets.md`).

It sits in Development, covering Diagrams. The repository describes itself as: Curated, production-grade skills for AI coding agents. Battle-tested workflows for developers who use AI seriously. The licence is MIT.

When your agent uses it

  • : whiteboard diagram
  • Sketch this out
  • Hand-drawn diagram
  • Sequence diagram

Example prompts

  • “whiteboard diagram”
  • “sketch this out”
  • “tldraw diagram”
  • “/tldraw”

Requirements

  • Node.js

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Self-Check
  2. Review Loop

What it can do on your machine

Read from SKILL.md and the folder at commit 4594fb7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tldraw loads about 2.4k tokens when it runs, and up to ~9.4k if it reads all its reference files. Until then it costs about 131 tokens; SKILL.md has 1,158 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~131
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mathews-Tom/armory at commit 4594fb7, republished under its MIT licence (© Mathews-Tom). 1,158 words, ~2,410 tokens.

Download SKILL.mdSave it as .claude/skills/tldraw/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
tldraw
description
Generate hand-drawn whiteboard-style diagrams (.tldr) from natural language and export to PNG/SVG via tldraw-cli, with vision-based self-check and an iterative review loop. Covers flowcharts, sequence diagrams, ERDs, UML sketches, and ML model diagrams. Triggers on: "whiteboard diagram", "sketch this out", "tldraw diagram", "hand-drawn diagram", "flowchart", "sequence diagram", "ERD diagram", "UML sketch", "ML model diagram", "draw a diagram". NOT for polished business/infra diagrams, use architecture-diagram.
metadata.version
1.0.0
metadata.category
visualization
metadata.tags
diagram, whiteboard, tldraw, flowchart, sequence-diagram, erd, uml, visualization
metadata.difficulty
intermediate
metadata.complements
architecture-diagram

tldraw Whiteboard Diagrams

Overview

Generate hand-drawn whiteboard-style diagrams as .tldr JSON files and export to PNG/SVG using @kitschpatrol/tldraw-cli. tldraw produces a hand-drawn aesthetic with rich shape libraries and smooth arrow routing — well-suited for casual, sketch-style visualizations rather than polished business diagrams.

Format: .tldr JSON Export: PNG, SVG (via @kitschpatrol/tldraw-cli) Aesthetic: Hand-drawn whiteboard style by default; switchable to clean fonts via font prop.

When to Use

User needUse tldrawUse instead
Whiteboard / hand-drawn-style flowchart, sequence, ERD, or UML sketchYes—
ML / deep-learning model diagram with tensor-shape annotationsYes—
Freehand or figurative sketching (the draw shape)Yes—
Polished business/infra/deployment architecture diagramNoarchitecture-diagram
Logos, solid-color graphics, or filled iconsNotldraw has no opaque fill (solid = light tint); use the original vector source
Interactive HTML dashboard or infographicNostatic-web-artifacts-builder
Data charts, plots, sparklinesNochart-clarity

Proactive triggers: explaining a system with 3+ interacting components, describing a multi-step process or data flow, showing relationships between services/modules, decision trees, or ML model layers.

Skip when: a simple list or table suffices, or the user is in a quick Q&A flow.

Known constraints (route elsewhere or set expectations if these matter):

  • No opaque fill — solid renders as a light tint, so white-on-dark artwork can't be reproduced.
  • Manual coordinates only — no automatic layout of many nodes.
  • Arrowheads are filled triangles/diamonds, not the hollow heads strict UML notation uses.
  • PDF export isn't supported by tldraw-cli (PNG/SVG only).

Prerequisites

Uses @kitschpatrol/tldraw-cli — a third-party, MIT-licensed export tool maintained independently of the tldraw.dev project. It is not the official create-tldraw project-scaffolding CLI; don't confuse the two. It renders .tldr files to PNG/SVG via a headless Chrome instance (puppeteer).

bash
# Install tldraw-cli
npm install -g @kitschpatrol/tldraw-cli

# Verify
tldraw --version

Works identically on macOS, Windows, and Linux.

First-export note: tldraw export renders through a pinned Chrome build via puppeteer. The first export can fail with Could not find Chrome (ver. <x>). The error names the exact version it needs — install it once, then exports work:

bash
# The error message names the version; substitute it here
npx puppeteer browsers install chrome@<version-from-error>

(Installs to ~/.cache/puppeteer; only needed once per CLI version.)

Workflow

Before starting, assess whether the user's request is specific enough. If key details are missing, ask 1-3 focused questions:

  • Diagram type — which preset? (Architecture, Flowchart, Sequence, ML/DL, ERD, UML, or general)
  • Output format — PNG (default), SVG?
  • Output location — default is the user's working dir; honor any explicit path the user gives (e.g. "put it in ./artifacts/"). Don't ask if they didn't mention one.
  • Scope/fidelity — how many components? Any specific technologies or labels?

Skip clarification if the request already specifies these details or is clearly simple (e.g., "draw a flowchart of X").

  1. Check deps — verify tldraw --version succeeds; if missing, run npm install -g @kitschpatrol/tldraw-cli.
  2. Plan — identify shapes (geo type per node), connections (arrows with source/target), and layout (TB or LR, group by tier/role). Sketch a coordinate grid before writing JSON. See references/diagram-presets.md for layout rules, index ordering, and per-diagram-type shape/color conventions.
  3. Generate — write the .tldr JSON file using the record formats in references/tldr-format.md (shapes) and references/arrows-and-containers.md (arrows, frames, notes). Default output dir is the user's working dir; if the user specified a path or directory (e.g. ./artifacts/), mkdir -p it first and write there. Apply the same dir choice to PNG/SVG exports in steps 4 and 7.
  4. Export draft — run CLI to produce a PNG for preview. See references/troubleshooting.md for export command syntax.
  5. Self-check — use the agent's built-in vision capability to read the exported PNG, catch obvious issues, auto-fix before showing the user (requires a vision-enabled model such as Claude Sonnet/Opus). If vision is unavailable, skip this step.
  6. Review loop — show image to user, collect feedback, apply targeted JSON edits, re-export, repeat until approved.
  7. Final export — export the approved version to all requested formats; report file paths for both the .tldr source and exported image(s).
Show full SKILL.md (541 more words)Show less
Step 5: Self-Check

After exporting the draft PNG, use the agent's vision capability (e.g., Claude's image input) to read the image and check for these issues before showing the user. If the agent does not support vision, skip self-check and show the PNG directly.

tldraw's own AI agent flags exactly three structural defects — text overflow (a box too small for its label), overlapping text, and friendless arrows (an arrow with an unbound end). The first three rows below target those; size boxes correctly up front (see the sizing formula in references/diagram-presets.md) and they rarely occur.

CheckWhat to look forAuto-fix action
Text overflowLabel spills past the shape's border, or the box looks taller than you set (tldraw auto-grows an undersized box)Increase w/h to fit the label — see the sizing formula in references/diagram-presets.md
Overlapping textTwo text-bearing shapes' labels touch or overlap, hurting legibilityShift shapes apart by ≥200px
Friendless arrowAn arrow with one end not connected to a shape (floats loose)Bind both ends: every arrow's start and end need a boundShapeId matching an existing shape
Off-canvas shapesShapes at negative coordinates or far from the main groupMove to positive coordinates near the cluster
Arrow-shape overlapAn arrow visually crosses through an unrelated shapeAdjust bend value or move endpoints to a different normalizedAnchor side
Stacked arrowsMultiple arrows overlap each other on the same pathDistribute normalizedAnchor across the shape perimeter (use different x/y values)
  • Max 2 self-check rounds — if issues remain after 2 fixes, show the user anyway.
  • Re-export after each fix and re-read the new PNG.
Step 6: Review Loop

After self-check, show the exported image and ask the user for feedback.

Targeted edit rules — for each type of feedback, apply the minimal JSON change:

User requestJSON edit action
Change color of XFind shape by props.text matching X, update props.color
Add a new nodeAppend a new shape record with next available index, position near related nodes
Remove a nodeDelete the shape record and any arrow records bound to it
Move shape XUpdate the shape's x/y fields
Resize shape XUpdate props.w/props.h
Add arrow from A to BAppend a new arrow record binding to A and B's shape ids
Change label textUpdate props.text on the matching shape or arrow
Change layout directionFull regeneration — replan the grid and rebuild

Rules:

  • For single-element changes: edit the existing JSON in place — preserves layout tuning from prior iterations.
  • For layout-wide changes (e.g., swap LR↔TB, "start over"): regenerate full JSON.
  • Overwrite the same {name}.png each iteration — do not create v1, v2, v3 files.
  • After applying edits, re-export and show the updated image.
  • Loop continues until user says approved / done / LGTM.
  • Safety valve: after 5 iteration rounds, suggest the user open the .tldr file in tldraw.com or the desktop app for fine-grained adjustments.

References

  • references/tldr-format.md — .tldr file skeleton, geo shape record, geo types, color palette, style options
  • references/arrows-and-containers.md — arrow record, connection rules, arrowheads, distributing arrows, frames, notes
  • references/diagram-presets.md — index ordering, layout tips, box-sizing formula, per-diagram-type shape/color presets (architecture, flowchart, sequence, ML, ERD, UML)
  • references/troubleshooting.md — export commands, common mistakes, fallback chain when tools/vision are unavailable
  • references/upstream/provenance.md — upstream source, pinned commit, what was vendored/adapted/skipped

This skill adapts Agents365-ai's MIT-licensed tldraw-skill into armory as tldraw.

© Mathews-Tom, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/tldraw of Mathews-Tom/armory.

  • SKILL.md
  • evals/cases.yaml
  • references/arrows-and-containers.md
  • references/diagram-presets.md
  • references/tldr-format.md
  • references/troubleshooting.md
  • references/upstream/LICENSE
  • references/upstream/provenance.md

Open the folder on GitHubat commit 4594fb7

Compare with similar skills

Tldraw next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tldraw compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tldraw this skillMathews-Tom/armory328—~2.4kAutomated safety check: PassMIT
Archify Diagramstt-a1i/archify81k—~2.9kAutomated safety check: PassMIT
JSON Canvasheyitsnoah/claudesidian2.6k18 repos~3.5kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design47k1 repos~7.5kAutomated safety check: PassMIT
Fireworks Tech Graphtisfeng/Easydict15k1 repos~1.4kAutomated safety check: PassMIT
Excalidraw Diagramcoleam00/excalidraw-diagram-skill5k2 repos~6.1kAutomated safety check: PassNone

Similar skills

  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    81k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • JSON Canvas

    heyitsnoah/claudesidian

    Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections.

    2.6k GitHub starsUsed in 18 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    47k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Fireworks Tech Graph

    tisfeng/Easydict

    Create precise SVG technical diagrams, export PNG or offline HTML, and animate supported semantic SVGs to GIF.

    15k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Excalidraw Diagram

    coleam00/excalidraw-diagram-skill

    Create Excalidraw diagram JSON files that make visual arguments.

    5k GitHub starsUsed in 2 repos~6.1k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes

More from Mathews-Tom/armory

All 80 skills in this repo
  • Architecture Reviewer

    Mathews-Tom/armory

    Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports.

    328 GitHub stars~4.6k tokensUpdated 3 days ago
    Auto-check passed
  • Concept To Image

    Mathews-Tom/armory

    Turn concepts into static HTML visuals exported as PNG or SVG files via HTML/CSS/SVG.

    328 GitHub stars~2.6k tokensUpdated 3 days ago
    Auto-check passed
  • Watch

    Mathews-Tom/armory

    A skill your agent uses when analyzing an existing video URL or local recording: "watch this video", "analyze youtube video", "summarize this video", "youtube transcript", "find this moment", "what…

    328 GitHub stars~2.8k tokensUpdated 3 days ago
    Auto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    328 GitHub stars~3.1k tokensUpdated 3 days ago
    Auto-check passed
  • Concept To Video

    Mathews-Tom/armory

    Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition.

    328 GitHub stars~4.9k tokensUpdated 3 days ago
    Auto-check passed
  • Decision Map

    Mathews-Tom/armory

    Maps the unresolved architecture, policy, and scope decisions that must be answered before planning can start: one durable decision ticket per question on the issue tracker, typed and blocker-linked…

    328 GitHub stars~2.7k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Tldraw

What does Tldraw do?

Generate hand-drawn whiteboard-style diagrams (.tldr) from natural language and export to PNG/SVG via tldraw-cli, with vision-based self-check and an iterative review loop. Tldraw is an agent skill from Mathews-Tom/armory.tldr) from natural language and export to PNG/SVG via tldraw-cli, with vision-based self-check and an iterative review loop.

When should I use Tldraw?

Tldraw fits situations like: : whiteboard diagram; sketch this out; hand-drawn diagram; sequence diagram.

How do I install Tldraw in Claude Code?

Run `npx skills add Mathews-Tom/armory --skill tldraw -a claude-code`. Or copy the skill folder (skills/tldraw in Mathews-Tom/armory) into .claude/skills/tldraw in your project. Claude Code loads it when a task matches its description.

How do I install Tldraw in Codex?

Run `npx skills add Mathews-Tom/armory --skill tldraw -a codex`. Or copy the skill folder (skills/tldraw in Mathews-Tom/armory) into .agents/skills/tldraw in your project. Codex loads it when a task matches its description.

Can I use Tldraw in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mathews-Tom/armory --skill tldraw -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tldraw, .gemini/skills/tldraw, .github/skills/tldraw and .opencode/skills/tldraw in your project.

What does Tldraw need to run?

Going by SKILL.md and its folder, Tldraw needs the command-line tools its instructions call (npm and npx). Our summary lists: Node.js.

Does Tldraw access the network?

SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Tldraw safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tldraw use?

Tldraw is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tldraw use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.9k tokens, read only when the agent opens those files.

What are the alternatives to Tldraw?

Skills that share tags, products or a category with Tldraw: Archify Diagrams (tt-a1i/archify, 81k stars), JSON Canvas (heyitsnoah/claudesidian, 2.6k stars), Diagram Design (cathrynlavery/diagram-design, 47k stars) and Fireworks Tech Graph (tisfeng/Easydict, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tldraw?

Mathews-Tom (a GitHub user) maintains it in Mathews-Tom/armory, which has 328 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on October 6, 2026.

Source: Mathews-Tom/armory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.