Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Prototype Canvas

ASecurity

Start and operate the local tldraw design canvas that shows HTML artboards. Launch the dev server against a project's board folders, add or switch boards, drive shapes through the bounded window.snapCanvas bridge, and act on annotated screenshots of the canvas. Use when asked to open/launch the canvas, put a mockup on the canvas, annotate or draw on it, fix overlapping frames after a layout.json edit, or respond to a screenshot of the canvas with notes drawn on it.

76 stars
0 votes
0 copies
0 views
Added 9/19/2026
designjavascriptrustjavabashgit

Works with

claude codecli

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add ReScienceLab/super-prototyping --skill prototype-canvas --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prototype Canvas?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Prototype Canvas
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/resciencelab-prototype-canvas/badge)](https://www.skillsdirectory.com/skills/resciencelab-prototype-canvas)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: prototype-canvas
description: Start and operate the local tldraw design canvas that shows HTML artboards. Launch the dev server against a project's board folders, add or switch boards, drive shapes through the bounded window.snapCanvas bridge, and act on annotated screenshots of the canvas. Use when asked to open/launch the canvas, put a mockup on the canvas, annotate or draw on it, fix overlapping frames after a layout.json edit, or respond to a screenshot of the canvas with notes drawn on it.
license: Apache-2.0
compatibility: Requires bun and the sp-canvas command from super-prototyping-tools. A modern browser to view the canvas.
---

# Prototype canvas

A local tldraw app that discovers every `.html` file under
`mockups/canvases/<slug>/` and renders it as a shape. There is no shape map
to edit and no code change needed to add a board.

The app ships with this plugin and is installed outside your project. Your
boards stay in your project. `sp-canvas` joins the two, so upgrading the
plugin replaces the app and never touches a board you wrote.

## Start

```bash
sp-canvas start
```

Not found? `sp-canvas` installs separately from the plugin, which cannot run
an installer of its own: `uv tool install
"git+https://github.com/ReScienceLab/super-prototyping#subdirectory=tools"`.

That is the whole thing. It finds the bundled app, installs its dependencies
on first run, boots the dev server on 127.0.0.1:5173, waits for the port to
actually bind, and prints the address.

- **Boards** default to `./mockups/canvases` under the current directory.
  Point somewhere else with `--canvases DIR` or `PROTOTYPING_CANVASES_DIR`.
- **Port** with `--port N`. A port that already answers is never reused: it
  may be another project's canvas, so `start` refuses rather than showing you
  the wrong boards.
- **Two projects can run two canvases.** Everything is keyed by port — the
  session name, the log, the pidfile — so a second `start` on a free port
  leaves the first one alone. `stop` and `status` take `--port` for the same
  reason, and `stop` only ever kills the canvas it started.
- `sp-canvas root` prints which copy of the app it found — and with `-v`,
  everywhere it looked. The first thing to run when the canvas is not what
  you expected.
- Deep-link a page with `?canvas=<slug>`, e.g.
  `http://127.0.0.1:5173/?canvas=notion-ios`, and one board of it with
  `#<file>` after that, e.g. `?canvas=notion-ios#02-search-ask-ai`: it opens
  in the inspector with the camera on it. Give the board link when pointing
  at one screen.
- **Read a board as a web page.** The "Export to Figma" button in the top bar
  opens every board of the page in one scrolling document, each at its own
  size, at `sheet.html?canvas=<slug>`; the button in the bottom right of the
  inspector's preview opens the one board it is showing, at
  `/board/<slug>/<file>.html`. Both are ordinary addresses serving the board's
  own HTML, so they can be linked, reloaded, and read by the browser
  extensions — a Figma importer, say — that refuse to work on a generated
  page. This is where to read type at the size it ships at, rather than at
  whatever the canvas is zoomed to. The sheet opens on what to do with it: the
  html.to.design browser extension, which captures a localhost page that the
  Figma plugin's own servers cannot reach, and the paste or plugin route from
  there into a file.

Keep it on loopback. This is a local design tool, not a service to expose.

A project with no boards yet opens on a notice naming the directory the
canvas resolved, rather than an empty grid: an empty boards folder and a canvas
pointed at the wrong one look identical otherwise.

**A folder created after boot appears on its own.** The dev server watches the
boards directory and rebuilds its index when a board folder or file is added
or removed. Rewriting a board reloads the page onto the new version, so a
generator can be re-run with the canvas open. If a `?canvas=<slug>` link still
matches no page, the folder has no `.html` file in it yet — an empty folder is
not a board.

The styles panel is hidden by default; toggle it from the toolbar. Always-snap
is on by default. The setting is per browser, so turning it off in tldraw's
preferences menu sticks.

## Boards

One folder under the boards directory = one tldraw page; one `.html` file =
one shape. Switch with the page menu at the top-left; do not build a separate
switcher. `references/layout.md` has the `layout.json` schema, the caption
rules, and the 478 × 980 / sandbox constraints every artboard lives under.

**After editing `layout.json`, right-click the canvas and choose Force
refresh.** Shape creation is idempotent. It fills in what is missing but never
moves a shape that already exists, so inserting or reordering a row entry
leaves the old shape at its old position, overlapping the new one. Force
refresh deletes every `canvas-file` / `canvas-row-heading` /
`canvas-file-label` shape on all pages and rebuilds them from the current
files. Content-only edits to a placed file do **not**
need it: the dev server reloads the canvas onto the rewritten board.

## Drive the canvas

Prefer the bounded `window.snapCanvas` bridge over mouse-coordinate
automation or exposing tldraw's full `Editor`.

```js
window.snapCanvas.describe()
window.snapCanvas.dispatch({ op: 'get' })
window.snapCanvas.dispatch({ op: 'create', shapes: [{
  type: 'text', x: 80, y: 80,
  props: { richText: { type: 'doc', content: [
    { type: 'paragraph', content: [{ type: 'text', text: 'Note' }] }] } },
}]})
window.snapCanvas.dispatch({ op: 'select', ids: ['shape:example'] })
window.snapCanvas.dispatch({ op: 'zoom',   ids: ['shape:example'] })
window.snapCanvas.dispatch({ op: 'undo' })
```

Call `describe()` before generating commands, and use the ids and bounds that
`get` returns. Never guess screen coordinates. Batch related shape changes
into one dispatch.

Never let bridge commands inject arbitrary JavaScript, never load untrusted
HTML into a board, and never add `allow-same-origin` to the artboard iframe.

## Annotated screenshots

The review loop is a screenshot of the canvas with notes drawn on it, pasted
into chat. Boxes, arrows or numbers all work, from tldraw's own draw/text
tools or any image annotator.

1. Treat each annotation as an exact visual target, and say back what you read
   it as ("box 2: tighten the card gap") before touching anything.
2. Read the surrounding UI and the HTML source before editing.
3. Make the smallest source change that satisfies it.
4. Let the canvas reload, then verify the same region visually.

Do not build an annotation-to-agent protocol. The screenshot is the bridge.

## The chat panel

The canvas has a panel on the left when it runs from `sp-canvas start`: a
message to Claude Code or Codex — the mark on the header picks — run in the
project, Claude with its permission prompts off and Codex in its workspace
sandbox, and what it did as it happens. The panel names the canvas that is
open and tells the agent, and points the agent at this skill before it
touches a board folder. A
board it rewrites reloads the canvas as any rewrite does; the panel keeps its
runs across the reload, and its history button lists the runs the server
still holds.

Each message is a fresh `claude -p` or `codex exec` with no memory of the
last, so repeat what matters. A server started by hand needs `PROTOTYPING_PROJECT_DIR` set to the
project, or the panel says it cannot run; `sp-canvas start` sets it.

## State and persistence

The document lives in the browser's IndexedDB under `PERSISTENCE_KEY` in the
app's `src/App.tsx`. A board's identity is its path key, so renaming a folder
or a file orphans that board's shapes; Force refresh rebuilds them.
Ordinary layout drift is what refresh is for, not a persistence-key bump.

## Working on the canvas app itself

Only when changing the app, not when using it. `sp-canvas root` prints the
checkout to work in.

```bash
cd "$(sp-canvas root)/canvas"
bun run lint && bun run test && bun run build
```

Then, in a fresh browser session: each board page loads with its frames,
headings and captions; the frames stay independently selectable; the inspector
opens on the board you click; Force refresh rebuilds a board cleanly.

Board discovery is a generated module, not an `import.meta.glob` — see the
`prototyping-canvases` plugin in `canvas/vite.config.ts`. Bump
`PERSISTENCE_KEY` **only** when a change would leave existing documents
inconsistent with the code, such as a shape's props changing shape; a bump
discards every persisted hand-drawn annotation.

Attribution

ReScienceLabReScienceLab
View sourceMore from ReScienceLab →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Responsive Design

Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.

393432 votes

Mermaid Diagrams

Creating and refining Mermaid diagrams with live reload. Use when users want flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, or any other Mermaid visualization. Provides best practices for syntax, styling, and the iterative workflow using mermaid_preview and mermaid_save tools.

2032 votes

sleek-design-mobile-apps

Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects. Covers high-level requests ("design an app that does X") and specific ones ("list my projects", "create a new project", "screenshot that screen").

5711 votes

swiftui-design-skill

SwiftUI frontend visual design skill. Creates beautiful, distinctive iOS/macOS interfaces that avoid generic AI slop patterns. Covers design direction, layout systems, typography, color, spacing, brand integration, and design review. Use when designing new SwiftUI views, reviewing UI quality, creating iOS prototypes, choosing visual styles, improving app aesthetics, or when the UI looks generic or AI-generated.

1801 votes

Ios Hig

Use when designing iOS interfaces, implementing accessibility (VoiceOver, Dynamic Type), handling dark mode, ensuring adequate touch targets, providing animation/haptic feedback, or requesting user permissions. Apple Human Interface Guidelines for iOS compliance.

761 votes
View all in design →