/spec-to-canvas:spec-to-canvasfrom spec-to-canvas
Take a product from a PRD or spec to a buildable design canvas drawn on the real app (coverage matrix, one board per capability, NEW / PARTIAL markers, states with Entry and Data, screen and feature IDs, a canvas-states.json manifest). Has a memory of lessons from earlier runs that it reads first and extends last. Use when the user asks for a mockup or design canvas of a feature set, for a coverage matrix, for a Before / After comparison with the running app, for what is built against a design, or for a rebrand of existing boards. Building the canvas into the app is /canvas-to-app. Works on any web app.
Ships in spec-to-canvas. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Seventeen rules make this work. Each one exists because skipping it produced bad output.
This skill ends at a published, linted, buildable canvas and its canvas-states.json manifest. Building it into the app is the sibling plugin /canvas-to-app (rules 12 and 16 are its acceptance; they stay here so the boards are drawn to meet them).
done, done, part blocked, done, part open, open, blocked. Never round "partly" up.references/board-anatomy.md.meridian-register.js → COP-014), and the board and the app read that same file, so numbers cannot drift. Each control carries one line on what it does (data-does), or a LATER tag (data-later + .latertag) when it is shown only as future, so nobody builds a fake. At most 6 states per board; a board that needs more is split into smaller boards (register, COP page, remaining), one buildable screen each. Standard: references/board-anatomy.md section 9; the lint enforces it.?view=, ?raw=, ?state= or hash shortcut never counts); the same text in every panel as the board; 1 % or less pixel difference against the board render; zero "Not built yet" controls (LATER controls excepted). A drawn (generated) state is allowed only as a temporary stand-in and shows as failing in the harness. The sample project the boards use stays in the app's project list, so the owner can compare app and board side by side. Enforced by /canvas-to-app ("State gate").S01, S02… (one per board = one buildable screen); feature IDs F101, F123… (one per PRD row, never reused, never renumbered). The board root carries data-screen="S03"; each story, NEW / PARTIAL marker and data-does control carries data-feature="F123" that is listed in the board's Stories. The built app carries the same data-screen on the screen root and data-feature on the controls, so the harness, commits, the handoff and the tracker all point at the same thing. A feature with no screen, or a screen with no feature, fails the matrix (Phase 3).Memory lives outside the plugin, so a plugin update keeps it: $CANVAS_TO_APP_MEMORY, default ~/.claude/canvas-to-app-memory/. The path keeps its old name on purpose: /canvas-to-app (the build skill) reads and writes the same memory, so drawing and building learn from each other.
lessons.md: rules learned from real runs, each with its evidence. Themed sections, then an Inbox.projects/<slug>.md: one file per app: repo, handoffs, owner rules, known traps, how the run went.memory-seed/ in the plugin holds the first copy (yraverageMilestone, Solvarium). scripts/memory.mjs init copies it in only where a file is missing; it never overwrites.Commands (from scripts/): node memory.mjs show [project], add --lesson "..." --evidence "..." [--project x], note --project x --text "...", self-check.
node scripts/memory.mjs show <project-slug>. If the app is new, run it without a slug.docs/handoff/<slug>.md, docs/roadmap/<slug>.md). Memory is general; the handoff is the live state.Before capturing or drawing anything, ask once with AskUserQuestion:
Include the Before design (today's app) next to the After design?
- After only (default): boards show the new design. No Before capture, no toggle. Pick this if the user does not answer.
- Before and After: each board gets a Before | After toggle. Before is a real screenshot.
When the canvas ports, matches or answers another product (a competitor, a reference app, a training video, a brochure), ask a second question in the same AskUserQuestion call:
Add snapshots of the reference UI at the bottom of each board?
- Yes (recommended when a reference exists): every board gets a "Reference: the original UI" strip under the window and aside: 1 to 6 cropped frames or screenshots of the reference screen that board matches, each with a one-line caption. See
references/board-anatomy.mdsection 8.- No: boards only. Pick this if the user does not answer or there is no reference product.
Always ask a third question in the same AskUserQuestion call (rule 13):
Claude Design canvas is always made. Also keep an offline HTML copy?
- Claude Design only (default): boards live in the Design canvas; no local HTML. Pick this if the user does not answer.
- Also offline HTML: the same boards as one static file (
spec-to-canvas-nohtmloutput), built from the SAME generator so both stay identical, and registered per the user's global rule.
Record all answers in the status board and the project memory. If After only: skip Phase 2 captures that exist only for Before (keep the chrome slices), and run the lint with --after-only.
Find these before anything else. Ask only for what cannot be found.
scripts/prd_status.mjs reads it)DESIGN.mdNever type a production password. Use the app's local mode or the repo's test stub.
ffmpeg -v error -y -i in.mp4 -vf "fps=4,mpdecimate=hi=64*40:lo=64*12:frac=0.2" -vsync vfr out_%03d.jpgscripts/capture.mjs for every top-level tab or group and every screen a board maps to, at 1600x900, scale factor 1. It stores screenshots and page text.scripts/slice_chrome.py to cut top, rail and status strips. Measure the crop lines from the DOM.Build a table before drawing: feature ID (F…), requirement family, screen ID (S…), board, real screen, sample data file. Every feature must land on a screen or be marked out of scope with the reason; every screen must hold at least one feature (rule 17). Assign IDs here, once; later runs only append. Check it with scripts/prd_status.mjs.
One board per capability. Start from references/board-template.dc.html and meet every item in references/board-anatomy.md (header with Extends and Lives in; markers NEW / PARTIAL with Exists and Missing; callout notes on the window; five aside cards: What it must show, Motion, Stories, Where it lives, States; screen and feature IDs). Each board has:
data-does="<one line>", or data-later="<what it will do>" plus a LATER tag (rule 15)src/sample/meridian-register.js); the generator imports those files instead of typing values into the board, so board and app cannot driftA status board comes first: totals, one row per board, links, what is still missing.
On a Claude Design canvas, keep originals on their own page and add a new page. Send only new or changed files. Upload images as assets and use the returned /_blob/ URL verbatim.
Read from a finished 64-board canvas (yraverageMilestone feature windows). Copy it.
project/canvas.json (v3 index) plus one project/<ID>-<slug>.dc.html per board. Ids by family: U workspace, F feature, R ribbon tab, H home. Main.dc.html is the cover, Index.dc.html lists every story and its board.canvas.json: title, launch.view = "canvas", pages, boards{file:{x,y,w,h,title}}, order[], notes{id:{x,y,text,kind:"title1",maxW}} for tier headings, designSystems.h from the render check, not by guess.<x-dc> with a <helmet> (font link, :root tokens, styles), one root div of fixed width 1640, then <script type="text/x-dc" data-dc-script data-props='{"$preview":{"width":1640,"height":H}}'> holding class Component extends DCLogic { renderVals(){ return {}; } }. Before / After buttons go through this class.canvas.json only when layout or order changes.Artifact action: quickstart, intent: design (design_systems: false unless the app has a Design System artifact). Then publish with the returned type_url, a title, no files, auto_open: "after_first_write". Keep the returned url; every later call uses it, never type_url again.asset: true, file_paths, up to 25 per call). Save the path -> /_blob/<id> map as blobs.json beside the generator, so a rebuild reuses the same ids.build.mjs) that writes the boards. It emits the .dc.html files under <root>/project/ with /_blob/ urls, board links as <a href="<ID>.dc.html">, heights from the render check (heights.json), and canvas.json. When offline HTML was chosen, the same generator writes the static file too.canvas.json + Main.dc.html first (root, file_path, files), then the rest. Later changes: rebuild, publish only the changed boards.ArtifactComments when asked. Fix in the generator, re-publish the changed boards. A publish refused because the owner edited a board: read their version, merge into the generator, publish again.url into the app's handoff and project memory. It is private until the owner shares it; say so.Find the plugin root once: newest ~/.claude/plugins/cache/yra-skills-public/tastestack/*/, else the tastestack plugin directory (call it <ts>). Never use <ts>/vendor/, never run the impeccable CLI.
tastestack:tastemaker-direction): one line per decision (density, hierarchy, type scale, colour roles, motion) with its reason, from the app's archetype. The app's own tokens still win (rule 3); direction picks how to use them.tastestack:impeccable, <ts>/skills/impeccable/reference/critique.md + audit.md): score it, fix P0 to P2 before showing it. Keep the score per board for the status board.Design gate (rule 14), before the anatomy lint:
node "<ts>/skills/tastemaker-guard/scripts/slop-scan.mjs" <files> --fail-on error. Quote the score N (letter) · E errors · W warnings line; 0 errors, each warning fixed or explained.node "<ts>/skills/tastemaker-tokens/scripts/contrast.mjs" <fg> <bg>; body text 4.5:1, large text 3:1. Quote the ratios.tastestack:tastemaker-audit on that board, apply its P0 to P2 fixes, reply on the thread with the before and after score.Run node scripts/lint_boards.mjs <boards-dir> [--after-only] --manifest <app>/canvas-states.json first: it fails a board without notes, markers, the four aside cards, a data-screen ID, feature-ID stories, a data-feature on every marker and data-does control that is listed in Stories (rule 17), an Exists/Missing line per Partial story, or the toggle the user asked for, and (rule 15) a board without a States card, a state without Entry or Data, a switch button with no States row, more than 6 states, a control without data-does / data-later, or a data-later without its LATER tag. --manifest writes every board's states, entries, data sources and controls to one JSON file: that file is the checklist the app harness must cover when /canvas-to-app builds it. Then run scripts/render_boards.mjs on every board. It fails on console errors, broken images and horizontal overflow, and it records heights for the canvas index. Then look at contact sheets yourself. Click Before on at least one board.
Report what was not checked. A passing script does not prove the design is right.
Building is not part of this skill. When the user asks to build, or the canvas is approved:
url, the generator and its sample data files in the app repo, canvas-states.json from the Phase 5 lint, the status board.docs/handoff/<slug>.md) under "Canvas"./canvas-to-app with the canvas url (or the generator folder). It reads the manifest, maps the codebase, builds screen by screen and runs the State gate (rule 16).Do this at the end of every run, also a short one. It takes two minutes.
lessons.md first. Skip what is already there.node scripts/memory.mjs add --lesson "..." --evidence "<commit, file or session>" --project <slug>node scripts/memory.mjs note --project <slug> --text "...". Owner rules, claimed files, failing gates, open owner decisions, URLs.lessons.md directly. Memory that cannot be corrected goes stale..claude-plugin/plugin.json./spec-to-canvas:spec-to-canvas-nohtml: one static HTML page, no interaction./spec-to-canvas:spec-to-canvas-html: interactive HTML design canvas (multi-board, toggles, click handlers)./canvas-to-app (separate plugin): builds any canvas into the app.All three ask the Before / After question first (and the reference-snapshot question when there is a reference product) and share references/board-anatomy.md.
Done means every row in scope has a board or a stated reason, every board passes the design gate, the anatomy lint and the render check, canvas-states.json is written, the canvas is published, the status board matches the requirement table, and Phase 7 ran. "Mockup looks good" is not done. Built status comes only from /canvas-to-app and its State gate: say plainly when a row is only drawn.
Give one link per change; the canvas link is always the Claude Design url (plus the offline file link when that was chosen). Say what you added to memory (count, one line each). List what was skipped or unchecked, and any risk, in one or two lines.
references/board-anatomy.md (opens in a new tab)references/board-template.dc.html (opens in a new tab)scripts/capture.mjs (opens in a new tab)scripts/lint_boards.mjs (opens in a new tab)scripts/memory.mjs (opens in a new tab)scripts/prd_status.mjs (opens in a new tab)scripts/render_boards.mjs (opens in a new tab)scripts/slice_chrome.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub yravg/yra-skills-public --plugin spec-to-canvas3 skills in this plugin
/spec-to-canvas-htmlDraw a product's screens as an INTERACTIVE HTML design canvas (many boards on a canvas, Before/After toggle when wanted, working click handlers, notes). Same board standard as spec-to-canvas. Use when the user wants a Claude Design canvas or an interactive HTML canvas they can click through and comment on./spec-to-canvas-nohtmlDraw a product's screens as ONE static HTML page, no interaction, no canvas runtime, AND publish the same boards to a Claude Design canvas (always, rule 13 of spec-to-canvas). Same board standard as spec-to-canvas (NEW and PARTIAL markers with where, callout notes, stories, where it lives). Use when the user wants a single HTML file to read, share or print, next to the commentable Design canvas.