skills/tldraw-canvas/SKILL.md
Interact with open tldraw desktop canvases via a local HTTP API at localhost:7236. Create, read, update, and delete shapes. Take screenshots. Build diagrams, flowcharts, wireframes, and visual layouts programmatically. Use when the user asks to draw, diagram, sketch, wireframe, create a visual, modify a canvas, add shapes, create a flowchart, create an architecture diagram, or work with tldraw. Also triggers on "draw on canvas", "add to canvas", "update the diagram", "show me on the canvas", or any reference to tldraw files (.tldr).
npx skillsauth add dakdevs/skills tldraw-canvasInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Local HTTP API at http://localhost:7236 for reading and modifying open tldraw canvases.
For full shape types, actions, colors, and exec API details, read references/api-reference.md.
# List all open docs
curl -s "http://localhost:7236/api/doc" | jq
# Filter by name
curl -s "http://localhost:7236/api/doc?name=my-file" | jq
Extract the id field for subsequent calls. If no docs are open, tell the user to open a .tldr file in tldraw desktop.
# Screenshot (save and view with Read tool)
curl -s "http://localhost:7236/api/doc/DOC_ID/screenshot" --output /tmp/canvas.jpg
# Read all shapes as JSON
curl -s "http://localhost:7236/api/doc/DOC_ID/shapes" | jq
Always take a screenshot first to understand the current state before making changes.
curl -s -X POST "http://localhost:7236/api/doc/DOC_ID/actions" \
-H 'Content-Type: application/json' \
-d '{"actions": [...]}'
All actions in one request form a single undo step. Prefer batching related changes.
After changes, take a screenshot to confirm correctness. Make incremental changes and verify frequently.
{"actions": [{"_type": "create", "shape": {"_type": "rectangle", "shapeId": "box1", "x": 100, "y": 100, "w": 200, "h": 80, "color": "blue", "fill": "solid", "text": "Service A", "note": ""}}]}
{"actions": [{"_type": "create", "shape": {"_type": "arrow", "shapeId": "arr1", "x1": 0, "y1": 0, "x2": 100, "y2": 0, "color": "black", "fromId": "box1", "toId": "box2", "text": "", "note": ""}}]}
Use fromId/toId to bind arrow endpoints to shapes — the arrow stays connected when shapes move.
{"actions": [{"_type": "place", "shapeId": "box2", "referenceShapeId": "box1", "side": "right", "align": "center", "sideOffset": 40}]}
top, center-horizontal, bottom, left, center-vertical, right)horizontal, vertical)For operations not covered by the structured API:
curl -s -X POST "http://localhost:7236/api/doc/DOC_ID/exec" \
-H 'Content-Type: application/json' \
-d '{"code": "return editor.getCurrentPageShapes().length"}'
Note: In exec, text props use richText not text. Use toRichText('...') to set text.
shapeId values (e.g., "auth-service", "db-arrow") for easy reference in updates.place action for relative positioning instead of computing coordinates manually.setMyView to navigate the viewport after placing shapes.tools
Create or update a draft pull request for the current branch using `gh` CLI. Triggers on "PR this", "create a PR", "open a PR", "make a PR", "submit PR". Idempotent - always re-assesses the full diff and either creates a new PR or updates the existing one. Creates draft PRs by default; say "do not draft" to create a ready-for-review PR instead.
development
Spin up a Claude agent team for implementation tasks. Use when user says "team go", "agent team go", "agent team", "/claude-agent-team", or wants a coordinated multi-agent approach to a feature or task.
development
Use when the user wants to ensure a task is done the RIGHT way — researching official docs, best practices, and codebase conventions BEFORE writing any code. Invoke this skill whenever the user says 'best practice', 'do it right', 'make sure this is correct', 'research first', 'what's the proper way', or when tackling unfamiliar libraries, complex integrations, migrations, or any task where getting it wrong would be costly. Also use when the user explicitly invokes /best-practices.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.