takomi 2.1.40 → 2.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/.agents/plugins/marketplace.json +22 -22
  2. package/README.md +3 -3
  3. package/assets/.agent/skills/remotion/rules/assets/charts-bar-chart.tsx +173 -173
  4. package/assets/.agent/skills/remotion/rules/assets/text-animations-typewriter.tsx +100 -100
  5. package/assets/.agent/skills/remotion/rules/text-animations.md +20 -20
  6. package/assets/.agent/skills/remotion/rules/videos.md +171 -171
  7. package/assets/.agent/skills/remotion-real-ui-video/SKILL.md +264 -0
  8. package/assets/.agent/skills/remotion-real-ui-video/references/anti-patterns.md +114 -0
  9. package/assets/.agent/skills/remotion-real-ui-video/references/completion-checklist.md +75 -0
  10. package/assets/.agent/skills/remotion-real-ui-video/references/real-ui-bridge-example.md +93 -0
  11. package/assets/.agent/skills/takomi-flow/SKILL.md +244 -244
  12. package/docs/features/TakomiFlow_Portable_Plugin.md +82 -82
  13. package/docs/takomi-flow-onboarding.md +86 -86
  14. package/docs/takomi-flow-public-distribution.md +94 -94
  15. package/package.json +1 -1
  16. package/plugins/takomi-flow/.mcp.json +11 -11
  17. package/plugins/takomi-flow/assets/capabilities.json +203 -203
  18. package/plugins/takomi-flow/assets/collection.schema.json +29 -29
  19. package/plugins/takomi-flow/assets/examples.json +94 -94
  20. package/plugins/takomi-flow/assets/request.schema.json +91 -91
  21. package/plugins/takomi-flow/assets/result.schema.json +46 -46
  22. package/plugins/takomi-flow/assets/templates/image-request.json +17 -17
  23. package/plugins/takomi-flow/assets/templates/video-request.json +19 -19
  24. package/plugins/takomi-flow/package.json +38 -38
  25. package/plugins/takomi-flow/pnpm-lock.yaml +813 -813
  26. package/plugins/takomi-flow/references/flow-provider-contract.md +349 -349
  27. package/plugins/takomi-flow/scripts/lib/agent-plan.mjs +140 -140
  28. package/plugins/takomi-flow/scripts/lib/api.mjs +113 -113
  29. package/plugins/takomi-flow/scripts/lib/args.mjs +66 -66
  30. package/plugins/takomi-flow/scripts/lib/audit.mjs +65 -65
  31. package/plugins/takomi-flow/scripts/lib/browser.mjs +78 -78
  32. package/plugins/takomi-flow/scripts/lib/capabilities.mjs +11 -11
  33. package/plugins/takomi-flow/scripts/lib/collect.mjs +53 -53
  34. package/plugins/takomi-flow/scripts/lib/commands.mjs +192 -192
  35. package/plugins/takomi-flow/scripts/lib/doctor.mjs +77 -77
  36. package/plugins/takomi-flow/scripts/lib/examples.mjs +17 -17
  37. package/plugins/takomi-flow/scripts/lib/flow-media.mjs +39 -39
  38. package/plugins/takomi-flow/scripts/lib/flow-outcome.mjs +115 -115
  39. package/plugins/takomi-flow/scripts/lib/flow-project-session.mjs +153 -153
  40. package/plugins/takomi-flow/scripts/lib/flow-ui.mjs +204 -204
  41. package/plugins/takomi-flow/scripts/lib/generation.mjs +190 -190
  42. package/plugins/takomi-flow/scripts/lib/inspect.mjs +81 -81
  43. package/plugins/takomi-flow/scripts/lib/mcp-prompts.mjs +39 -39
  44. package/plugins/takomi-flow/scripts/lib/mcp-resources.mjs +16 -16
  45. package/plugins/takomi-flow/scripts/lib/mcp-tools.mjs +165 -165
  46. package/plugins/takomi-flow/scripts/lib/media.mjs +78 -78
  47. package/plugins/takomi-flow/scripts/lib/observe.mjs +54 -54
  48. package/plugins/takomi-flow/scripts/lib/paths.mjs +37 -37
  49. package/plugins/takomi-flow/scripts/lib/playwright-loader.mjs +23 -23
  50. package/plugins/takomi-flow/scripts/lib/prompts.mjs +72 -72
  51. package/plugins/takomi-flow/scripts/lib/report.mjs +141 -141
  52. package/plugins/takomi-flow/scripts/lib/request-validator.mjs +73 -73
  53. package/plugins/takomi-flow/scripts/lib/request.mjs +66 -66
  54. package/plugins/takomi-flow/scripts/lib/resource-files.mjs +69 -69
  55. package/plugins/takomi-flow/scripts/lib/result.mjs +31 -31
  56. package/plugins/takomi-flow/scripts/lib/review.mjs +44 -44
  57. package/plugins/takomi-flow/scripts/lib/selftest.mjs +153 -153
  58. package/plugins/takomi-flow/scripts/lib/settings-plan.mjs +44 -44
  59. package/plugins/takomi-flow/scripts/lib/templates.mjs +37 -37
  60. package/plugins/takomi-flow/scripts/lib/trusted-chrome.mjs +67 -67
  61. package/plugins/takomi-flow/scripts/lib/workflow.mjs +56 -56
  62. package/plugins/takomi-flow/scripts/mcp-server.mjs +18 -18
  63. package/plugins/takomi-flow/scripts/mcp-smoke.mjs +144 -144
  64. package/plugins/takomi-flow/scripts/takomi-flow.mjs +17 -17
  65. package/plugins/takomi-flow/skills/takomi-flow/SKILL.md +244 -244
  66. package/plugins/takomi-flow/skills/takomi-flow/agents/openai.yaml +7 -7
  67. package/scripts/install-takomi-flow.ps1 +85 -85
  68. package/src/skills-catalog.js +10 -9
