Claude Code Tools

tldraw-skill

github

Whiteboard tldraw diagrams (.tldr) from natural language with 6 presets and vision-based self-check. PNG/SVG export, multi-agent.

Stars
⭐ 33
License
MIT
Last Updated
2026-05-19
Source
github

tldraw-skill — From Text to Whiteboard Diagrams

License: MIT GitHub stars GitHub forks Latest Release Last Commit

SkillsMP ClawHub Claude Code Plugin Agent Skills Discord

English · 中文 · 📖 Online Docs

A skill that turns natural-language descriptions into hand-drawn-style .tldr whiteboard diagrams and exports them to PNG / SVG via @kitschpatrol/tldraw-cli. Works with Claude Code, Cursor, Copilot, OpenClaw, Codex, Hermes, and any agent compatible with the Agent Skills format.

Microservices Architecture — generated from a single natural-language prompt

✨ Highlights

  • 6 diagram type presets — Architecture, Flowchart, Sequence, ML/Deep Learning, ERD, UML
  • Vision-based self-check + auto-fix — reads its own PNG output and auto-fixes overlaps, clipped labels, missing arrows, off-canvas shapes, and stacked edges (up to 2 rounds; requires a vision-enabled model)
  • Iterative review loop — targeted JSON edits, up to 5 rounds, then suggests opening in tldraw.com for fine-tuning
  • Complexity-scaled layout — spacing (200 / 280 / 350px) grows with node count; routing corridors and hub placement built in
  • Semantic 10-color paletteblue services, green databases, violet auth, orange queues, yellow decisions, etc. — consistent across runs
  • Zero browser automationtldraw-cli runs anywhere Node runs; identical setup on macOS, Linux, Windows (no Chromium, no Playwright)

🖼️ Examples

[!TIP] The hero image above was generated from this single prompt:

Create a microservices e-commerce architecture with Mobile/Web/Admin clients,
API Gateway, User/Order/Product/Payment services, Kafka event bus, Notification
service, and User DB / Order DB / Product DB / Redis Cache / Stripe API

The skill plans shape positions on a 10px grid, distributes arrow endpoints around each node’s perimeter, and re-checks the exported PNG to catch overlaps before showing you the result.

Full feature breakdown in docs/features.md. Known limitations (strict UML notation, PDF export, vision requirement) in docs/limitations.md.

🚀 Installation

1. Install @kitschpatrol/tldraw-cli

PlatformCommand
macOS / Linux / Windowsnpm install -g @kitschpatrol/tldraw-cli

Verify with tldraw --version. Requires Node.js (npm). No browser automation, no Playwright — tldraw-cli runs identically everywhere Node runs.

2. Install the skill

# Any agent (Claude Code, Cursor, Copilot, ...)
npx skills add Agents365-ai/365-skills -g
# Claude Code plugin marketplace
> /plugin marketplace add Agents365-ai/365-skills
> /plugin install tldraw
# Manual install
git clone https://github.com/Agents365-ai/tldraw-skill.git \
  ~/.claude/skills/tldraw-skill

Also indexed on SkillsMP and ClawHub.

Updating: /plugin update tldraw (Claude Code), skills update tldraw-skill (SkillsMP), clawhub update tldraw-pro-skill (OpenClaw), or git pull for manual installs.

⚡ Quick Start

After installation, just describe what you want. For example, an ML model sketch:

Sketch a Transformer encoder-decoder on a whiteboard: 6-layer encoder with
self-attention, 6-layer decoder with cross-attention, input embeddings
(batch × 512 × 768), positional encoding, and a final output projection.
Annotate tensor shapes between layers and color-code by layer type.

The skill plans the layout, generates the .tldr JSON, exports to PNG/SVG, self-checks the result, and lets you iterate.

🧩 Supported Diagram Types

CategoryExamplesNotable features
Architecturemicroservices, cloud, network topology, deploymentHub-center pattern for event buses; tier rows; cloud/hexagon/triangle shape vocabulary
Flowchartsbusiness processes, workflows, decision treesellipse start/end, diamond decisions; auto-labels Yes/No branches
Sequence diagramsAPI call flows, request/response, async messagesLifeline approximation (thin grey rectangles); dashed arrows for async / return
ML / Deep LearningTransformer, CNN, LSTM, GRUTensor shape annotations in node labels; layer-type color coding; skip-connection bends
ERDentity relationships, schemasMulti-line entity labels (PK * / FK >); cardinality on arrow labels
UML Classhigh-level class diagramsMulti-line class labels (attributes + methods); inheritance / association arrows (see limitations for strict UML notation)

🔄 How it works

  1. Check deps — verifies tldraw --version; offers npm install -g @kitschpatrol/tldraw-cli if missing.
  2. Plan layout — picks geo shapes, assigns node positions on a 10px grid, spaces according to node count.
  3. Generate .tldr JSON — writes shape + arrow records with bound anchors and distributed normalizedAnchor points.
  4. Export draft PNGtldraw export diagram.tldr -f png --scale 2 -o ./.
  5. Self-check — vision-enabled model reads the PNG, auto-fixes overlaps / clipped labels / arrow crossings (max 2 rounds). Skipped if vision isn’t available.
  6. Review loop — shows the image, applies your targeted edits (color, label, add/remove node, move shape), re-exports — up to 5 rounds before suggesting tldraw.com for hand-tuning.
  7. Final export — re-exports the approved version to all requested formats and reports file paths.

🆚 Comparison

vs Native Agent (no skill)

FeatureNative agenttldraw-skill
Self-check after export✅ vision-based, 2-round auto-fix
Iterative review loop❌ manual re-prompt✅ targeted JSON edits, 5-round safety valve
Diagram type presets✅ 6 presets (Arch, Flow, Seq, ML, ERD, UML)
Complexity-scaled spacing✅ 200 / 280 / 350px tiers by node count
Color paletterandom / inconsistent✅ 10-color semantic system
Arrow distribution on shaperandom anchors → stacked✅ even spacing around perimeter
Grid alignment✅ 10px snap matches tldraw default
Multi-line tensor / column labelsad-hoc✅ embedded \n formatting baked in

Part of the Agents365-ai diagram-skill family — pick the right tool for the job:

SkillStyleBest for
drawio-skillPolished business diagramsStakeholder decks, strict UML, ML papers, network topologies
excalidraw-skillHand-drawn / sketchyWhiteboard mockups, informal diagrams
mermaid-skillText-based, auto-layoutREADME-embeddable, version-control friendly
plantuml-skillUML-focusedClass / sequence diagrams in CI pipelines

💬 Community

WeChat Community Group

❤️ Support

If this skill helps you, consider supporting the author:

WeChat Pay
WeChat Pay
Alipay
Alipay
Buy Me a Coffee
Buy Me a Coffee
Give a Reward
Give a Reward

👤 Author

Agents365-ai

📄 License

MIT