Product Demo Web: Install, Source and Security

Product Demo Web

Published by sougata-github in earned-ui-skills

No known issues1 installs

What this skill does

Build a product demo for a website as a film made of the product's real components, worked by a scripted cursor, instead of a screen recording, MP4 or GIF. Use when asked for a product demo, a demo video or hero video for a landing page, an animated walkthrough of a feature, a showcase of a component (a chat composer, a model picker, a dashboard, an editor), a Remotion style video that should stay live in the page, or when an existing demo video is heavy, blurry, out of date with the UI, or inac

Add Product Demo Web to your agent

Review the source and files first. When you are ready, copy the prompt instruction or use the CLI command supported by your environment.

Install with a prompt

Paste this into a compatible coding agent:

add this skill "product-demo-web" from https://github.com/sougata-github/earned-ui-skills

Install with the CLI

Run this command in a controlled environment after reviewing the repository:

npx skills add https://github.com/sougata-github/earned-ui-skills --skill product-demo-web

Skill instructions

Product demo films for the web

This skill is a workflow, not a video tool. It carries what it took to get a product demo that plays like a film but is the product itself: real components in the page, worked by a scripted cursor, in both themes, crisp at any size, accessible, and a few kilobytes of code instead of megabytes of video. It ships a small engine to adapt (assets/film.ts, assets/stage.tsx) and the lessons worth not repeating.

It is for websites (a hero, a product page, a feature section, a skill or docs page), not for exporting video files.

Everything the workflow needs is in this skill's own files, the project's own components and what the human says. It never asks the agent to fetch or read outside pages, recordings or screenshots.

The one rule

Show the real thing. The film is the product's own components, the ones that ship, worked the way a person works them. Not a recording, not a screenshot with an animated pointer, not a mockup drawn for the video. A recording goes stale the day the UI changes, blurs on a large screen, is one theme, cannot be read by a screen reader or a search engine, and weighs megabytes. Real components stay true, sharp, themed, readable and light.

It follows that the components are built properly: on accessible primitives (UI SDK, or shadcn/ui on UI SDK), with real roles, names, states and keyboard behaviour. A demo of an inaccessible component advertises an inaccessible component.

The method: a film is a function of time

The script is a list of steps on one clock. frameAt(t) replays them from a fresh state up to t. So every frame is drawn from its time alone:

  • the loop restarts cleanly, with nothing left over from the last pass,
  • a pause resumes exactly where it stood,
  • a recording can start anywhere,
  • and any frame can be reviewed by naming it: ?at=31.5 holds that second.

That last one is the lab. Motion is judged by eye, and "the popup flickers right after the heart" does not survive the round trip through words. A named frame does. Work with the human frame by frame.

Nothing is random and nothing reads the wall clock. Reload twice and it is the same film.

Workflow

Copy this checklist into the response and work through it in order:

Product demo progress:
- [ ] 1. Pick the story: one task, its steps in a person's order, the peak
- [ ] 2. Build the components for real, on accessible primitives
- [ ] 3. One state object, every control controlled by it
- [ ] 4. Write the script
- [ ] 5. Stage it: the clock, the cursor, the marks, the motion
- [ ] 6. Make it accessible: the group, the description, inert, pause
- [ ] 7. The phone: one held frame, no film
- [ ] 8. Review frame by frame with the human
- [ ] 9. Verify against the checklist at the end

1. The story

Pick one task a person does with the product and tell it as they would: open the menu once, make every choice in it, close it by clicking outside, never visit the same control twice for no reason. Then the payoff the task leads to (an answer streaming in, a card landing in Done). Ask the human which task proves the most, and keep it to 30 to 60 seconds.