@@ -1,171 +1,171 @@
1
- ---
2
- name: videos
3
- description: Embedding videos in Remotion - trimming, volume, speed, looping, pitch
4
- metadata:
5
- tags: video, media, trim, volume, speed, loop, pitch
6
- ---
7
-
8
- # Using videos in Remotion
9
-
10
- ## Prerequisites
11
-
12
- First, the @remotion/media package needs to be installed.
13
- If it is not, use the following command:
14
-
15
- ```bash
16
- npx remotion add @remotion/media # If project uses npm
17
- bunx remotion add @remotion/media # If project uses bun
18
- yarn remotion add @remotion/media # If project uses yarn
19
- pnpm exec remotion add @remotion/media # If project uses pnpm
20
- ```
21
-
22
- Use `<Video>` from `@remotion/media` to embed videos into your composition.
23
-
24
- ```tsx
25
- import { Video } from "@remotion/media";
26
- import { staticFile } from "remotion";
27
-
28
- export const MyComposition = () => {
29
- return <Video src={staticFile("video.mp4")} />;
30
- };
31
- ```
32
-
33
- Remote URLs are also supported:
34
-
35
- ```tsx
36
- <Video src="https://remotion.media/video.mp4" />
37
- ```
38
-
39
- ## Trimming
40
-
41
- Use `trimBefore` and `trimAfter` to remove portions of the video. Values are in seconds.
42
-
43
- ```tsx
44
- const { fps } = useVideoConfig();
45
-
46
- return (
47
- <Video
48
- src={staticFile("video.mp4")}
49
- trimBefore={2 * fps} // Skip the first 2 seconds
50
- trimAfter={10 * fps} // End at the 10 second mark
51
- />
52
- );
53
- ```
54
-
55
- ## Delaying
56
-
57
- Wrap the video in a `<Sequence>` to delay when it appears:
58
-
59
- ```tsx
60
- import { Sequence, staticFile } from "remotion";
61
- import { Video } from "@remotion/media";
62
-
63
- const { fps } = useVideoConfig();
64
-
65
- return (
66
- <Sequence from={1 * fps}>
67
- <Video src={staticFile("video.mp4")} />
68
- </Sequence>
69
- );
70
- ```
71
-
72
- The video will appear after 1 second.
73
-
74
- ## Sizing and Position
75
-
76
- Use the `style` prop to control size and position:
77
-
78
- ```tsx
79
- <Video
80
- src={staticFile("video.mp4")}
81
- style={{
82
- width: 500,
83
- height: 300,
84
- position: "absolute",
85
- top: 100,
86
- left: 50,
87
- objectFit: "cover",
88
- }}
89
- />
90
- ```
91
-
92
- ## Volume
93
-
94
- Set a static volume (0 to 1):
95
-
96
- ```tsx
97
- <Video src={staticFile("video.mp4")} volume={0.5} />
98
- ```
99
-
100
- Or use a callback for dynamic volume based on the current frame:
101
-
102
- ```tsx
103
- import { interpolate } from "remotion";
104
-
105
- const { fps } = useVideoConfig();
106
-
107
- return (
108
- <Video
109
- src={staticFile("video.mp4")}
110
- volume={(f) =>
111
- interpolate(f, [0, 1 * fps], [0, 1], { extrapolateRight: "clamp" })
112
- }
113
- />
114
- );
115
- ```
116
-
117
- Use `muted` to silence the video entirely:
118
-
119
- ```tsx
120
- <Video src={staticFile("video.mp4")} muted />
121
- ```
122
-
123
- ## Speed
124
-
125
- Use `playbackRate` to change the playback speed:
126
-
127
- ```tsx
128
- <Video src={staticFile("video.mp4")} playbackRate={2} /> {/* 2x speed */}
129
- <Video src={staticFile("video.mp4")} playbackRate={0.5} /> {/* Half speed */}
130
- ```
131
-
132
- Reverse playback is not supported.
133
-
134
- ## Looping
135
-
136
- Use `loop` to loop the video indefinitely:
137
-
138
- ```tsx
139
- <Video src={staticFile("video.mp4")} loop />
140
- ```
141
-
142
- Use `loopVolumeCurveBehavior` to control how the frame count behaves when looping:
143
-
144
- - `"repeat"`: Frame count resets to 0 each loop (for `volume` callback)
145
- - `"extend"`: Frame count continues incrementing
146
-
147
- ```tsx
148
- <Video
149
- src={staticFile("video.mp4")}
150
- loop
151
- loopVolumeCurveBehavior="extend"
152
- volume={(f) => interpolate(f, [0, 300], [1, 0])} // Fade out over multiple loops
153
- />
154
- ```
155
-
156
- ## Pitch
157
-
158
- Use `toneFrequency` to adjust the pitch without affecting speed. Values range from 0.01 to 2:
159
-
160
- ```tsx
161
- <Video
162
- src={staticFile("video.mp4")}
163
- toneFrequency={1.5} // Higher pitch
164
- />
165
- <Video
166
- src={staticFile("video.mp4")}
167
- toneFrequency={0.8} // Lower pitch
168
- />
169
- ```
170
-
171
- Pitch shifting only works during server-side rendering, not in the Remotion Studio preview or in the `<Player />`.
1
+ ---
2
+ name: videos
3
+ description: Embedding videos in Remotion - trimming, volume, speed, looping, pitch
4
+ metadata:
5
+ tags: video, media, trim, volume, speed, loop, pitch
6
+ ---
7
+
8
+ # Using videos in Remotion
9
+
10
+ ## Prerequisites
11
+
12
+ First, the @remotion/media package needs to be installed.
13
+ If it is not, use the following command:
14
+
15
+ ```bash
16
+ npx remotion add @remotion/media # If project uses npm
17
+ bunx remotion add @remotion/media # If project uses bun
18
+ yarn remotion add @remotion/media # If project uses yarn
19
+ pnpm exec remotion add @remotion/media # If project uses pnpm
20
+ ```
21
+
22
+ Use `<Video>` from `@remotion/media` to embed videos into your composition.
23
+
24
+ ```tsx
25
+ import { Video } from "@remotion/media";
26
+ import { staticFile } from "remotion";
27
+
28
+ export const MyComposition = () => {
29
+ return <Video src={staticFile("video.mp4")} />;
30
+ };
31
+ ```
32
+
33
+ Remote URLs are also supported:
34
+
35
+ ```tsx
36
+ <Video src="https://remotion.media/video.mp4" />
37
+ ```
38
+
39
+ ## Trimming
40
+
41
+ Use `trimBefore` and `trimAfter` to remove portions of the video. Values are in seconds.
42
+
43
+ ```tsx
44
+ const { fps } = useVideoConfig();
45
+
46
+ return (
47
+ <Video
48
+ src={staticFile("video.mp4")}
49
+ trimBefore={2 * fps} // Skip the first 2 seconds
50
+ trimAfter={10 * fps} // End at the 10 second mark
51
+ />
52
+ );
53
+ ```
54
+
55
+ ## Delaying
56
+
57
+ Wrap the video in a `<Sequence>` to delay when it appears:
58
+
59
+ ```tsx
60
+ import { Sequence, staticFile } from "remotion";
61
+ import { Video } from "@remotion/media";
62
+
63
+ const { fps } = useVideoConfig();
64
+
65
+ return (
66
+ <Sequence from={1 * fps}>
67
+ <Video src={staticFile("video.mp4")} />
68
+ </Sequence>
69
+ );
70
+ ```
71
+
72
+ The video will appear after 1 second.
73
+
74
+ ## Sizing and Position
75
+
76
+ Use the `style` prop to control size and position:
77
+
78
+ ```tsx
79
+ <Video
80
+ src={staticFile("video.mp4")}
81
+ style={{
82
+ width: 500,
83
+ height: 300,
84
+ position: "absolute",
85
+ top: 100,
86
+ left: 50,
87
+ objectFit: "cover",
88
+ }}
89
+ />
90
+ ```
91
+
92
+ ## Volume
93
+
94
+ Set a static volume (0 to 1):
95
+
96
+ ```tsx
97
+ <Video src={staticFile("video.mp4")} volume={0.5} />
98
+ ```
99
+
100
+ Or use a callback for dynamic volume based on the current frame:
101
+
102
+ ```tsx
103
+ import { interpolate } from "remotion";
104
+
105
+ const { fps } = useVideoConfig();
106
+
107
+ return (
108
+ <Video
109
+ src={staticFile("video.mp4")}
110
+ volume={(f) =>
111
+ interpolate(f, [0, 1 * fps], [0, 1], { extrapolateRight: "clamp" })
112
+ }
113
+ />
114
+ );
115
+ ```
116
+
117
+ Use `muted` to silence the video entirely:
118
+
119
+ ```tsx
120
+ <Video src={staticFile("video.mp4")} muted />
121
+ ```
122
+
123
+ ## Speed
124
+
125
+ Use `playbackRate` to change the playback speed:
126
+
127
+ ```tsx
128
+ <Video src={staticFile("video.mp4")} playbackRate={2} /> {/* 2x speed */}
129
+ <Video src={staticFile("video.mp4")} playbackRate={0.5} /> {/* Half speed */}
130
+ ```
131
+
132
+ Reverse playback is not supported.
133
+
134
+ ## Looping
135
+
136
+ Use `loop` to loop the video indefinitely:
137
+
138
+ ```tsx
139
+ <Video src={staticFile("video.mp4")} loop />
140
+ ```
141
+
142
+ Use `loopVolumeCurveBehavior` to control how the frame count behaves when looping:
143
+
144
+ - `"repeat"`: Frame count resets to 0 each loop (for `volume` callback)
145
+ - `"extend"`: Frame count continues incrementing
146
+
147
+ ```tsx
148
+ <Video
149
+ src={staticFile("video.mp4")}
150
+ loop
151
+ loopVolumeCurveBehavior="extend"
152
+ volume={(f) => interpolate(f, [0, 300], [1, 0])} // Fade out over multiple loops
153
+ />
154
+ ```
155
+
156
+ ## Pitch
157
+
158
+ Use `toneFrequency` to adjust the pitch without affecting speed. Values range from 0.01 to 2:
159
+
160
+ ```tsx
161
+ <Video
162
+ src={staticFile("video.mp4")}
163
+ toneFrequency={1.5} // Higher pitch
164
+ />
165
+ <Video
166
+ src={staticFile("video.mp4")}
167
+ toneFrequency={0.8} // Lower pitch
168
+ />
169
+ ```
170
+
171
+ Pitch shifting only works during server-side rendering, not in the Remotion Studio preview or in the `<Player />`.
@@ -0,0 +1,264 @@
1
+ ---
2
+ name: remotion-real-ui-video
3
+ description: >-
4
+ Strict reusable workflow for turning an existing app into code-native Remotion videos that reuse the real app UI/components instead of screenshots, screen recordings, or recreated clone/mock screens. Use when a user wants product demos, walkthroughs, onboarding videos, launch videos, or proof compositions from an existing React/Next/web app with mock/demo/local data, scripted navigation, click/touch choreography, responsive mobile proofs, scroll choreography, or calibrated cursor/tap targeting. Enforces real-UI compliance: agents must inspect and import/extract actual app components before building app-screen scenes, and must stop rather than hand-build lookalike dashboards/forms/tables unless the user explicitly approves a mockup/redesign.
5
+ ---
6
+
7
+ # Remotion Real UI Video Workflow
8
+
9
+ ## Core Rule
10
+
11
+ Render the app's real UI in Remotion. Do not recreate clone screens, redesign dashboards, or rely on screenshots as the primary production path. Replace runtime/data boundaries with deterministic demo data so the existing components can render safely and repeatably.
12
+
13
+ ## New Project Transfer Rule
14
+
15
+ This skill is a workflow, not a drop-in guarantee. For each new project, inspect the app's structure before implementing: routing, providers, styling setup, auth/session flow, data fetching, browser/server boundaries, responsive layouts, and Remotion compatibility. Adapt the generic pattern to the specific codebase instead of assuming prior project files, routes, models, or tooling exist.
16
+
17
+ Default to doing serious video/demo conversion work on a fresh branch or Git worktree. Coexisting in the same project is possible when changes are strictly isolated behind Remotion-only entrypoints, demo providers, stubs, aliases, and scripts; however, branch/worktree isolation is safer when replacing auth, data, routing, or external-service boundaries.
18
+
19
+ ## Non-negotiables
20
+
21
+ - Preserve the product's existing UI composition, layout hierarchy, shared components, styling, and navigation patterns.
22
+ - Do not build Remotion-only clone dashboards, forms, tables, cards, sidebars, score sheets, admin panels, or product screens when a real app component already exists.
23
+ - Do not recreate a screen because it is faster, prettier, easier to animate, or simpler than wiring the real component. That violates this skill.
24
+ - Do not redesign screens just because video rendering needs local data or scripted timing.
25
+ - Prefer extracting data/provider boundaries over rewriting JSX.
26
+ - Replace live runtime dependencies at the boundary: authentication/session, databases, external APIs, payment providers, uploads, analytics, webhooks, AI calls, and feature flags.
27
+ - Use believable deterministic demo data. Avoid random-at-render data unless seeded.
28
+ - Never expose implementation wording such as "demo", "mock", "fake", "video mode", or "test data" in user-facing UI unless the user explicitly wants that.
29
+ - Prefer code-native Remotion compositions that import/render real app components over screenshots or screen capture. Use Playwright/screenshots only as diagnostic/reference fallbacks.
30
+ - Drive cursor/touch movement, down/up frames, app reactions, route/state commits, and scroll/camera changes from centralized timeline objects.
31
+ - Route/data state must change only at a commit frame after the visual click/tap has landed.
32
+ - Prefer semantic DOM target tracking (`data-video-target`) over raw coordinates; raw coordinates are fallbacks only.
33
+ - Normalize DOM measurements into Remotion composition coordinates before positioning cursors, touches, debug overlays, or highlights.
34
+ - For Remotion-authored movement/scrolling, avoid CSS `transition`/browser-driven animation on properties that change every frame. Drive motion from frame values only.
35
+ - Default final compositions to full HD so real UI is not cramped: use 1920×1080 for landscape and 1080×1920 for portrait/mobile. Smaller sizes such as 1280×720 are acceptable only for quick draft renders or explicit user request.
36
+ - For mobile/tablet proofs, use separate Remotion compositions with intended portrait dimensions, preferably 1080×1920 for final output. Use full-screen app surfaces, touch indicators, and scripted scroll; avoid desktop pan/zoom and mouse cursors.
37
+
38
+ ## Recommended Architecture
39
+
40
+ Use a video/demo data layer around the real app UI:
41
+
42
+ ```txt
43
+ real app UI components
44
+ -> thin runtime/data boundary
45
+ -> live providers OR demo/local providers
46
+ -> scripted route/state/timeline layer
47
+ -> Remotion composition
48
+ -> optional debug overlays/reference captures
49
+ ```
50
+
51
+ When starting from an app with tightly coupled data/auth, split containers from presentational components:
52
+
53
+ ```txt
54
+ LivePage/LiveContainer
55
+ -> loads auth/session/live data
56
+ -> calls actions/mutations
57
+ -> renders RealFeatureView props
58
+
59
+ RemotionComposition
60
+ -> imports RealFeatureView
61
+ -> supplies demo data + no-op/demo actions
62
+ -> drives state from timeline commit frames
63
+ ```
64
+
65
+ ## Required References
66
+
67
+ Before implementing any non-trivial real-UI Remotion task, read:
68
+
69
+ - `references/real-ui-bridge-example.md` for the required real-component bridge pattern.
70
+ - `references/anti-patterns.md` to avoid known failure modes.
71
+ - `references/completion-checklist.md` before reporting completion.
72
+
73
+ For trivial edits to an already-compliant composition, reading the checklist is enough.
74
+
75
+ ## Real UI Compliance Gate
76
+
77
+ Before implementing a composition for an existing app screen, prove the screen is real-UI-backed:
78
+
79
+ 1. Find the actual route/page/component files that render the requested screen in the app.
80
+ 2. Identify the exported or extractable view component(s) that own the real UI.
81
+ 3. Import those real components into Remotion, or extract a presentational view from them while preserving JSX/layout/classes.
82
+ 4. Replace only runtime/data/provider boundaries with demo data, stubs, aliases, or no-op actions.
83
+ 5. If the real UI cannot be imported/extracted without major refactor, stop and tell the user. Ask whether to refactor the real component boundary or intentionally create a video-only mockup.
84
+
85
+ A composition that hand-builds a lookalike screen without first exhausting real component reuse is not acceptable under this skill. Marketing polish can be added around the real UI, but not by replacing the real UI with a recreated clone.
86
+
87
+ ## Mandatory Pre-Implementation Report
88
+
89
+ Before writing Remotion scene JSX for any app screen, produce a short implementation report with this exact information:
90
+
91
+ ```txt
92
+ Real UI source files:
93
+ - <route/page/component path>
94
+ - <shared component path>
95
+
96
+ Real components to reuse/extract:
97
+ - <component name> from <path>
98
+
99
+ Runtime boundaries to replace:
100
+ - <auth/session/data/provider/API/etc.>
101
+
102
+ Scenes requiring real UI:
103
+ - Scene <n>: reuse <component/path>
104
+
105
+ Scenes that are pure marketing overlays:
106
+ - Scene <n>: hook/CTA/background only, no existing app screen replaced
107
+
108
+ Blocked items / user decisions needed:
109
+ - <none or specific blocker>
110
+ ```
111
+
112
+ If this report cannot name the real UI source files and components for an app-screen scene, do not implement that scene as a clone. Stop and ask for direction.
113
+
114
+ ## Allowed Exceptions
115
+
116
+ The only acceptable places to create new Remotion-only JSX are:
117
+
118
+ - abstract hook cards, captions, labels, callouts, highlights, spotlights, and CTA/end cards
119
+ - cursor/touch/debug overlays
120
+ - camera frames, masks, backgrounds, and transitions around real UI
121
+ - intentionally approved mockups/redesigns after telling the user real UI reuse is blocked or not being attempted
122
+
123
+ These exceptions do not allow recreating existing app screens, tables, forms, dashboards, report cards, sidebars, or score-entry sheets.
124
+
125
+ ## Workflow
126
+
127
+ 1. Inspect before editing.
128
+ - For non-trivial work, read `references/real-ui-bridge-example.md` and `references/anti-patterns.md` before implementation.
129
+ - Treat every project as different; do not assume the app uses the same framework, router, auth provider, data layer, styling system, or component structure as a prior project.
130
+ - Check Git status and decide whether to create a new branch/worktree before making video/demo changes. Prefer isolation for broad edits or any auth/data/provider/runtime boundary changes.
131
+ - Identify the real routes/components that own the target UI. Record their file paths before building Remotion scenes.
132
+ - Identify data hooks, auth guards, providers, live API calls, browser-only assumptions, and external connectors.
133
+ - Identify styling/global CSS/font/image/runtime requirements that Remotion must load or stub.
134
+ - List the smallest boundaries that must be replaced for Remotion rendering.
135
+ - Do not proceed to implementation until you know whether each requested scene will reuse real UI, wrap real UI, or requires explicit user approval for a video-only mockup.
136
+
137
+ 2. Preserve real UI components.
138
+ - Keep class names, component structure, spacing, and shared UI imports.
139
+ - Extract presentational views only when necessary.
140
+ - Reuse existing forms, tables, dashboards, navigation shells, sheets, reports, cards, and toolbars instead of rebuilding them in a Remotion-only file.
141
+ - Do not replace complex real screens with simplified video-only copies unless the user explicitly requests a redesign or approves a mockup after being told real UI reuse is blocked.
142
+
143
+ 3. Create deterministic demo runtime/data.
144
+ - Provide local/demo sessions, users, accounts, projects, plans, records, notifications, payments, activity, or whatever domain entities the UI expects.
145
+ - Simulate loading, success, failure, empty, and optimistic states when useful for the video.
146
+ - Replace live mutations/actions with local no-op or scripted state changes.
147
+ - Keep user-facing copy production-like, not labeled as mock/demo.
148
+
149
+ 4. Build a code-native Remotion bridge.
150
+ - Import the real UI view/component into a Remotion composition.
151
+ - If the requested app screen currently exists only as a route wired to live hooks, extract a presentational component from that route and use it in both the app and Remotion.
152
+ - Provide required providers, styles, aliases/stubs, and local data.
153
+ - Stub framework integrations as needed, e.g. routing/link/navigation modules, image/font loaders, analytics, or server-only APIs.
154
+ - Keep Remotion-specific code around the UI, not inside every component.
155
+ - If production/shared components must be edited for video compatibility, keep changes additive and low-risk: optional props, `data-video-target` attributes, exported presentational boundaries, or harmless no-op hooks. Avoid changing live behavior, import semantics, routing, auth, or data logic just to satisfy Remotion.
156
+ - Do not create new Remotion-only JSX that imitates an existing app screen unless explicitly approved as a mockup/redesign.
157
+
158
+ 5. Script interactions with a centralized timeline.
159
+ - Define named actions with `targetId`, fallback coordinates, `downFrame`, `upFrame`, and `commitFrame`.
160
+ - Derive route/view/data state from frame and commit frames.
161
+ - Make click/tap visibly land before route/data state changes.
162
+ - Keep timing constants readable and named so the user can tune them in Remotion Studio.
163
+
164
+ 6. Use semantic target measurement.
165
+ - Add `data-video-target="meaningful-id"` to the real clickable/focusable UI element.
166
+ - Measure target boxes at render time with `getBoundingClientRect()`.
167
+ - Convert viewport/Studio-scaled pixels into composition pixels relative to a `data-video-coordinate-root` using `useVideoConfig()` width/height.
168
+ - Position cursor/touch indicators at the normalized target center.
169
+ - Render optional debug target overlays in the same normalized coordinate space.
170
+
171
+ 7. Handle responsive/mobile separately.
172
+ - Create a dedicated mobile/tablet composition with realistic portrait viewport dimensions. Default final portrait/mobile output to 1080×1920; avoid tiny phone canvases unless rendering drafts or explicitly requested.
173
+ - Default final landscape output to 1920×1080 so desktop UI has enough room and does not look cramped.
174
+ - Add mobile-only targets for drawer links, bottom tabs, cards, and stacked rows that replace desktop sidebars/tables.
175
+ - Use touch/tap indicators, not mouse cursors.
176
+ - Drive drawer/menu open state from timeline commit frames.
177
+ - For long pages, drive vertical scroll from timeline state with deterministic transforms such as `translate3d(...)`; avoid CSS transitions on frame-driven transforms.
178
+
179
+ 8. Verify.
180
+ - Read `references/completion-checklist.md` and use it as the completion gate.
181
+ - Run targeted typecheck/build for every touched package, including the app package, Remotion host package, and any shared component package.
182
+ - Render stills at each important click/tap/down/commit frame.
183
+ - Render at least one debug-overlay still per composition that proves semantic targets and cursor/touch indicators share the same normalized coordinate space. If target measurement uses `getBoundingClientRect()`, verify it is normalized for Remotion Studio scaling with the composition root and `useVideoConfig()` dimensions.
184
+ - Add or document convenient render commands/scripts for the new composition, including still/debug rendering and final video rendering. A registered composition without an easy render path is incomplete.
185
+ - Render the final composition to a video artifact after stills look correct; do not call the workflow complete with stills only unless the user asked only for stills.
186
+ - Review every production/shared component touched for video compatibility. Confirm changes are additive and do not alter live auth, routing, data fetching, imports, or app behavior unnecessarily.
187
+ - Compare the rendered output against the user's script scene by scene. Flag mismatches such as a tiny link where the script asked for a button, clipped UI, unclear status transitions, or highlighting the wrong row/entity.
188
+ - Before calling the work complete, perform a real-UI compliance check: for each app-screen scene, name the real component imported/extracted. If any app-screen scene is hand-built as lookalike JSX without approval, mark the work incomplete.
189
+
190
+ ## Implementation Patterns
191
+
192
+ ### Timeline action shape
193
+
194
+ ```ts
195
+ type VideoAction = {
196
+ id: string;
197
+ label: string;
198
+ target: {
199
+ frame: number;
200
+ targetId: string;
201
+ x: number; // fallback only
202
+ y: number; // fallback only
203
+ };
204
+ downFrame: number;
205
+ upFrame: number;
206
+ commitFrame: number;
207
+ };
208
+ ```
209
+
210
+ ### Coordinate normalization pattern
211
+
212
+ Use this normalization for every cursor/touch/debug-overlay target measured from the DOM. Do not use raw `targetRect.left - rootRect.left` unless the root is guaranteed to be unscaled.
213
+
214
+ ```ts
215
+ const targetRect = target.getBoundingClientRect();
216
+ const rootRect = root.getBoundingClientRect();
217
+ const scaleX = rootRect.width / compositionWidth;
218
+ const scaleY = rootRect.height / compositionHeight;
219
+
220
+ const normalized = {
221
+ x: (targetRect.left - rootRect.left) / scaleX,
222
+ y: (targetRect.top - rootRect.top) / scaleY,
223
+ width: targetRect.width / scaleX,
224
+ height: targetRect.height / scaleY,
225
+ };
226
+ ```
227
+
228
+ ### Frame-driven scroll pattern
229
+
230
+ ```ts
231
+ const scrollY = interpolate(frame, [start, end], [0, 240], {
232
+ extrapolateLeft: "clamp",
233
+ extrapolateRight: "clamp",
234
+ });
235
+
236
+ <div style={{ transform: `translate3d(0, ${-Math.round(scrollY)}px, 0)` }} />
237
+ ```
238
+
239
+ Do not add CSS `transition` to the same transform; Remotion is already sampling exact frames.
240
+
241
+ ## Common Pitfalls
242
+
243
+ - Recreating screens instead of importing real components.
244
+ - Starting with a blank Remotion composition and drawing a similar dashboard/form/table from scratch.
245
+ - Treating visual similarity as success. Under this skill, visual similarity is not enough; app-screen scenes must be backed by real app components.
246
+ - Building a polished marketing mockup that resembles the app but bypasses the app's actual route/components.
247
+ - Seeing existing components such as selection bars, grids, forms, tables, or action bars, then rebuilding similar JSX inside the Remotion composition instead of extracting/importing them.
248
+ - Using hardcoded coordinates after adding `data-video-target` instead of measuring semantic targets.
249
+ - Measuring targets with `getBoundingClientRect()` but forgetting to normalize for Remotion Studio scaling.
250
+ - Registering a composition but forgetting render scripts, debug still scripts, or a final rendered video artifact.
251
+ - Touching production/shared components for video needs without reviewing whether the changes affect live behavior.
252
+ - Calling work done when the output only partially matches the user's script, has clipped UI, has unclear click/tap targets, uses the wrong visual emphasis, or renders final output at a cramped canvas size when FHD would be appropriate.
253
+ - Putting demo/auth/video labels in user-facing UI.
254
+ - Hardcoding click coordinates without semantic target measurement.
255
+ - Using raw `getBoundingClientRect()` values directly in cursor transforms; Studio preview scaling will make clicks drift.
256
+ - Measuring targets in one coordinate space while rendering overlays/cursors in another.
257
+ - Changing UI state at click-down instead of after click-up.
258
+ - Using desktop cursor/pan/zoom language for mobile proofs.
259
+ - Adding CSS transitions to frame-driven Remotion transforms, causing scroll or camera jitter.
260
+ - Letting real auth, database, payments, uploads, or analytics execute during video rendering.
261
+
262
+ ## Skill Maintenance
263
+
264
+ When a user adds a reusable preference, correction, or workflow rule while building Remotion videos, update this skill if the rule is project-agnostic. Keep project-specific routes, filenames, brands, and domain entities out of this generic skill; those belong in project-local skills or documentation.