Skip to content
Development
Skill

/tldraw

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

From plugin
armory
34298 skills2 agents1 command

Claude Code

$ npx -y skills add Mathews-Tom/armory --skill tldraw --agent claude-code

SKILL.md

tldraw.SKILL.md
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
  category: visualization
  tags: [diagram, whiteboard, tldraw, flowchart, sequence-diagram, erd, uml, visualization]
  difficulty: intermediate
  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 need | Use `tldraw` | Use instead | |---|---:|---| | Whiteboard / hand-drawn-style flowchart, sequence, ERD, or UML sketch | Yes | — | | ML / deep-learning model diagram with tensor-shape annotations | Yes | — | | Freehand or figurative sketching (the `draw` shape) | Yes | — | | Polished business/infra/deployment architecture diagram | No | `architecture-diagram` | | Logos, solid-color graphics, or filled icons | No | tldraw has no opaque fill (`solid` = light tint); use the original vector source | | Interactive HTML dashboard or infographic | No | `static-web-artifacts-builder` | | Data charts, plots, sparklines | No | `chart-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).

# 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:

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

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** (

Read more
@mathews-tom
Ships witharmory

Curated, production-grade skills, agents, hooks, rules, commands, utilities, and presets for AI coding agents. No magic, no demos — battle-tested workflows built for developers who use AI seriously.

34298 skills2 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
342
Star history of Mathews-Tom/armory on GitHub, a chart by star-history.com

Other skills on armory.

doc-condenser

doc-condenser

**DEPRECATED** — Modern Claude models condense and summarize technical documentation natively with comparable quality. The output…

@mathews-tom@mathews-tomInstall Skill
opus-4-7-migration

opus-4-7-migration

DEPRECATED: The Opus 4.7 migration scanner is retired from the active skill catalog. Retained for archival reference only; not…

@mathews-tom@mathews-tomInstall Skill
regex-builder

regex-builder

**DEPRECATED** — Modern Claude models produce accurate, well-explained regex patterns with edge-case test suites natively,…

@mathews-tom@mathews-tomInstall Skill
sequential-thinking

sequential-thinking

**DEPRECATED** — Opus 4.7 uses adaptive thinking (optional at each step) and Sonnet 4.6 handles structured chain-of-thought…

@mathews-tom@mathews-tomInstall Skill
adr-writer

adr-writer

Generates Architecture Decision Records capturing context, rationale, alternatives, and consequences in numbered status-tracked…

@mathews-tom@mathews-tomInstall Skill
agent-builder

agent-builder

Build AI agents and automate Claude Code programmatically via the Claude Agent SDK and headless CLI mode. Covers Python SDK,…

@mathews-tom@mathews-tomInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about tldraw.

Which coding agents can use tldraw?
tldraw installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.