Name three frames before writing a line: the still (the peak, shown alone under reduced motion), the pose (the poster: the choices visible, nothing open, no cursor) and the hold (what a phone shows instead of the film: the story's outcome, laid out once). Write the copy as practical content for the task (a real looking question gets a real looking answer), as fixed sample data, never presented as the product's real metrics. Details: references/script.md.

2. Real components, on accessible primitives

Build each part the way the product would ship it, at its real size:

PartPrimitive
An action (send, plus, close)Button
A choice of a few (effort, speed, a view)SegmentedControl
A choice among options (providers, a rail)ToggleGroup
On and off (a heart, a tool, dark mode)Toggle
Show and hide (reasoning, a task's steps)Collapsible
A reading in a range (context used)Meter
A person or accountAvatar

From @ui-sdk/react, or shadcn/ui components built on it. Style them with the product's tokens, both themes. Mark every place the cursor goes with data-pk="name", and style a scripted hover and press with data-hover and data-press alongside the real :hover and :active. references/accessibility.md has the mapping and why it matters.

3. One state object

Everything the film changes lives in one plain object (Ui): what is open and since when, what is chosen, how many characters are typed, how many words have streamed. Every control is controlled by it, with a change handler that ignores changes it did not make. React renders from it. The film never sets component state any other way.

4. The script

Write it with script() from assets/film.ts, in the order a person acts:

const film = script<Ui>((f) => {
  f.wait(0.3)
  f.cue(f.now(), (ui) => (ui.shown = true))
  f.wait(1.4)
  f.go("model-trigger", open("model"), 0.55)
  f.go("model-fable", (ui) => (ui.model = "fable"), 0.45)
  f.mark("still")
  f.go("outside", close("model"), 0.55)
  f.mark("pose")
  f.move({ pk: "input" }, 0.7, "text")
  f.click((ui) => (ui.focused = true), 0.2)
  f.type(PROMPT, (ui, count) => (ui.typed = count))
  const sent = f.now()
  f.go("send", (ui) => (ui.sent = true), 0.35)
  f.run(sent + 2.4, 3, (ui, k) => (ui.words = Math.ceil(k * WORDS)))
})

move, click, go and type advance the cursor's clock. cue and run place a beat at any time, so an answer can stream while the hand rests or does something else. Settle times after a click are the reading time.

5. The stage

assets/stage.tsx plays it: useFilm (the clock and when it holds), measure (finds targets by data-pk and measures them live, so the choreography survives any layout), marker (hover and press), Hand and drawHand (the cursor), PauseButton. Your scene's draw(t) calls frameAt, sets React state only when the state changed, and writes everything that moves (the cursor, popups, the scroll) straight to the DOM as transforms. Motion details, with every number: references/motion.md.

6. Accessible

  • The stage is one group: role="group", aria-roledescription="demo", a label, and aria-describedby pointing at a sentence or two that says what the film shows.
  • The film's window is inert while the film owns it: no focus can land in controls the reader cannot drive.
  • One control a reader reaches: pause and play, a UI SDK Button whose name is the action it takes now ("Pause demo", "Play demo").
  • It holds while the tab is hidden or the stage is off screen, and resumes where it stood. Under reduced motion it never plays: the still frame.

references/accessibility.md covers why, the WCAG criteria each answers, and the optional take over (a paused film handing its components to the reader).

7. The phone, and anything narrow

A phone does not play the film. A cursor travelling over a screen that small cannot be followed, menus cover what they change, and a scroll that moves on its own fights the reader's thumb. Set the breakpoint by the stage, not by the site: below the width where the window, its popups and the cursor read at their real size (1024px for a chat window with a 400px menu), pass hold to useFilm. The stage draws that one frame, redraws it when the window resizes, and never plays. No cursor, no pause button, no theme switch, nothing that scrolls. The frame is the outcome (the finished conversation, the card in Done), drawn at the product's own sizes, never scaled, and laid out once from the top. Compose it as a card, not the whole screen: the app's phone width (about 380px), centred, a fixed height (480 to 572px), the type a phone's chat uses, and what does not fit fading out at the end. The player can stay out of the phone's bundle entirely.

8. Review, frame by frame

Show the film and ask, in words like these:

The demo is at /demo/product-demo. Space pauses, R restarts, and ?at=24 holds any second. Tell me what to change by its second, or that it looks right.

Take each note as the human gave it, at the scope named. When a motion bug is reported, open the frame or record it before guessing at a fix.

9. Verify

- [ ] The components are the product's real ones, on accessible primitives
- [ ] The story is one task in a person's order, no control visited twice
- [ ] Reload twice: the same film. Nothing random, no wall clock
- [ ] No jitter: the cursor above everything, moving parts are transforms
- [ ] No layout shift while typing or streaming
- [ ] The scroll glides, follows a stream, and never moves without a reason
- [ ] Both themes, at desktop size, and the phone's held frame in both
- [ ] The stage: a labelled group with a description, its window inert
- [ ] The pause button is reachable by keyboard and names its action
- [ ] It holds in a hidden tab and off screen, resumes where it stood
- [ ] Reduced motion: the still frame, nothing plays
- [ ] Lighthouse accessibility 100 and no axe violations on the page

Say plainly what was not seen in a browser.

Lessons that cost the most time

All of them, with the cause and the fix: references/lessons.md.

  1. A cursor that slides under a popup reads as broken. It lives in its own fixed layer above everything.
  2. Setting React state every frame makes everything jitter. Render state only when it changes. Write motion to the DOM.
  3. A film that accumulates state drifts and cannot be scrubbed. Make it a function of time.
  4. Characters that arrive and reflow the line read as a jump. The whole text reserves its layout. Typed characters show, the rest are clear.
  5. A scroll that jumps to each new line is noise. Glide, frame-rate independent.
  6. A scroll that moves to "line up" something already in view reads as a glitch. Move only as far as needed.
  7. A sequence that visits a control twice, or opens a menu for one pick, reads as a robot. Act like a person.
  8. A film on a phone is broken: the cursor cannot be followed and sheets cover the story. Hold one frame there.
  9. A film that goes on after its peak loses people. End on the strongest frame, then fade.
  10. An image from the network fails in a film. Draw it.
  11. Guessing at a motion bug costs rounds. Observe it first.

Related skills and sources

  • liquid-glass-web in this repo, for a glass frame around the stage.
  • widget-bento-web in this repo, for the opposite shape: many small live widgets instead of one task told in order.
  • UI SDK (@ui-sdk/react, @ui-sdk/core) for the primitives, and its agent bridge.
  • shadcn/ui, including its AI elements (the Trace based Reasoning, Task and Stack Trace) and the shimmer utility.
  • Emil Kowalski's animate and review-animations skills, and the apple-design skill, for the easing and springs, if the human has them.

Files

  • assets/film.ts: the engine. script() to write a film, frameAt() to read any frame, key times for typing, the ease, the spring, openness for popups, glide and nearest for the scroll. No React, no DOM.
  • assets/stage.tsx: useFilm (the clock, its holds, reduced motion, the poster, a phone's held frame, ?at=), measure, marker, Hand and drawHand, PauseButton on UI SDK. React 19, @ui-sdk/react and @ui-sdk/core, styled with Tailwind classes (swap them for the project's own).
  • references/script.md: the story, the order, the timings, the copy.
  • references/motion.md: the cursor, presses, popups, typing, streaming, the scroll, a theme switch, and what never to animate.
  • references/accessibility.md: primitives, the stage's semantics, WCAG, the agent bridge, the take over.
  • references/lessons.md: every pitfall with its cause and fix.

Files included

  • assets/film.ts
  • assets/stage.tsx
  • references/accessibility.md
  • references/lessons.md
  • references/motion.md
  • references/script.md
  • SKILL.md

More skills