跳到正文
cccskills
免费在 GitHub 公开

Tldraw

Create editable tldraw canvases with boxes, arrows, sticky notes, frames, and text. Read an existing canvas to group related ideas and rearrange shapes, then open the resulting file in a compatible editor for further adjustments.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Read, create, and edit tldraw .tldr canvas files deterministically — sketch hand-drawn-register diagrams (boxes, arrows, sticky notes, frames, text) directly into a canvas file the user opens in any tldraw surface, and read a rough canvas back as structured data to organize it. USE WHEN tldraw, .tldr file, whiteboard, canvas, sketch a diagram, hand-drawn diagram, draw this on a canvas, put this on the whiteboard, structure my canvas, organize my whiteboard, read my canvas, cluster my sticky notes. NOT FOR polished static images, infographics, or mermaid diagrams (use Art), web UI design (use Webdesign), programmatic video (use Remotion).

查看安装方法

适用场景

  • Sketch a process diagram
  • Group related sticky notes
  • Read text and positions from a canvas
  • Create a diagram for further editing

包含的文件(6)

  • SKILL.md5.5 KB
  • References/SchemaSnapshot.json765 B
  • References/TldrFormat.md4.5 KB
  • Tools/Tldr.ts14.4 KB
  • Workflows/SketchDiagram.md2.4 KB
  • Workflows/StructureCanvas.md2.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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 shapes — index 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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Compare a component's own design needs with the goals of the larger system through three structured passes. The result identifies conflicts, recommends an appropriate scope, and assesses whether the proposed design fits the whole.

中文简介正在准备中。当前显示英语简介。

  • Choosing between a service, a library, and inline code
  • Comparing feature requests with product goals
  • Checking how new components fit an existing system
danielmiessler/LifeOS2万2026年9月4日 更新

Aphorisms

免费

Find quotes that fit a text’s themes, with attribution and a short reason for each suggestion. Add sourced quotes, research thinkers, and organize a quote collection by theme and usage history to avoid repetition.

中文简介正在准备中。当前显示英语简介。

  • Finding a fitting quote for a newsletter
  • Saving sourced quotes without duplicates
  • Researching a thinker’s quotes by theme
danielmiessler/LifeOS2万2026年9月4日 更新

Apify

免费

Collect social posts, business listings, and product reviews through Apify actors, ready-made data collection tools. Filter results by date, rating, or engagement in code before sending relevant records to the AI for research or lead generation.

中文简介正在准备中。当前显示英语简介。

  • Find competitors' most popular social posts
  • Build a contact list of local businesses
  • Extract recent negative Amazon reviews
danielmiessler/LifeOS2万2026年9月4日 更新

Art

免费

Create blog illustrations, technical diagrams, comparisons, comics, and icons through workflows tailored to each format. The skill guides composition, color, and model selection, then stages generated images for review before they are used in a project.

中文简介正在准备中。当前显示英语简介。

  • Creating blog header illustrations
  • Explaining a system with a technical diagram
  • Visualizing comparisons and timelines
danielmiessler/LifeOS2万2026年9月4日 更新

ArXiv

免费

Find arXiv papers by topic, research category, or paper ID. Retrieve titles, authors, abstracts, and links, check new submissions, and add AlphaXiv's AI-generated overviews when available to help decide which papers to read.

中文简介正在准备中。当前显示英语简介。

  • Checking new AI and machine learning papers
  • Finding papers on a specific research topic
  • Looking up a paper by its ID or arXiv URL
danielmiessler/LifeOS2万2026年9月4日 更新

Clean spoken recordings by transcribing words, identifying filler and false starts, and joining cuts with short audio fades. Preview proposed edits, reduce breaths, repair noise-gate clicks, and optionally use Cleanvoice for additional cloud processing.

中文简介正在准备中。当前显示英语简介。

  • Removing filler words and long silences from a podcast
  • Reviewing proposed edits before applying them
  • Repairing clicks caused by a noise gate
danielmiessler/LifeOS2万2026年9月4日 更新

查看 danielmiessler 的全部技能

报告此技能的问题