/rea-skills:ui-canvasfrom rea-skills
Creates a local browser preview of UI component mockups that the human can visually edit (move, resize, restyle) before you commit changes. Use for visual feedback loops on any component.
Ships in rea-skills. 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.
None: SKILL.md is the whole skill.
Approve-before-you-build loop for user interface work: you write a quick, self-contained HTML mockup of the component, the human opens it in the browser and adjusts it by hand like a website builder, and Save and Finish hands you the exact result to wire into the real code. Nobody has to rebuild and rerun the whole app to check a padding change.
Any component qualifies: a card, a sidebar, a modal, a settings pane, a single button state, an animation, a page section. Any harness qualifies: the loop is a CLI that prints JSON.
Shares its server, state, and hooks with plan-canvas (inspired by
lavish-axi by @kunchenguid).
Editing conventions follow
VisBug and
Onlook: Enter/Shift+Enter walk the
tree, Delete removes, an edit/interact mode switch.
/ui-canvas, a preview, a mockup, "show me first".Do NOT use for: plan or document review (/plan-canvas), running the real
app, remote URLs, or components you cannot render as plain HTML/CSS/JS in one
file. The canvas serves local files only.
Invoke the CLI as ecc-ui-canvas (bin from the ecc-universal package, on
PATH after a global or plugin install; node "$CLAUDE_PLUGIN_ROOT/scripts/ui-canvas.js"
also works). It runs the same detached loopback server as plan-canvas
(127.0.0.1:4517), keyed by artifact path; there are no session ids.
Write one self-contained .html file (for example .claude/previews/<name>.html
or next to the component): markup, a <style> block, and any <script> the
component needs to behave (tabs, toggles, open/close, animation). Rules:
id or a distinctive class. The canvas records
every human edit against a CSS selector; stable names make the export map
cleanly back to your code.max-width, same
states. The canvas renders at true CSS-pixel viewport sizes, so media
queries behave exactly as they would in the app.data: URI or an inline SVG also works.ecc-ui-canvas open .claude/previews/pricing-card.html --viewport desktop --title "Pricing card"
ecc-ui-canvas await .claude/previews/pricing-card.html # run in the background; leave it running
--viewport takes mobile (393×852), desktop (fills the window), custom,
or exact WxH such as 1024x768. Run await in the background if your
harness time-limits foreground commands; re-run it if interrupted, queued
feedback is never lost. While it runs, the canvas shows "
listening" so the human knows you are connected.
await prints JSON when the human acts. Items:
{ "kind": "chat", "text": "change this to dark gray in the brand colors",
"anchor": { "selector": "#pricing-card", "tag": "article", "snippet": "Most popular Team plan…", "size": { "width": 720, "height": 388 } },
"pendingEdits": ["resized img.art to 220px wide, 220px tall (was 260×260)", "removed button.btn.secondary"] }
chat is a request. anchor is the element the human had selected when
they sent it; pendingEdits summarizes hand edits they have made that are
not yet in your file. Make the requested change in the mockup file.
The preview reloads within a second and re-applies their pending edits on
top, so do not bake pendingEdits into the file yourself: they are
context, and doubling them up would misplace things. Answer in the canvas
and keep listening with one command:
ecc-ui-canvas await <file> --reply "Background is now var(--gray-800) from the brand tokens."
Speed matters here. Run ecc-ui-canvas typing <file> --state thinking
the moment you start, edit the file, then reply. Under two seconds from
request to repaint is the target for a one-property change.
{ "id": "fb-123", "kind": "edits", "editCount": 3, "edits": [ { "kind": "resize", "selector": "img.art", "width": 220, "height": 220, "before": { "width": 260, "height": 260 } } ],
"viewport": { "preset": "mobile", "width": 393, "height": 852 },
"exportPath": "/abs/.claude/previews/pricing-card.apply-mf3k2x-9a1c.edited.html", "editsPath": "/abs/.claude/previews/pricing-card.apply-mf3k2x-9a1c.edits.json" }
edits means the human clicked Apply to file: they want their hand
edits written into the mockup now. Replace the mockup file with the
contents of exportPath (it is the full DOM they are looking at, with
their inline-style changes), tidy it into real CSS if it is messy, keep it
self-contained, and reply. Each Apply writes its own
<name>.apply-<batch>.* pair, so a queued earlier batch keeps its own
snapshot. The canvas keeps showing submitted edits until it recognizes the
exact exported snapshot or you explicitly acknowledge the incorporated batch.
After incorporating a batch, acknowledge its feedback ID with
ecc-ui-canvas await <file> --ack fb-123 --reply "Applied the requested changes.".
Multiple IDs may be comma-separated. Do not acknowledge a queued batch while
answering an earlier chat. Exact copies of exported snapshots are recognized
automatically; an unrelated file save is not acknowledgment. If a submitted
batch no longer matches the file, resolve it before applying more changes.{ "kind": "finish", "editCount": 5, "edits": [ "…" ], "viewport": { "preset": "desktop", "width": 1412, "height": 806 },
"exportPath": "…/pricing-card.edited.html", "editsPath": "…/pricing-card.edits.json" }
finish means the human clicked Save and Finish. The session is over
(sessionEnded: true). Read exportPath, diff it against your original
mockup, read editsPath for the intent behind each change, and reproduce
that exact look in the real component with full functionality: real
tokens, responsive rules, accessible markup, the project's framework.
Then commit per the repo's rules and report in chat. Do not reopen the
canvas.Edit kinds you will see in edits: text (before/after, plus htmlAfter
when inline markup was kept), resize (border-box px), move (from/to
parent selector and index), nudge (dx/dy px offsets the human applied by
dragging with Alt or arrow keys; translate to margin or alignment, not
position: relative), remove, and style (property, computed before,
after; after: null means they deleted the property, so border → none,
box-shadow → none, padding → 0). An edit flagged stale: true could not be
re-applied after one of your reloads; ask about it rather than guessing.
ecc-ui-canvas end <file> closes a session you opened and no longer need.
{"status":"ended","endedBy":"user"} means the human closed it without
saving: stop polling and do not reopen unless asked (open --reopen).
Edit mode (default): click selects, with hover and selection outlines and a size badge; double-click edits text; corner and edge handles resize (images keep their ratio unless Shift is held); dragging reorders among siblings or into another container with an insertion marker; Alt-drag or arrow keys nudge (Shift for 10 px); Delete or Backspace removes; Enter steps into the first child, Shift+Enter to the parent, Tab between siblings; Cmd/Ctrl+Z and Shift+Cmd/Ctrl+Z undo and redo. The inspector shows the selected element's breadcrumb and grouped slider rows (size, fill, text, spacing, border, effects). Drag a slider, or double-click a value to type one (sanitized and clamped; arrow keys step). A color swatch opens hue, saturation, lightness, and alpha sliders; the hex field also takes rgb() or a color name; the x button clears a property.
Interact mode (Cmd/Ctrl+I): clicks, hovers, and keyboard reach the component so they can try the tabs, toggles, and animations exactly as a user would. A pause button freezes animations and transitions for inspection.
Viewport bar: desktop (fills the stage), mobile (iPhone-class 393×852 with a device frame), or exact width × height; a rotate button swaps the two. The preview scales down only when the stage is smaller than the chosen size, never the other way, so media queries are honest.
.html file per component. Markdown is not accepted;
use plan-canvas for documents.open to refresh.pendingEdits from a chat item into the file. Apply edits
only from an edits or finish payload, from exportPath.await --reply), not only in the terminal, while the
session is open..edited.html and .edits.json files (including the
per-Apply .apply-<batch>.* pairs) are review artifacts, not production
code. Do not commit them unless the repo keeps previews; delete the
.apply-* pairs once the mockup is updated.ECC_PLAN_CANVAS_IDLE_MS), and keeps state in ~/.claude/plan-canvas/
(ECC_PLAN_CANVAS_STATE_DIR). ECC_CANVAS_AGENT overrides the detected
harness name shown in the browser.Redesign with preview before commit
# user: "Make the pricing card friendlier, then show me before you commit."
# → write .claude/previews/pricing-card.html using tokens from src/styles/tokens.css
ecc-ui-canvas open .claude/previews/pricing-card.html --title "Pricing card"
ecc-ui-canvas await .claude/previews/pricing-card.html
# → {"status":"feedback","items":[{"kind":"chat","text":"change this to dark gray in the brand colors","anchor":{"selector":"#pricing-card",…},"pendingEdits":[…]}]}
ecc-ui-canvas typing .claude/previews/pricing-card.html --state thinking
# → edit the file: background: var(--gray-800)
ecc-ui-canvas await .claude/previews/pricing-card.html --reply "Card background is now --gray-800."
# → {"status":"feedback","sessionEnded":true,"items":[{"kind":"finish","editCount":5,"exportPath":"…/pricing-card.edited.html",…}]}
# → read the export, port the look into src/components/PricingCard.tsx, commit
Mobile check of an existing component
ecc-ui-canvas open .claude/previews/sidebar.html --viewport mobile
ecc-ui-canvas await .claude/previews/sidebar.html
pendingEdits yourself, then watching the canvas apply them
again.--timeout-ms in a loop; leave the plain await running.chat request sit. The human is watching the preview; signal
typing --state thinking and move.*.edited.html or *.edits.json.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ui-preview, visual-editing, mockup, component-preview, design-feedback
npx claudepluginhub smartworldarafath/rea_skill --plugin rea-skills4 plugins ship this exact skill · first indexed Nov 20, 2026
919 skills in this plugin
/accessibilityDesign, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels, accessibility traits and hints, focus management, contrast, target size, and screen-reader support. Use when building or auditing UI for accessibility compliance, keyboard navigation, or screen-reader support./agent-architecture-auditFull-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack./Other plugins' skills for the same job