Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计提醒

tldraw-desktop桌面绘制

Agent Skill

tldraw-desktop 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

881

周安装

36

GitHub Stars

10

下载量

282
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tldraw-desktop(桌面绘制)
来源仓库:https://github.com/tmdgusya/tldraw-desktop-skill
仓库路径:skills/tldraw-desktop
安装命令:
npx skills add https://github.com/tmdgusya/tldraw-desktop-skill --skill tldraw-desktop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tmdgusya/tldraw-desktop-skill --skill tldraw-desktop

简介

tldraw-desktop 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。

  • 适用于代码协作和仓库管理场景,可结合来源仓库和原始 README 核验用法。
  • 通过 npx skills add 命令从 GitHub 安装,支持主流 AI 宿主环境。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

tldraw Desktop Canvas API

Programmatically create and modify diagrams on the tldraw desktop app via its local HTTP API at http://localhost:7236.

IMPORTANT: Always use curl for all API calls. Do NOT use fetch, wget, or any other HTTP client.

Workflow

1. curl -s http://localhost:7236/api/doc                          → list open docs (get DOC_ID)
2. curl -s http://localhost:7236/api/doc/{id}/shapes              → read current shapes
3. curl -s -X POST http://localhost:7236/api/doc/{id}/actions     → create/modify shapes
4. curl -s http://localhost:7236/api/doc/{id}/screenshot -o f.jpg → verify result visually

Always verify your work with a screenshot after making changes. Prefer small, incremental batches.

Overlap Check — MANDATORY after every batch of changes

After creating or modifying shapes, you MUST:

  1. Take a screenshot and visually inspect for overlapping shapes, crossing arrows, or crowded text
  2. If overlaps or readability issues are found, fix them using place, move, stack, align, or distribute
  3. Take another screenshot to confirm the fix
digraph overlap_check {
    "Make changes" -> "Screenshot";
    "Screenshot" -> "Overlaps or crowding?" [label="inspect"];
    "Overlaps or crowding?" -> "Fix layout" [label="yes"];
    "Fix layout" -> "Screenshot";
    "Overlaps or crowding?" -> "Done" [label="no, clean"];
}

Common overlap fixes:

  • Shapes stacked on top of each other → use stack with gap: 80 or place with sideOffset: 80
  • Arrows crossing through unrelated shapes → move the blocking shape out of the path, or use kind: "elbow" for right-angle routing
  • Text labels overlapping → make shapes wider (resize or update with larger w) or increase gap between shapes
  • Dense diagrams → split into rows/columns using stack + align, or increase spacing with distribute

Quick Reference

Endpoints

MethodEndpointDescription
GET/api/docList open docs. Filter: ?name=
GET/api/doc/:id/shapesAll shapes on current page
GET/api/doc/:id/screenshotJPEG capture. `?size=small\medium\large\full`
POST/api/doc/:id/actionsStructured actions (see below)
POST/api/doc/:id/execRun arbitrary JS against tldraw Editor

Shape Types

TypeKey Properties
rectangle, ellipse, triangle, diamond, hexagon, pill, cloud, star, heart, pentagon, octagon, x-box, check-box, trapezoid, parallelogram-right/left, fat-arrow-right/left/up/downshapeId, x, y, w, h, color, fill, text, note
textshapeId, x, y, anchor, color, fontSize, maxWidth, text
arrow`shapeId, fromId, toId, color, kind (arc\elbow), text, bend`
lineshapeId, x1, y1, x2, y2, color
noteshapeId, x, y, color, text (sticky note)
pen`shapeId, points:[{x,y}], color, style (smooth\straight), closed, fill`

Colors: red, light-red, green, light-green, blue, light-blue, orange, yellow, black, violet, light-violet, grey, white Fill: none, tint, background, solid, pattern Anchor (text): top-left, top-center, top-right, center-left, center, center-right, bottom-left, bottom-center, bottom-right

Actions

