شعار Tldraw Skill

Tldraw Skill

المجتمع
Agents365-ai
tldraw-skill

استخدم هذه المهارة عندما يطلب المستخدم مخططات أو مخططات انسيابية أو مخططات معمارية أو تصورات مرئية للبيانات. واستخدمها أيضًا استباقيًا عند شرح أنظمة تتضمن 3 مكونات أو أكثر، أو تدفقات بيانات معقدة، أو علاقات يستفيد شرحها من تمثيل مرئي. تنشئ ملفات JSON بصيغة .tldr وتصدّرها محليًا إلى PNG/SVG باستخدام @kitschpatrol/tldraw-cli.

Add to TypingMind

نظرة عامة

الناشرAgents365-ai
المستودع365-skills
اسم المهارةtldraw-skill
النجوم
99
التفريعات
16
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها Agents365-ai على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Tldraw Skill في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Agents365-ai/365-skills/tree/main/plugins/tldraw/skills/tldraw-skill
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Agents365-ai/365-skills.git /tmp/365-skills
mkdir -p .claude/skills
cp -r /tmp/365-skills/plugins/tldraw/skills/tldraw-skill .claude/skills/tldraw-skill
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Tldraw Skill في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Tldraw Skill تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Tldraw Skill بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

tldraw Whiteboard Diagrams

Overview

Generate modern whiteboard-style diagrams as .tldr JSON files and export to PNG/SVG using @kitschpatrol/tldraw-cli. tldraw produces clean hand-drawn aesthetic diagrams with rich shape libraries and smooth arrow routing — well-suited for casual or whiteboard-style visualizations.

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

Explicit triggers: user says "diagram", "flowchart", "draw", "visualize", "whiteboard diagram", "tldraw diagram", "architecture diagram", "sketch this out".

Proactive triggers:

  • Explaining a system with 3+ interacting components
  • Describing a multi-step process, data flow, or pipeline
  • Showing relationships between services/modules
  • Architecture overviews, sequence flows, decision trees, ML model layers

Skip when: a simple list or table suffices, the user wants a polished business-presentation diagram (prefer drawio-skill), or the user is in a quick Q&A flow.

