Skills
Skill 32 of 34
Port an existing Remotion (React) composition’s source to HyperFrames HTML.
5 minutes · 1,099 words · 11 sections
Install
npx skills add heygen-com/hyperframes --skill remotion-to-hyperframesnpx skills add heygen-com/hyperframes/plugin marketplace add heygen-com/hyperframesThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
First, keep this skill fresh — confirm with the user before running:
npx hyperframes skills update remotion-to-hyperframes. A fast no-op when everything is current; otherwise it refreshes this skill plus the core domain skills it depends on before you rely on them.
The front door is
/hyperframes. Use this only to port an existing Remotion (React) composition’s source into HyperFrames, one way. Authoring a new composition, re-creating from a non-Remotion source (After Effects, Framer Motion, plain React / CSS — there is no Remotion source to translate), a passing Remotion mention, or any uncertainty → read/hyperframesfirst: the intent layer owns every route decision.
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% by refusing to translate patterns that don’t fit HF’s seek-driven model and recommending the runtime interop pattern from PR #214 (opens in a new tab) instead.
The skill ships with a tiered test corpus (T1–T4, 4 fixtures total) that grades translations against measured SSIM thresholds. Don’t translate without running the eval — a translation that “looks right” but renders 0.05 SSIM lower than the validated baseline is silently wrong.
Use this skill ONLY when the user explicitly asks to migrate from Remotion. Example trigger phrases:
Do NOT use this skill when:
NOT SUPPORTED (decline — this is not what this skill does):
.aep), a Framer Motion / plain-React / CSS animation, or any other tool’s source is not a Remotion composition — there is no Remotion source to translate. Re-create it natively via /general-video, or decline if HyperFrames can’t represent it.When in doubt, default to authoring a native HyperFrames composition with /general-video (the general HyperFrames authoring flow) instead.
Run scripts/lint_source.py (opens in a new tab) over the Remotion source directory. The lint detects patterns that can’t translate cleanly:
useState, useReducer, useEffect/useLayoutEffect with non-empty deps, async calculateMetadata, third-party React UI libraries (MUI, Chakra, Mantine, antd, shadcn, Radix, NextUI).@remotion/lambda config, delayRender, useCallback, useMemo, custom hooks.staticFile, interpolateColors.If any blocker fires, stop. Read references/escape-hatch.md (opens in a new tab) and surface the recommendation message. Warnings don’t stop translation — drop the offending construct in step 3 and note the gap in TRANSLATION_NOTES.md. @remotion/lambda config is the canonical warning case: the skill drops the import + renderMediaOnLambda(...) calls but translates the rest of the composition.
Read references/api-map.md (opens in a new tab) — the index of every Remotion API and its HF equivalent or per-topic reference. Identify which topic references you’ll need based on what the source uses:
| Source contains | Load reference |
|---|---|
Composition, defaultProps, schema, calculateMetadata | parameters.md (opens in a new tab) |
Sequence, Series, Loop, AbsoluteFill, Freeze | sequencing.md (opens in a new tab) |
useCurrentFrame, interpolate, spring, Easing, interpolateColors | timing.md (opens in a new tab) |
Audio, Video, Img, IFrame, staticFile, delayRender | media.md (opens in a new tab) |
TransitionSeries, @remotion/transitions | transitions.md (opens in a new tab) |
@remotion/lottie | lottie.md (opens in a new tab) |
@remotion/google-fonts/<Family>, Font.loadFont, @font-face | fonts.md (opens in a new tab) |
Don’t load all of them — load only what the specific source needs.
Search the live catalog for any visual effect the table does not map. When the source paints a look with no HF API equivalent — a scanline/CRT overlay, a glitch or chromatic-aberration pass, a shader wipe, a film-grain treatment — run npx hyperframes catalog --query "<the effect, in plain English>" --json before hand-writing it in GSAP. The search needs nothing installed: no project, no prior add, no account. It ranks the whole hosted registry (~400 blocks and components) from any directory, and transitions.md already takes this route for clockWipe() / iris() via npx hyperframes add sdf-iris. A real component is closer to the source than a hand-approximation, so it usually raises the SSIM rather than lowering it — but the render diff in Step 4 is still the arbiter. Hand-write the effect when a search returns nothing that fits, and record the substitution in TRANSLATION_NOTES.md either way.
Emit index.html with:
<div id="stage"> carrying the composition’s data-composition-id, data-start="0", data-duration (in seconds), data-fps, data-width, data-height, plus one data-* per scalar prop.<div> per scene with data-composition-src="compositions/<scene>.html" and data-start / data-duration / data-track-index. The root holds no nested layout.compositions/<scene>.html per scene (a <template> sub-composition): its inline <style> for layout (CSS sets the from state of every animated property), its markup, and one paused gsap.timeline({paused: true}) in the scene’s local time. Every Remotion useCurrentFrame() derivation becomes a tween on that timeline at the offset within the scene.window.__timelines["<scene-id>"] = tl; in each scene file, and window.__timelines["<composition-id>"] for the root’s own (possibly empty) timeline.Custom React subcomponents inline as repeated HTML using the prop interface as the template (see parameters.md (opens in a new tab) for the per-instance data-* pattern).
Run the eval harness — references/eval.md (opens in a new tab) for the full guide. Quick path:
# Render Remotion baseline (after npm install in the fixture)
cd remotion-src && npx remotion render <CompositionId> out/baseline.mp4
# Render HF translation
cd ../hf-src && npx hyperframes render --skill=remotion-to-hyperframes --output ../hf.mp4
# SSIM diff
../../scripts/render_diff.sh ./remotion-src/out/baseline.mp4 ./hf.mp4 ./diffThreshold: ~0.02 below p05 of the source’s complexity tier (see eval.md‘s validated thresholds table). If the diff fails, run scripts/frame_strip.sh (opens in a new tab) to see which frames diverged, then re-read the relevant timing/sequencing/media reference.
Critical: both renders must use matching pixel format. Set Config.setVideoImageFormat("png") + Config.setColorSpace("bt709") in the Remotion source’s remotion.config.ts — otherwise the diff measures encoder differences (~0.05 SSIM hit), not translation fidelity.
Anything that didn’t translate cleanly (volume ramps dropped, custom presentations approximated, fonts substituted) gets a TRANSLATION_NOTES.md written next to the HF output. See references/limitations.md (opens in a new tab) for the format.
useState + useEffect are not deterministic frame-capture targets in HyperFrames’ seek-driven model. Recommend the runtime interop pattern.(@remotion/lambda is not a blocker — Lambda config is deployment, not animation. The skill drops it as a warning and translates the rest. See references/escape-hatch.md (opens in a new tab).)
Run the test corpus orchestrator:
./assets/test-corpus/run.shIt runs T1, T2, T3 (render + diff) and T4 (lint validation), prints a per-tier pass/fail table, and emits an aggregate JSON report. Use this to verify the skill is working end-to-end on a clean checkout — and as a regression check after editing any reference.
Validated baseline (as of 2026-04-27):
| Tier | Composition shape | Mean SSIM | Threshold |
|---|---|---|---|
| T1 | single-element fade-in | 0.974 | 0.95 |
| T2 | multi-scene + spring + audio + image | 0.985 | 0.95 |
| T3 | data-driven, custom subcomponents, count-up | 0.953 | 0.90 |
| T4 | escape-hatch (8 lint cases) | 8/8 pass | n/a |
Port an existing Remotion (React) composition's source to HyperFrames HTML. Use ONLY on an explicit ask to port/convert/migrate/translate a Remotion source — one-way, Remotion-only. A passing Remotion mention, reference-only code, or "make something like my Remotion video" is a fresh build (/general-video). Unclear → /hyperframes.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 23 September 2026.SKILL.md, not by matching a directory convention. 3 distinct layouts observed: .agents/skills/*/SKILL.md, registry/blocks/*/SKILL.md, skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by HeyGen, declaring 2 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./heygen-com/hyperframes.md, and each skill at its own .md URL.76 files · 163 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 32.
Documentation the agent loads on demand, rather than up front.
Executable code the skill can run.
Templates, schemas and fixtures the skill draws on.
assets/1 file · 0 B
assets/test-corpus/2 files · 8 KB
assets/test-corpus/tier-1-title-card/3 files · 4 KB
assets/test-corpus/tier-1-title-card/hf-src/compositions/1 file · 1 KB
assets/test-corpus/tier-1-title-card/hf-src/1 file · 1 KB
assets/test-corpus/tier-1-title-card/remotion-src/3 files · 1 KB
assets/test-corpus/tier-1-title-card/remotion-src/src/3 files · 1 KB
assets/test-corpus/tier-2-multi-scene/4 files · 7 KB
assets/test-corpus/tier-2-multi-scene/hf-src/compositions/3 files · 3 KB
assets/test-corpus/tier-2-multi-scene/hf-src/1 file · 2 KB
assets/test-corpus/tier-2-multi-scene/remotion-src/3 files · 1 KB
assets/test-corpus/tier-2-multi-scene/remotion-src/src/3 files · 3 KB
assets/test-corpus/tier-3-data-driven/3 files · 8 KB
assets/test-corpus/tier-3-data-driven/hf-src/compositions/3 files · 6 KB
assets/test-corpus/tier-3-data-driven/hf-src/1 file · 2 KB
assets/test-corpus/tier-3-data-driven/remotion-src/3 files · 1 KB
assets/test-corpus/tier-3-data-driven/remotion-src/src/components/3 files · 3 KB
assets/test-corpus/tier-3-data-driven/remotion-src/src/3 files · 2 KB
assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/3 files · 2 KB
assets/test-corpus/tier-4-escape-hatch/cases/8 files · 9 KBassets/test-corpus/tier-4-escape-hatch/3 files · 9 KB