Adds the directory + SKILL.md frontmatter for a new skill that translates Remotion (React) compositions to HyperFrames (HTML+GSAP). This is the foundation PR; subsequent PRs in the stack add the eval harness, test corpus, translation references, and finally the SKILL.md body. The frontmatter description enumerates trigger phrases and explicit out-of-scope cases (useState/useEffect, async metadata, @remotion/lambda) so the skill bows out cleanly when a Remotion composition isn't a clean translation target — those should use the runtime interop pattern from PR #214 instead. Validated with skill-creator's package_skill.py.
3.7 KiB
name, description
| name | description |
|---|---|
| remotion-to-hyperframes | Translate a Remotion (React-based) video composition into a HyperFrames HTML composition. Use when (1) the user provides Remotion source (`.tsx` files using `useCurrentFrame`, `Sequence`, `AbsoluteFill`, `interpolate`, `spring`, `staticFile`, etc.) and asks to port, convert, or migrate it to HyperFrames; (2) the user pastes a Remotion entry point (`Root.tsx`, `Composition`) and wants HTML; (3) the user links a Remotion repo and asks for the HyperFrames equivalent; (4) the user says "port my Remotion project", "translate this Remotion code", "rewrite as HTML", or "I have a Remotion comp, make it HyperFrames". Skill detects unsupported patterns (useState, useEffect with side effects, async calculateMetadata, third-party React component libraries, `@remotion/lambda` features) and recommends the runtime interop escape hatch instead of attempting a lossy translation. |
Remotion to HyperFrames
Overview
Translate Remotion (React-based) video compositions into HyperFrames (HTML + GSAP) compositions. Most Remotion idioms have direct HyperFrames equivalents — the translation is mechanical for ~80% of typical compositions. This skill encodes the mapping and guards against the lossy 20%.
Workflow
-
Lint the source. Run the source-lint script against the Remotion project to surface any patterns that can't translate cleanly (React state hooks, async metadata, third-party React components). If the source uses any blocker pattern, recommend the runtime interop escape hatch (PR #214 pattern) instead of attempting a translation.
-
Scaffold the translation. Generate a HyperFrames HTML skeleton from the Remotion source —
Compositionprops becomedata-*attributes on the root#stagediv,<Sequence>wrappers become elements withdata-start/data-duration/data-track-index,<AbsoluteFill>becomes<div style="position:absolute;inset:0">. Leave timing-sensitive and easing-sensitive sections marked for refinement. -
Refine timing and easing. Convert each
useCurrentFrame-driveninterpolate/springcall into an equivalent paused GSAP tween on the composition timeline. This is the part where translation correctness matters most — easing curves and stagger timing are what readers notice. -
Validate by frame-diff. Render both the original Remotion composition and the translated HyperFrames composition, then compute per-frame SSIM. Threshold-based pass/fail tells the user which scenes are visually correct and which need another pass.
-
Document the gaps. Any Remotion features that didn't translate (custom React subcomponents requiring manual rewrite, library transitions without a HyperFrames equivalent, etc.) get listed in a
TRANSLATION_NOTES.mdnext to the output so the user can finish them or decide to use the runtime interop instead.
What this skill explicitly does NOT do
- Translate React state machines. Remotion compositions that drive animation via
useState+useEffectare not deterministic frame-capture targets in HyperFrames' model; recommend the runtime interop escape hatch. - Translate
@remotion/lambdaconfiguration. HyperFrames is single-machine today; Lambda-specific code drops with a note. - Run Remotion's render pipeline alongside HyperFrames. That's the runtime interop pattern from PR #214 — a separate problem with a separate (and existing) solution.
Status
Skill scaffold landed; eval harness, test corpus, and translation references are added in subsequent PRs in the stack. Until then, this skill should bow out and recommend the user hand-translate or use the runtime interop pattern.