When NOT to use it — route elsewhere:

  • Logos / solid-color graphics / filled icons: tldraw has no opaque fill (solid = light tint; white-on-dark can't be reproduced) → use the drawio skill or the original vector file.
  • Precise vector geometry or strict (hollow-arrow) UML → drawio (or plantuml for UML).
  • Auto-layout of many nodes → mermaid (tldraw needs manual coordinates).
  • A pixel-faithful copy of an existing image → not a diagram-skill task.

Prerequisites

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.
  3. Generate — write the .tldr JSON file. 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.
  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 (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 "Sizing boxes to fit labels") 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 below
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.

File Format

Complete .tldr Skeleton

json
{
  "tldrawFileFormatVersion": 1,
  "schema": {
    "schemaVersion": 1,
    "storeVersion": 4,
    "recordVersions": {
      "asset": {"version": 1, "subTypeKey": "type", "subTypeVersions": {"image": 2, "video": 2, "bookmark": 0}},
      "camera": {"version": 1},
      "document": {"version": 2},
      "instance": {"version": 17},
      "instance_page_state": {"version": 3},
      "page": {"version": 1},
      "shape": {"version": 3, "subTypeKey": "type", "subTypeVersions": {"group": 0, "embed": 4, "bookmark": 1, "image": 2, "text": 1, "draw": 1, "geo": 7, "line": 0, "note": 4, "frame": 0, "arrow": 1, "highlight": 0, "video": 1}},
      "instance_presence": {"version": 4},
      "pointer": {"version": 1}
    }
  },
  "records": [
    {"id": "document:document", "typeName": "document", "gridSize": 10, "name": "", "meta": {}},
    {"id": "page:page1", "typeName": "page", "name": "Page 1", "index": "a1", "meta": {}}
    /* shapes and arrows go here */
  ]
}

Critical rules:

  • document:document and page:page1 records are ALWAYS required.
  • All shapes go in the records array after the page record.
  • All shapes have "parentId": "page:page1".
  • Shape IDs use format "shape:xxx" with unique suffix (e.g., "shape:s1", "shape:a1").
  • index values are fractional-index keys. Use "a" + one base-62 character, in order: "a0"–"a9", then "aA"–"aZ", then "aa"–"az" (62 ordered keys — enough for any normal diagram).
  • Do not append a second character: "a10" is invalid. And never use a leading "b"/"c" ("b1", "c1", "b0") — those encode a longer integer part, so they are malformed fractional keys and trigger invalidRecords. Stick to the single-character "a*" keys above.

Geo Shape Record

json
{
  "id": "shape:s1",
  "typeName": "shape",
  "type": "geo",
  "parentId": "page:page1",
  "index": "a1",
  "x": 100,
  "y": 100,
  "rotation": 0,
  "isLocked": false,
  "opacity": 1,
  "meta": {},
  "props": {
    "w": 180,
    "h": 60,
    "geo": "rectangle",
    "color": "blue",
    "labelColor": "black",
    "fill": "semi",
    "dash": "draw",
    "size": "m",
    "font": "draw",
    "text": "API Gateway",
    "align": "middle",
    "verticalAlign": "middle",
    "growY": 0,
    "url": ""
  }
}

Geo Types

geo valueUse for
rectangleservices, modules, components
ellipsedatabases, start/end nodes
ovalpill-shaped start/end terminators (flowcharts)
diamonddecision points
cloudexternal services, infrastructure
hexagonevent hubs, message buses
trianglegateways, load balancers
starhighlights, key features
pentagonstages, milestones
octagonstop / terminal / blocking states
trapezoidmanual operations, transforms
rhombus / rhombus-2parallelograms — I/O steps (left/right slant)
arrow-right / arrow-left / arrow-up / arrow-downdirectional flow blocks, data movement
x-boxfailed / invalid / rejected states (box with ✕)
check-boxpassed / validated / done states (box with ✓)
heartaccents (rarely needed for technical diagrams)

All 20 geo values are valid; the above are the useful subset for technical diagrams.

Color Palette

colorUse for
blueclients, core services
greensuccess, databases, storage
orangequeues, event buses, warnings
redexternal APIs, errors, alerts
light-redsoft alerts, secondary warnings
violetgateways, security, auth
yellowdecisions, caches
greyneutral, background, legacy
light-bluesecondary services, metadata
light-violetsoft auth/security, secondary gateways
light-greensoft success, secondary storage
whiteblank/empty nodes, placeholders (pair with fill: solid)
blacktitles, emphasis

Full palette (13): black, grey, light-violet, violet, blue, light-blue, yellow, orange, green, light-green, light-red, red, white.

Style Options

PropertyValuesNotes
fillsemi, solid, none, patternsemi = tinted fill (recommended)
dashdraw, solid, dashed, dotteddraw = hand-drawn default
sizes, m, l, xlm = default
fontdraw, sans, serif, monodraw = default whiteboard style

Arrow Record

json
{
  "id": "shape:a1",
  "typeName": "shape",
  "type": "arrow",
  "parentId": "page:page1",
  "index": "aG",
  "x": 0,
  "y": 0,
  "rotation": 0,
  "isLocked": false,
  "opacity": 1,
  "meta": {},
  "props": {
    "dash": "draw",
    "size": "m",
    "fill": "none",
    "color": "black",
    "labelColor": "black",
    "bend": 0,
    "start": {
      "type": "binding",
      "boundShapeId": "shape:s1",
      "normalizedAnchor": {"x": 0.5, "y": 1},
      "isExact": false
    },
    "end": {
      "type": "binding",
      "boundShapeId": "shape:s2",
      "normalizedAnchor": {"x": 0.5, "y": 0},
      "isExact": false
    },
    "arrowheadStart": "none",
    "arrowheadEnd": "arrow",
    "text": "",
    "font": "draw"
  }
}

Arrow Connection Rules

  • Arrow record x and y are always 0, 0.
  • Use "type": "binding" with boundShapeId to connect to a specific shape.
  • normalizedAnchor specifies WHERE on the target shape the arrow connects (0–1 range):
    • {x: 0.5, y: 0} = top center
    • {x: 0.5, y: 1} = bottom center
    • {x: 0, y: 0.5} = left center
    • {x: 1, y: 0.5} = right center
    • {x: 0.5, y: 0.5} = center
  • Add "text": "label" in arrow props for labeled connections.
  • Use "bend": 20 (or -20) for slight curves to avoid overlap with other arrows.
  • For dashed/dotted arrows (e.g., async flows, optional links), set "dash": "dashed" or "dotted".
  • Set "spline": "cubic" for a smooth curved arrow (default "line" is straight/elbow). Useful for skip connections and back-edges.

Arrowheads

arrowheadStart and arrowheadEnd each accept any of these 9 values (all render in @kitschpatrol/tldraw-cli):

ValueLooks likeUse for
none(no head)start of a one-way arrow
arrowopen Vdefault flow direction
trianglefilled ▶UML inheritance / "is-a"
diamondfilled ◆UML composition / aggregation (on the owner end)
dot●sequence-diagram message endpoints
square■terminal / fixed endpoint
bar|"stop" / boundary marker
pipe||alternative boundary marker
invertedhollow Vde-emphasized direction

Default arrows use "arrowheadStart": "none", "arrowheadEnd": "arrow". For bidirectional links set both ends to "arrow".

Distributing Arrows on a Shape

When multiple arrows connect to the same shape, assign different normalizedAnchor points to prevent stacking:

PositionxyUse when
Top center0.50connecting to node above
Top-left0.2502nd connection from top
Top-right0.7503rd connection from top
Right center10.5connecting to node on right
Bottom center0.51connecting to node below
Left center00.5connecting to node on left

Rule: if a shape has N connections on one side, space them evenly (e.g., 3 connections on bottom → x = 0.25, 0.5, 0.75).

Multiple Arrows Between the Same Two Nodes

The anchor-distribution rule above spreads arrows going to different nodes. When N arrows connect the same pair (e.g., bidirectional request/response, or several relationships A↔B), anchors can't separate them — instead spread the bend values symmetrically so the arrows fan out into distinct arcs:

  • Pick a max bend amount (≈ 30–60; larger for nodes that are far apart).
  • Assign the N arrows bends evenly spaced from −amount to +amount:
    • 2 arrows → bend: -amount, bend: +amount
    • 3 arrows → bend: -amount, 0, +amount
    • General: bend[i] = -amount + i * (2*amount / (N-1)) for i = 0..N-1
  • A straight arrow plus a single curved one (bend: 0 and bend: 40) reads cleanly for a request/response pair.

Container & Annotation Shapes

Beyond geo and arrow, two more shape types are useful for technical diagrams.

Frame (labeled container — tiers, subsystems, swimlanes)

A frame is a native rectangular container with a title. Use it to group a tier or subsystem with a visible boundary; stack several frames to approximate swimlanes.

json
{
  "id": "shape:frame1", "typeName": "shape", "type": "frame",
  "parentId": "page:page1", "index": "a1",
  "x": 60, "y": 60, "rotation": 0, "isLocked": false, "opacity": 1, "meta": {},
  "props": { "w": 360, "h": 220, "name": "Backend Tier", "color": "black" }
}
  • props.name is the title shown at the frame's top-left.
  • Child shapes set "parentId": "shape:frame1" (not page:page1), and their x/y are relative to the frame's top-left corner, not the page. A child at x: 40, y: 60 sits 40px in and 60px down from the frame's origin.
  • Frames render as a clean (non-hand-drawn) rectangle — good for structural grouping. Arrows can still bind across frames normally.

Note (sticky-note annotation / callout)

A note is a sticky note — ideal for TODOs, callouts, and comments layered onto a diagram.

json
{
  "id": "shape:n1", "typeName": "shape", "type": "note",
  "parentId": "page:page1", "index": "a4",
  "x": 480, "y": 80, "rotation": 0, "isLocked": false, "opacity": 1, "meta": {},
  "props": { "color": "yellow", "size": "m", "text": "TODO: add retry\nlogic here",
    "font": "draw", "align": "middle", "verticalAlign": "middle",
    "growY": 0, "fontSizeAdjustment": 0, "url": "", "scale": 1, "labelColor": "black" }
}
  • A note has no w/h — it's a fixed square (~200px) that auto-grows for longer text. Don't add w/h.
  • yellow is the classic sticky color; any palette color works.
  • Use notes sparingly — for annotations about the diagram, not as primary nodes (use geo for those).

Index Ordering Rules

Indices control z-order (stacking). Use this sequence:

a1, a2, a3, a4, a5, a6, a7, a8, a9,
aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM,
aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ,
aa, ab, ac, ... az          ← continue here past aZ; never "a10"
  • Geo shapes first: a1 through aF (or as many as needed).
  • Arrow shapes after: aG, aH, etc.
  • Every shape must have a unique index.

Layout Tips

Spacing — scale with complexity:

Diagram complexityNodesHorizontal gapVertical gap
Simple≤5200px150px
Medium6–10280px200px
Complex>10350px250px

Sizing boxes to fit labels (do this up front, not in self-check): the draw font is wide. Compute w/h from the label so text never clips. Approximate per-character width and line height for the default draw font:

sizechar width (px)line height (px)
s1118
m (default)1528
l2240
xl3256

With padding = 16 on each side:

  • w = ceil(longest_line_chars * char_width + 2*padding), then round up to the next multiple of 10.
  • h = ceil(num_lines * line_height + 2*padding), rounded up to a multiple of 10.

Example: a size-m box labeled "API Gateway" (11 chars, 1 line) → w ≈ 11*15 + 32 = 197 → 200, h ≈ 28 + 32 = 60. Multi-line labels (with \n) count the longest line for w and the line count for h. Err slightly large — extra padding looks fine, a too-narrow box hard-wraps a word mid-letters.

Why this matters: if a box is too short for its text, tldraw silently grows it taller on render (it sets the shape's growY) — so the box ends up bigger than the h you wrote and collides with whatever you placed below it. Sizing correctly up front keeps growY at 0 and your layout intact. This is the single most common cause of "the diagram looks cramped / boxes overlap" after export.

Routing corridors: between shape rows/columns, leave an extra ~80px empty corridor where arrows can route without crossing other shapes. Never place a shape in a gap that arrows need to traverse.

Grid alignment: snap all x, y, w, h values to multiples of 10 — this matches tldraw's default gridSize: 10 and makes manual editing easier.

General rules:

  • Plan the grid before assigning x/y coordinates — sketch node positions mentally first.
  • Group related nodes in the same horizontal or vertical band.
  • Place heavily-connected "hub" nodes centrally so arrows radiate outward instead of crossing.
  • For wide shapes (like an API Gateway spanning multiple downstream services), set w to cover the full span.
  • Center-align a child node under its parent (same center x) to avoid diagonal routing.
  • Event bus pattern: place the bus (hexagon) in the center of the service row, not below — services on either side reach it with short horizontal arrows (normalizedAnchor.x = 1 left side, 0 right side), eliminating crossings.
  • Horizontal connections never cross vertical nodes in the same row; use them for peer-to-peer and publish connections.

Avoiding arrow-shape overlap:

  • Before finalizing coordinates, trace each arrow path mentally — if it must cross an unrelated shape, either move the shape or use bend to curve around.
  • For tree/hierarchical layouts: assign nodes to layers (rows), connect only between adjacent layers to minimize crossings.
  • For star/hub layouts: place the hub center, satellites around it — arrows stay short and radial.

Diagram Type Presets

When the user requests a specific diagram type, apply the matching preset below for shapes, colors, and layout conventions.

Architecture Diagram

ElementgeocolorNotes
Client (web/mobile)rectangleblueTop row, label by client type
Service / modulerectangleblueMid rows, group by tier
DatabaseellipsegreenBottom row, one per service
CacheellipseyellowSits beside its owning service
Queue / event bushexagonorangeCenter of service row for hub pattern
Gateway / load balancertrianglevioletAbove services
External APIcloudredEdge of canvas, dashed arrows in
Auth / securityrectanglevioletOften near gateway

Layout: TB or LR by tier count; ≥4 tiers → TB. Hub nodes centered. Spacing scales with complexity (see table above).

Flowchart

ElementgeocolorNotes
Start / EndellipsegreenAlways at top and bottom
Process steprectangleblueDefault action box
DecisiondiamondyellowAlways label outgoing arrows (Yes / No)
I/Orectangle (with dash: dashed)orangeDistinguish from process via dashed border
SubprocessrectanglevioletIndicates a callable sub-flow

Layout: TB, ~200px vertical gap. Decisions branch left/right, then merge back to center. Always label decision branches in the arrow's props.text.

Sequence Diagram

tldraw doesn't have native lifeline shapes. Approximate with:

ElementgeocolorNotes
Actor / object headerrectangleblueTop of column
Lifelinerectangle (w: 2, fill: solid, color: grey)greyThin vertical line under each actor header
Sync messagearrow with arrowheadEnd: arrowblackSolid horizontal arrow
Async messagearrow with dash: dashedblackDashed horizontal arrow
Return messagearrow with dash: dashed, color: greygreyGrey dashed

Layout: LR for actors (200–280px apart), TB for time. Each message is a horizontal arrow between two lifelines at increasing y.

ML / Deep Learning Model Diagram

For neural network architecture diagrams — useful for paper figures and explainers.

ElementgeocolorNotes
Input / OutputrectanglegreenTop and bottom of stack
Conv / PoolingrectangleblueStandard layer block
Attention / TransformerrectanglevioletDistinct color for self-attention blocks
RNN / LSTM / GRUrectangleyellowRecurrent layers
FC / LinearrectangleorangeDense projection layers
Loss / ActivationrectangleredFinal loss / softmax / activation
Skip connectionarrow with bend: 30, dash: dashedgreyCurved dashed bypass

Tensor shape annotation: include the dimensions in props.text on a second line. tldraw renders \n literally inside JSON strings, so use a real newline (the JSON encoder will write \n):

"text": "Conv2D\n(B, 64, 32, 32)"

Layout: TB (data flows top → bottom), layers ~150px apart. Skip connections curve around the main stack.

ER Diagram (ERD)

tldraw lacks native table/row shapes. Approximate each entity as a tall rectangle with multi-line text.

ElementgeocolorNotes
Entityrectangle (fill: solid, color: light-blue)light-blueTitle + columns as one multi-line text label
Column listembedded in props.text with \n between rows—Mark PK with * prefix, FK with >
Relationshiparrow with arrowheadStart: arrow, arrowheadEnd: arrowblackBoth ends arrowed for many-to-many
Optional / weak relationshiparrow with dash: dashedgreyDashed for optional FK

Label the arrow with cardinality (e.g., 1..*, 0..1) via props.text.

Layout: TB or grid; entities spaced ≥300px apart to leave room for column lists.

UML Class Diagram

ElementgeocolorNotes
Classrectangle (fill: solid, color: light-blue)light-blueTitle + attributes + methods as one multi-line text
Inheritancearrow with arrowheadEnd: triangleblacktldraw renders a filled triangle arrowhead — point it at the parent class
Compositionarrow with arrowheadStart: diamond, arrowheadEnd: noneblacktldraw renders a filled diamond head — put it on the owner (whole) end
Aggregationarrow with arrowheadStart: diamondblackSame diamond head; distinguish from composition via a label or note
Associationarrow with arrowheadEnd: arrowblackStandard arrow

Note: tldraw's triangle/diamond arrowheads are filled, whereas strict UML uses hollow triangles (inheritance) and either filled/hollow diamonds (composition/aggregation). The shapes read correctly for sketches and explainers; for publication-grade UML with hollow heads, drawio-skill (separate skill) is a better fit.

Layout: TB, classes ~250px apart, interfaces above implementations.


Export Commands

bash
# Check CLI version
tldraw --version

# PNG at 2x scale (recommended) — outputs diagram.png in ./
tldraw export diagram.tldr -f png --scale 2 -o ./

# SVG — outputs diagram.svg in ./
tldraw export diagram.tldr -f svg -o ./

# Transparent background
tldraw export diagram.tldr -f png --scale 2 --transparent -o ./

# Dark theme
tldraw export diagram.tldr -f png --scale 2 --dark -o ./

# Custom output directory (e.g. CI artifacts dir) — create if missing, then export there
mkdir -p ./artifacts && tldraw export diagram.tldr -f png --scale 2 -o ./artifacts/

Note: -o is an output directory, not a file path. The output file is named after the input file (diagram.tldr → diagram.png).

Auto-launch after export

Offer to open the .tldr file in the user's default tldraw viewer/editor:

OSCommand
macOSopen diagram.tldr
Linuxxdg-open diagram.tldr
Windowsstart diagram.tldr

Or upload to https://tldraw.com (drag-and-drop the .tldr file) for browser editing.


Common Mistakes

MistakeFix
tldraw command not foundRun npm install -g @kitschpatrol/tldraw-cli
Could not find Chrome (ver. X) on exportInstall the pinned build: npx puppeteer browsers install chrome@X (use the exact version from the error)
invalidRecords on exportUse single-character a keys (a1…a9, aA…aZ, aa…az); a10, b1, c1 are malformed fractional-index keys
Blank/empty exportVerify document:document and page:page1 records are present
Output file not found-o is a directory; file name matches input: tldraw export foo.tldr -o ./ → ./foo.png
Arrow doesn't appearUse "type": "binding" with boundShapeId; set arrow x/y to 0,0
Shapes overlapPlan a 200px+ grid before assigning x/y; scale spacing with complexity
Box taller than expected / collides belowLabel overflowed an undersized box, so tldraw auto-grew it (growY). Size w/h to the label up front using the sizing formula
Text not visibleCheck props.text is set; if fill: "none", ensure text color contrasts
Index collisionAll shapes must have unique index values
Shape ID clashUse unique IDs: "shape:s1", "shape:s2", "shape:a1", etc.
Export failsEnsure the .tldr file is valid JSON: python3 -m json.tool file.tldr > /dev/null
Multi-line labelUse a real newline character inside the JSON string ("text": "Line1\nLine2"); tldraw respects \n
Arrow crosses shapeUse bend to curve around, or move endpoint to a different normalizedAnchor
Iteration loop never endsAfter 5 rounds, suggest the user open .tldr in tldraw.com for fine-tuning

Fallback Chain

When tools are unavailable, degrade gracefully:

ScenarioBehavior
tldraw-cli missingGenerate .tldr JSON only; instruct user to drag-and-drop into https://tldraw.com or install the CLI
Vision unavailable for self-checkSkip self-check (step 5); proceed directly to showing user the exported PNG
Export failsValidate JSON with python3 -m json.tool; deliver the .tldr file and suggest opening in tldraw.com

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Tldraw Skill؟

استخدم هذه المهارة عندما يطلب المستخدم مخططات أو مخططات انسيابية أو مخططات معمارية أو تصورات مرئية للبيانات. واستخدمها أيضًا استباقيًا عند شرح أنظمة تتضمن 3 مكونات أو أكثر، أو تدفقات بيانات معقدة، أو علاقات يستفيد شرحها من تمثيل مرئي. تنشئ ملفات JSON بصيغة .tldr وتصدّرها محليًا إلى PNG/SVG باستخدام @kitschpatrol/tldraw-cli.

لماذا تستخدم Tldraw Skill على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Tldraw Skill عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Tldraw Skill في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Agents365-ai/365-skills/tree/main/plugins/tldraw/skills/tldraw-skill. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Tldraw Skill؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Tldraw Skill؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Tldraw Skill معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Tldraw Skill مجانية؟

نعم. نشرها Agents365-ai على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل
شعار openclaw

Control Ui

openclaw
مؤسسةشائع

شغّل واجهة OpenClaw Control UI واستكشاف أخطائها وإصلاحها: تنقّل بين العملاء المتصلين، ونظّم الجلسات، وأنشئ لوحات معلومات للجلسات، وتعامل مع Gateways المباشرة أو المستضافة عبر Tailscale.

82.2K
391K
الملفات: 2
عرض
شعار affaan-m

Market Research

affaan-m
المجتمعشائع

أجرِ أبحاث السوق والتحليلات التنافسية والعناية الواجبة للمستثمرين وجمع المعلومات الاستخباراتية عن القطاعات، مع توثيق المصادر وتقديم ملخصات تساعد على اتخاذ القرارات. استخدمها لتقدير حجم السوق،…

40.4K
270.2K
الملفات: 1
عرض
شعار affaan-m

X Api

affaan-m
المجتمعشائع

تكامل مع X/Twitter API لنشر التغريدات وسلاسل التغريدات وقراءة الخطوط الزمنية والبحث والتحليلات. يغطي أنماط المصادقة عبر OAuth وحدود معدل الطلبات ونشر المحتوى بصيغته الأصلية على المنصة. استخدمها عندما يريد المستخدم…

40.4K
270.2K
الملفات: 1
عرض
شعار affaan-m

Postgres Patterns

affaan-m
المجتمعشائع

أنماط قواعد بيانات PostgreSQL لتحسين الاستعلامات، وتصميم المخططات، والفهرسة، والأمان. تستند إلى أفضل ممارسات Supabase.

39.1K
261.1K
التعليمات
عرض

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