POST to /api/doc/:id/actions with {"actions": [...]}. All actions in one request = single undo step.

ActionPayload
create{"_type":"create","shape":{...}}
update{"_type":"update","shape":{"shapeId":"id","_type":"rect",...changed props}}
delete{"_type":"delete","shapeId":"id"}
clear{"_type":"clear"}
label{"_type":"label","shapeId":"id","text":"new text"}
move{"_type":"move","shapeId":"id","x":N,"y":N,"anchor":"center"}
place{"_type":"place","shapeId":"id","referenceShapeId":"ref","side":"right","align":"center","sideOffset":20}
align{"_type":"align","shapeIds":[...],"alignment":"center-horizontal"}
distribute{"_type":"distribute","shapeIds":[...],"direction":"horizontal"}
stack{"_type":"stack","shapeIds":[...],"direction":"vertical","gap":20}
resize{"_type":"resize","shapeIds":[...],"scaleX":2,"scaleY":1.5}
rotate{"_type":"rotate","shapeIds":[...],"degrees":45}
bringToFront{"_type":"bringToFront","shapeIds":[...]}
sendToBack{"_type":"sendToBack","shapeIds":[...]}
pen{"_type":"pen","shapeId":"id","points":[{"x":0,"y":0},...],"color":"black","style":"smooth"}

place sides: top, bottom, left, right align options: top, center-vertical, bottom, left, center-horizontal, right

Best Practices

  • Always use curl for all HTTP calls — no exceptions
  • Default shape size: ~300x200 with ~200 gap between shapes
  • Connect shapes with arrows: use fromId/toId — arrows stay attached when shapes move
  • Prefer high-level actions (place, stack, align) over manual coordinate math
  • Batch actions in a single POST for atomic undo/redo
  • Use place to position shapes relative to each other instead of calculating coordinates
  • Default styles: black, medium, draw style, centered text, no fill — unless there's a reason to change
  • Fill recommendations: none for outlines, solid for tinted backgrounds
  • Screenshot after changes to verify layout and check for overlaps
  • Assign readable shapeIds (e.g., "auth-box", "db-node") for easier reference
  • Large diagrams (7+ shapes): build in stages — create a few shapes, screenshot, adjust layout, then add more

Example: Creating a Flowchart

DOC_ID="your-doc-id"
BASE="http://localhost:7236/api/doc/$DOC_ID"

# Create shapes + connect with arrows in one call
curl -s -X POST "$BASE/actions" \
  -H "Content-Type: application/json" \
  -d '{
    "actions": [
      {"_type":"create","shape":{"_type":"rectangle","shapeId":"start","x":100,"y":100,"w":300,"h":200,"text":"Start"}},
      {"_type":"create","shape":{"_type":"diamond","shapeId":"decision","x":100,"y":400,"w":300,"h":200,"text":"Condition?"}},
      {"_type":"create","shape":{"_type":"rectangle","shapeId":"end","x":100,"y":700,"w":300,"h":200,"text":"End"}},
      {"_type":"create","shape":{"_type":"arrow","shapeId":"a1","fromId":"start","toId":"decision"}},
      {"_type":"create","shape":{"_type":"arrow","shapeId":"a2","fromId":"decision","toId":"end","text":"Yes"}}
    ]
  }'

# MANDATORY: Screenshot to check for overlaps
curl -s "$BASE/screenshot?size=medium" -o screenshot.jpg
# Inspect the screenshot — if shapes overlap or arrows cross, fix with place/move/stack

Exec API

For advanced operations not covered by structured actions:

curl -s -X POST "$BASE/exec" \
  -H "Content-Type: application/json" \
  -d '{"code": "return editor.getCurrentPageShapeIds().size"}'

Full SDK docs available at: curl -s http://localhost:7236/api/llms

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.7%
按下载量换算106

Claude

28.82%
按下载量换算81

Cursor

21.12%
按下载量换算60

Gemini CLI

9.29%
按下载量换算26

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills