Skip to content
Back to search

agentic-product-demo

Create polished product demo videos with AI coding agents and Remotion. The UI is code, not a screen recording.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/alexwtlf--agentic-product-demo/badge.svg)](/listings/alexwtlf--agentic-product-demo)

HTML

<a href="/listings/alexwtlf--agentic-product-demo"><img src="/api/listings/alexwtlf--agentic-product-demo/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 535 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Agentic Product Demo
  2. **Point your coding agent at your product and get a demo video back — built in
  3. React, not recorded off a screen.**
  4. [What's in it](#whats-in-it) · [Your first clip](#your-first-clip) · [Motion rules](#the-nine-motion-rules) · [Working with an agent](#working-with-an-agent) · [The frame gate](#the-frame-gate) · [Licensing](#licensing--read-this-before-you-build-on-it)
  5. The hard part is not making a video. It is making one that does not look like
  6. a screen recording. This repo is the motion vocabulary, the render pipeline and
  7. the frame gate that got mine there, plus the skill file that makes an agent
  8. follow them instead of improvising.
  9. ![The example composition rendered end to end](docs/demo.gif)
  10. *`src/compositions/Demo.tsx` — sixteen seconds, exactly what `npm run render`
  11. gives you on a fresh clone. Nothing on screen snaps between frames: the counter
  12. counts, the rows stagger, the pointer stops before it presses. A screen
  13. recording of a real app shows every one of those as a teleport.*
  14. ```bash
  15. npm install
  16. npm run adopt ../src/app/globals.css # take your product's real tokens
  17. npm run studio # preview at localhost:3000
  18. npm run preview # stills on every beat + a contact sheet — seconds
  19. npm run render # renders, stitches, and gates the result
  20. ```
  21. Node 20+. First render downloads a headless Chromium (~100 MB); if that fails
  22. see [Troubleshooting](#troubleshooting).
  23. Works with Claude Code, Cursor, or anything else that loads a skill file. It
  24. reads your product, puts up a shot list, and waits for you to correct it —
  25. [what that looks like](#working-with-an-agent). Then it writes the composition,
  26. renders it, and refuses to pass a render it cannot verify.
  27. ![A product demo rendered with this pipeline](docs/preview.gif)
  28. *The same pipeline, cut for [Athana](https://athana.ai) — five movements, one
  29. flow, no screen recorder. It runs on that product's own assets, which is why
  30. the composition that ships here is the generic one above.*
  31. ---
  32. ## What's in it
  33. | | |
  34. | --- | --- |
  35. | `src/motion.ts` | The vocabulary. Curves, durations, stagger, and the helpers that stop states teleporting. Imports nothing. |
  36. | `src/title-card.tsx` | The cold open — words rising out of per-word masks. |
  37. | `src/chrome.tsx` | The fake app window, the pointer, the click beats. |
  38. | `src/compositions/Demo.tsx` | A worked example. Copy this, change the flow. |
  39. | `scripts/preview.sh` | Stills on every beat, plus a contact sheet. What the gate cannot see. |
  40. | `scripts/render.sh` | Sequence render → 1536×960 mp4 + poster → gate. |
  41. | `scripts/check-frames.mjs` | The frame gate. See below. |
  42. | `scripts/add-sfx.sh` | Optional sound pass over the finished mp4. |
  43. | `scripts/beats/` | One beat file per clip — where the sound is scored. |
  44. | `.claude/skills/product-demo/` | The skill: the playbook an agent reads before touching any of it. |
  45. | `AGENTS.md` | What an agent needs on arrival — commands, and the rules it would otherwise break. |
  46. `AGENTS.md` at the root is read natively by Claude Code, Codex, Cursor, Aider,
  47. Copilot, Gemini CLI and Windsurf — an agent opening this folder is oriented
  48. before you say anything. `CLAUDE.md` points at it rather than repeating it.
  49. Cursor users who want the skill loaded as a skill: copy
  50. `.claude/skills/product-demo/` to `.cursor/skills/`. Same file either way.
  51. ---
  52. ## Your first clip
  53. ### The mental model
  54. A composition is a **pure function of the frame number**. `useCurrentFrame()`
  55. hands you N, you return what the screen looks like at frame N. Nothing is
  56. stateful and nothing animates on its own — if a value is not derived from the
  57. frame, it does not move.
  58. That is why every clip starts with a **beat sheet**: a block of named
  59. constants for the frame each thing happens on. Look at the top of
  60. `src/compositions/Demo.tsx` — `FIELD_CLICK = 20`, `RUN_CLICK = 88`,
  61. `TOAST_AT = 282`. Decide those before you write any JSX, because every
  62. entrance, colour change and cursor move is anchored to one of them.
  63. Elements are positioned in absolute pixels rather than with flexbox. A demo is
  64. choreography: you need to know where a button *is* in order to put a pointer
  65. on it at frame 214.
  66. ### 1. Copy the example
  67. ```bash
  68. cp src/compositions/Demo.tsx src/compositions/MyClip.tsx
  69. ```
  70. Rename the export `Demo` → `MyClip` and `DEMO_LEN` → `MYCLIP_LEN`.
  71. ### 2. Register it
  72. `src/Root.tsx` currently returns a single `<Composition>`. Wrap it in a
  73. fragment and add yours next to it:
  74. ```tsx
  75. import { MyClip, MYCLIP_LEN } from "./compositions/MyClip";
  76. return (
  77. <>
  78. <Composition id="demo" /* … */ />
  79. <Composition
  80. id="myclip"
  81. component={() => (
  82. <Clip body={<MyClip />} name="My Product" kicker="One line of promise" />
  83. )}
  84. durationInFrames={MYCLIP_LEN + TITLE_LEN}
  85. fps={FPS}
  86. width={WIDTH}
  87. height={HEIGHT}
  88. />
  89. </>
  90. );
  91. ```
  92. ### 3. Watch it
  93. ```bash
  94. npm run studio # localhost:3000, pick "myclip", scrub the timeline
  95. ```
  96. Scrubbing is where the work happens. Jump to a beat, look at it, adjust the
  97. constant, look again.
  98. ### 4. Look at it
  99. ```bash
  100. sh scripts/preview.sh myclip
  101. ```
  102. Reads the beat sheet out of your composition and shoots a still on each beat
  103. and again twelve frames later, then tiles them into
  104. `out/myclip-preview/contact.jpg`. Seconds, where a render is minutes.
  105. Do this before every render. The gate that runs afterwards measures two
  106. numbers per frame and cannot see whether the picture is *right* — a panel over
  107. the header, a phase drawn empty, a pointer pressing the number above the
  108. button all sail through it. Looking is the only thing that catches those, and
  109. this makes looking cheap.
  110. It cannot see time, though. Rhythm only exists in motion, so watch the mp4
  111. when it comes out.
  112. ### 5. Render it
  113. ```bash
  114. sh scripts/render.sh myclip 366 # 366 = which frame becomes the poster
  115. ```
  116. `npm run render` is just this with `demo`. Output lands in `out/`.
  117. The example runs 480 frames — 16 seconds. **That is a default, not a ceiling.**
  118. Length follows your flow rather than a template. Budget one step, add 66 for
  119. the title and ~30 for the outro, and set `MYCLIP_LEN` to the total:
  120. | pace | simple step | movement with its own beats |
  121. | --- | --- | --- |
  122. | punchy | 70 | 170 |
  123. | standard | 100 | 240 |
  124. | cinematic | 140 | 330 |
  125. A three-step flow lands near 14 seconds; a five-movement product story runs
  126. past 40. Nothing in the pipeline cares which you pick — the render, the gate
  127. and the sound pass all read the length off the composition.
  128. Working with an agent, you do not do this arithmetic: it derives the number
  129. from the flow you described and shows its working, so you can answer "punchy"
  130. in one word instead of counting frames.
  131. ### 6. Optionally, score it
  132. ```bash
  133. bash scripts/add-sfx.sh myclip # out/myclip-sound.mp4
  134. ```
  135. A clip autoplaying in a page **has to stay muted** — browsers block autoplay
  136. with audio, and a scored file simply will not start. So for a page loop the
  137. silent mp4 is the deliverable and the scored one is an extra.
  138. For a launch video nobody autoplays: sound can be the point, and the scored
  139. file is the one you ship. Either way the pass writes a new file and the silent
  140. original is never overwritten.
  141. The pass runs over the already-rendered mp4 and copies the video stream byte
  142. for byte (`-c:v copy`), so no frame is redrawn and the gate does not need
  143. re-running. Beats live in `scripts/beats/<id>.txt`, written against the
  144. beat-sheet constants at the top of your composition. Nine sounds, chosen by
  145. level of motion rather than by element — the palette and the rules are in
  146. `scripts/add-sfx.sh` and in the skill.
  147. ### Then make it yours
  148. **Run this first, before you draw anything:**
  149. ```bash
  150. npm run adopt # finds your stylesheet
  151. npm run adopt ../src/app/globals.css # or name it
  152. npm run adopt ../app/globals.css --curves --dry-run
  153. ```
  154. It reads your stylesheet and rewrites `src/theme.css` with your tokens —
  155. `--primary` becomes the kit's `--brand`, a `--poster`/`--backdrop` becomes
  156. `--ground`, and anything with no counterpart is *derived* from what did match
  157. rather than left as a stranger's purple. `--curves` also copies your
  158. `cubic-bezier` easings into `src/motion.ts`, so the film moves the way your
  159. product moves. `--dry-run` reports and writes nothing.
  160. It prints what it matched and what it could not, so a half-adopted palette is
  161. visible instead of silent:
  162. ```
  163. ✓ --brand --primary taken
  164. ~ --brand-soft — derived from --brand
  165. ! --ground — PLACEHOLDER — no match
  166. ```
  167. Handles Tailwind 3 and 4, `:root` / `.dark` / `[data-theme]` /
  168. `prefers-color-scheme`, and one level of `var()` indirection. It takes the
  169. **dark** palette by default — the title card, the ground and the loop seam all
  170. sit on a dark stage — so pass `--mode=light` for a light demo.
  171. **It copies, it does not link.** Remotion cannot import an app stylesheet: that
  172. pulls Tailwind plugins and font files that live on the app's own serving path.
  173. So these are snapshots, the written file records its source and date, and a
  174. token you change in the app afterwards needs a rerun. Hand-edits to
  175. `src/theme.css` do not survive the next run — put a deliberate override in a
  176. composition, or add your name to `ALIASES` in the script.
  177. Then, by hand:
  178. 1. `src/fonts.ts` — swap the face. The script tells you which one your
  179. stylesheet asks for, but cannot swap it for you: the family has to exist in
  180. `@remotion/google-fonts` or be wired up as a local file. A `fontFamily`
  181. string alone loads nothing; skip `loadFont()` and every frame silently
  182. renders in a system fallback.
  183. 2. `MyClip.tsx` — replace the flow with the real steps of your product, in the
  184. real order, with copy taken from the live UI. A demo that walks a flow the
  185. product doesn't have proves nothing, however good it looks.
  186. The palette is the cheap half. **The copy is what makes a frame recognisable as
  187. your software** — the real button labels, the real row names, the real empty
  188. state. `npm run adopt` cannot do that part, and the skill is written to stop an
  189. agent inventing it.
  190. ---
  191. ## The nine motion rules
  192. These are the difference between a clip that reads as software and one that
  193. reads as a screenshot slideshow. Long form in
  194. `.claude/skills/product-demo/references/motion.md`.
  195. 1. **A boolean in a style is a bug.** `on ? "var(--brand)" : "var(--border)"`
  196. snaps in one frame. Anchor a ramp at the frame the state changes and blend
  197. the tokens through it.
  198. 2. **Never `scale(0)`.** Entrances start at 0.9–0.97 and travel ≤16px. A 40px
  199. entrance reads as a slide deck.
  200. 3. **Counters count.** A number that jumps is the loudest teleport on screen,
  201. because the eye is already reading it.
  202. 4. **Typed text types.** Static copy in a field the flow says is being filled
  203. reads as a screenshot, and viewers clock it instantly.
  204. 5. **Nothing enters as a group.** Two-frame stagger, minimum.
  205. 6. **Springs for landing, ramps for travel.** Damping 14 or above, or it
  206. looks like a toy.
  207. 7. **Weight and layout stay stepped.** Tweening `fontSize` reflows the row
  208. every frame.
  209. 8. **One hero beat per phase.** If everything is animated, nothing reads as
  210. animated.
  211. 9. **The pointer lands on what it presses, and stops there.** Take the
  212. coordinate off a rendered frame, never off the CSS — estimating a chip's
  213. centre from padding and font size put the cursor 94px away, on the counter
  214. above it. Then give every target *two* keys, the second outlasting the
  215. press: with one key the pointer starts easing toward its next target the
  216. frame it arrives, and the click fires 20 frames into that move.
  217. And the one that is not about motion: **never put a lasting `transform` on
  218. the container that holds the whole UI.** A scale on the app frame resamples
  219. every glyph inside it. Move what is *in* the frame, never the frame.
  220. ---
  221. ## Working with an agent
  222. `.claude/skills/product-demo/SKILL.md` is written to be read by Claude Code,
  223. Cursor, or anything else that loads skill files. It is not documentation with
  224. a YAML header on top — it is a set of refusals.
  225. ### First it reads your product, then proposes a plan.
  226. If it can reach your repo, your running app or your site, it reads them — the
  227. running order of your marketing page tells it which features matter and in
  228. what order, and the app tells it what those features actually look like.
  229. Neither answers the other's question. Then it drafts the whole thing and asks
  230. you to confirm it, rather than interviewing you for what it could have looked
  231. up.
  232. Four things have to be settled before a line of a composition gets written:
  233. > **0. A demo of the whole product, or a scene about one feature?** A product
  234. > demo strings three to five features into movements on a through-line; a
  235. > feature clip walks one flow start to finish. They are not the same clip at
  236. > different lengths.
  237. >
  238. > That answer also decides where the clip lives — whole product means a
  239. > standalone launch video that plays once, one feature means a muted loop in a
  240. > page section — and with it the loop seam, the sound, the length ceiling and
  241. > the ending. Both crossings happen, so the agent picks and **shows you the
  242. > pick** rather than assuming in silence.
  243. >
  244. > **1. What is being made on screen?** Not the feature — the thing the viewer
  245. > watches get built. "A revenue report", "a deploy going out".
  246. >
  247. > **2. What does it walk, in order?** Real steps, or real features as
  248. > movements with something carrying the viewer between them. Copy comes from
  249. > the live product.
  250. >
  251. > **3. How does it end?** By default on the finished thing — the flow
  252. > completes and the last state holds long enough to read. No asset, no
  253. > question. Only when the ending is media your product *generates* does it
  254. > need a real file, and there it may propose one from your disk but never
  255. > fabricate a stand-in.
  256. ### Most of that you never answer.
  257. Settled is not the same as asked. The agent drafts what it can read — the
  258. flow, the screens, the copy, the ending — and only three things come back to
  259. you, in one block rather than an interview:
  260. - **Scope** — the whole product, or one feature?
  261. - **Where it lives** — a muted loop in a page section, or a standalone clip
  262. that plays once? Pre-picked from your scope answer.
  263. - **The flow** — do you already know the steps you want walked, or should it
  264. read your product and propose them?
  265. Each option carries a line saying what it costs you, and **the agent's own
  266. guess is already selected**. That is the difference between this and a form:
  267. you are correcting a plan, not filling one in. The usual answer is one click,
  268. and so is the correction. In Claude Code it is a native picker; elsewhere the
  269. same three arrive in a single message.
  270. The third one matters more than it looks. Reading your product gives a
  271. *plausible* flow, never the right one — the code does not record which path
  272. converts, which step people get stuck on, or which feature shipped last week
  273. and needs the attention. Only you know that. It is offered once and never
  274. pressed: ignore it and the agent reads your product and proposes a flow anyway.
  275. Beyond those three it asks for exactly one more thing, and only sometimes:
  276. which file the ending shows, when the payoff is media your product generates
  277. and several would do. Fragments are fine as answers everywhere.
  278. **Length is deliberately not among them.** Asked, it gets answered "short" on
  279. reflex, and a demo that rushes the steps it exists to show is the result. The
  280. agent derives it from your flow and shows the arithmetic instead — which is
  281. what the shot list below is.
  282. ### Then it reads the screen it is about to rebuild.
  283. The shot list settles what happens. What the clip *looks like* is decided by
  284. how much of your codebase the agent actually reads, and the skill makes that
  285. non-optional: **nothing on screen may be invented.**
  286. Lists on screen — rows, cards, chips, steps — almost never live in the page.
  287. They sit in a constants module with the real names, the real subtitles and the
  288. real order, and the agent is told to grep a visible string back to its
  289. definition and use the whole list. Light or dark is a property of the screen
  290. rather than of the product. `--primary` is often not the accent the surface
  291. you are drawing reaches for. Getting any of those wrong yields a clip that
  292. renders clean, passes the gate, and is not your software.
  293. It does not ask you for screenshots. Everything a screenshot would settle —
  294. the arrangement, the density, the ground, the accent — is in the markup and the
  295. classes, and asking for a picture is how an agent gives itself permission not
  296. to read them.
  297. ### Then it shows you the shot list, and waits.
  298. > ```
  299. > t0 title "Acme Studio" · "Ask a question, publish the answer"
  300. > 0 query types "Revenue by channel, last quarter", hits Run
  301. > 96 results five channel rows stagger in, the counter lands on 1,940
  302. > 184 filter "Paid only" lights, three rows dim, the total recounts
  303. > 274 publish press, the confirmation springs into its slot
  304. > 380 out folds back to the dark ground
  305. > ```
  306. >
  307. > Four steps and a hold: 66 for the title, four steps just under the standard
  308. > 100, and 34 to fold out — **480 frames, 16s**. Ends on the published report.
  309. > Say "punchy" for ~12s.
  310. One line per phase, the frame it starts on, and the arithmetic behind the
  311. length — so a redirect costs you a word instead of a paragraph.
  312. That checkpoint is the whole reason the interview exists. The failure mode of
  313. "make me a demo video" is a beautiful montage of output that never shows what a
  314. visitor would actually do, and getting question 2 wrong is the one defect that
  315. cannot be fixed in the edit — by the time you see it, the entire clip is built
  316. on it. Correcting a line in that list costs a sentence. Correcting it after the
  317. composition exists costs a rebuild.
  318. Everything else it decides on its own and tells you in passing: the title copy,
  319. the pace, and which single element carries the hero beat of each phase.
  320. If you only take one thing from this repo, take that section.
  321. ---
  322. ## The frame gate
  323. Every render is checked before it is allowed to pass.
  324. `scripts/check-frames.mjs` looks for two defects. **Corrupted frames**, where
  325. the page texture comes back wrapped or mirrored inside an otherwise correct
  326. frame — it hits a handful out of hundreds, at random, so it reads as a flicker
  327. rather than as damage, and no encoder setting fixes it because it is already
  328. baked into the JPEG. And **luminance jumps**, including the loop seam: the
  329. last frame cutting back to frame 0, which fires every time the video repeats
  330. and which nobody inspects.
  331. ```
  332. 480 frames, 1536x960
  333. tiled frames: none
  334. luminance jumps over 25: none
  335. loop seam: frame 479 Y=20.0 -> frame 0 Y=20.0 jump 0.0
  336. ```
  337. **What it does not check is the picture.** Two numbers per frame — half
  338. against half, and average luminance — is the whole of it. A panel over the
  339. header, a phase drawn empty, a counter cut off, a pointer pressing the wrong
  340. element: every one of those passes. That is what `scripts/preview.sh` is for,
  341. and why it runs *before* this, not instead of it.
  342. `scripts/render.sh` exits non-zero on a failure, and **keeps the frame
  343. sequence when it fails**, printing the path. The flagged JPEG is what decides
  344. whether the encoder is innocent, and being able to open it is the only reason
  345. to render through stills at all.
  346. For a clip that plays once rather than looping, pass `STANDALONE=1` — the seam
  347. check only means something for a clip that cuts back to its first frame, and
  348. without the flag the gate fails a launch video for ending somewhere brighter
  349. than it started. Remotion's docs also recommend
  350. [`--concurrency=1`](https://www.remotion.dev/docs/flickering) for flickering
  351. and the render script always passes it — but a flag you have to remember is
  352. not a guarantee.
  353. **Two known blind spots.** Both come from the same heuristic: the tile check
  354. asks whether a frame's left half resembles its right half, which is anomalous
  355. in a dense interface and perfectly normal elsewhere.
  356. *Flat frames.* Nearly one colour means matching halves by definition, so only
  357. frames with real contrast are judged (`FLAT = 120`). On a pale, low-contrast
  358. UI it will miss corruption a dark one would catch. Lower the threshold for a
  359. light product; never raise it to make a failure go away.
  360. *Repeating or symmetric content.* A grid background, a striped field, a
  361. centred layout — the halves match because the design says so. Measured
  362. against a motion-graphics render on a grid template, this produced nine false
  363. positives out of three hundred frames, every one of them a frame where the
  364. foreground text had left and only the grid remained. **This detector is built
  365. for product UI.** On graphic content, read every flag before believing it.
  366. ---
  367. ## How much of this is Remotion
  368. `src/motion.ts` — the vocabulary, and the part worth taking — **imports
  369. nothing at all**: the bezier solver, the clamped span and the damped
  370. oscillator behind `pop()` are written out in the file. It works unchanged
  371. under Framer Motion, in a canvas loop, or in React Native.
  372. Remotion itself is five symbols in four files — `registerRoot`,
  373. `Composition`, `Sequence`, `AbsoluteFill`, `useCurrentFrame`, plus `loadFont`.
  374. It bundles the app, drives the frame clock, runs headless Chromium and gives
  375. you the Studio.
  376. ---
  377. ## Troubleshooting
  378. **`Timed out after 25000 ms while trying to connect to the browser!`**, with
  379. an empty Chrome log. Almost never a Remotion problem.
  380. - Remotion's bundled Chromium will not launch on older systems — on macOS it
  381. wants 15 (Sequoia). Point it at an installed Chrome instead:
  382. ```bash
  383. export CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
  384. ```
  385. `remotion.config.ts` picks that up automatically.
  386. - **If you use `CHROME_PATH`, quit Chrome first.** Launching a second instance
  387. of an already-running browser hands off to the existing process and exits
  388. without opening a debugging port. Nothing is logged, because nothing crashed.
  389. **The clip flickers.** Run `scripts/check-frames.mjs` on the mp4 before
  390. touching the encoder — that diagnosis is wrong twice as often as it is right.
  391. Full debugging order in
  392. `.claude/skills/product-demo/references/render.md`.
  393. ---
  394. ## Licensing — read this before you build on it
  395. **This kit is MIT.** See `LICENSE`.
  396. **Remotion is not.** Remotion is source-available under its own licence:
  397. free for individuals, non-profits, and for-profit companies **up to 3
  398. employees**; larger companies need a paid Company License from
  399. [remotion.pro](https://www.remotion.pro/license). That applies to you as soon
  400. as you `npm install`, regardless of what this repo's licence says. Check
  401. where you land before you ship something commercial on it.
  402. ffmpeg binaries come from `ffmpeg-static` and carry their own terms.
  403. ---
  404. ## Credits
  405. The motion rules above are a translation of
  406. [Emil Kowalski](https://emilkowal.ski)'s writing and animation skills into the
  407. constraints of a rendered file. Two things do not carry over: Remotion has no
  408. CSS transitions, and `prefers-reduced-motion` is meaningless in an mp4.
  409. Everything else about curves, properties, durations and stagger applies
  410. unchanged, and his material is the best thing to read alongside this.
  411. Built with [Remotion](https://www.remotion.dev).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.