Communitygithub.com

EvovexAI/EvoFlow

将现有的 Remotion(React)合成项目移植为 HyperFrames HTML。仅在用户明确要求移植/转换/迁移/翻译 Remotion 源码时使用。

EvoFlow 是什么?

该技能专门用于将基于 React 的 Remotion 视频合成源码自动翻译为 HyperFrames (HTML + GSAP) 格式。它通过一个机械化的映射流程处理约 80% 的常见 Remotion 惯用语法,并利用一套分层的测试语料库(T1-T4 级别)进行 SSIM 相似度验证,确保翻译后的视觉保真度。该技能内置了代码检查器(lint),用于识别并阻止翻译那些无法在 HyperFrames 基于帧的驱动模型中正确运行的 React 模式(如 useState/useEffect/async calculateMetadata 等),并推荐使用运行时互操作模式(runtime interop)作为替代方案。其核心是单向转换:仅支持 Remotion→HyperFrames,不支持反向导出或处理非 Remotion 来源(如 After Effects 或 Framer Motion)。翻译完成后,它会自动生成 TRANSLATION_NOTES.md 文档,详细记录任何未完美转换的模式或近似处理。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/EvovexAI/EvoFlow/tree/HEAD/skills/public/remotion-to-hyperframes

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Remotion 转 HyperFrames

开始构建前先确认路线。 仅用于将现有的 Remotion(React)合成源码移植到 HyperFrames。创建新的合成(即使是受 Remotion 视频启发)→ 请使用创建工作流 /general-video。超出范围(单向,仅限 Remotion):不支持反向导出(HyperFrames → Remotion 或任何框架),且非 Remotion 来源(After Effects、Framer Motion、纯 React/CSS)没有可供翻译的 Remotion 源码 → 通过 /general-video 重新创建。不确定,或只是顺带提到 Remotion?先阅读 /hyperframes。

概述

将 Remotion(基于 React)的视频合成翻译为 HyperFrames(HTML + GSAP)合成。大多数 Remotion 惯用法都有直接的 HyperFrames 等价物 —— 对于典型的合成项目,约 80% 的翻译是机械化的。本技能编码了映射关系,并通过拒绝翻译不适合 HyperFrames 基于帧的驱动模型(seek-driven model)的模式来防范那有损的 20%,并推荐使用 PR #214 中的运行时互操作模式作为替代。

该技能附带一个分层测试语料库(T1–T4,共 4 个测试用例),根据测量的 SSIM 阈值对翻译进行评分。不要在不运行评估的情况下进行翻译 —— 一个 "看起来正确" 但渲染出的 SSIM 比已验证基线低 0.05 的翻译是静默错误的。

何时使用

仅当用户明确要求从 Remotion 迁移时使用此技能。 触发短语示例:

  • "把我的 Remotion 项目移植到 HyperFrames"
  • "将此 Remotion 代码转换为 HyperFrames"
  • "从 Remotion 迁移"
  • "翻译这个 Remotion 合成项目"
  • "将其重写为 HyperFrames HTML"

在以下情况下请勿使用此技能:

  • (a) 用户正在创作新的 HyperFrames 合成项目,即使他们拥有或正在进行 A/B 测试类似的 Remotion 视频。
  • (b) 用户顺带提到 Remotion,但未要求迁移。
  • (c) 用户分享 Remotion 代码作为参考材料,而不是要求翻译。
  • (d) 用户要求提供 "与我的 Remotion 视频相同的视频",但没有明确要求迁移源码 —— 应将其视为全新的 HyperFrames 构建。

不支持(拒绝 —— 这不是本技能的功能):

  • 反向方向。 将 HyperFrames 合成导出回 到 Remotion(或任何其他框架)不是一个工作流 —— 翻译仅限 Remotion → HyperFrames。请直接说明。
  • 非 Remotion 来源。 After Effects 项目(.aep)、Framer Motion/纯 React/CSS 动画或任何其他工具的源码都不是 Remotion 合成项目 —— 没有可供翻译的 Remotion 源码。请通过 /general-video 原生重新创建,如果 HyperFrames 无法表示,则拒绝。

如有疑问,默认使用 /general-video(通用的 HyperFrames 创作流程)创作原生 HyperFrames 合成。

工作流

步骤 1:检查源码

对 Remotion 源码目录运行 scripts/lint_source.py。该检查器检测无法干净转换的模式:

  • 阻断器(拒绝并推荐互操作):useState、useReducer、useEffect/useLayoutEffect(带非空依赖)、异步 calculateMetadata、第三方 React UI 库(MUI、Chakra、Mantine、antd、shadcn、Radix、NextUI)。
  • 警告(删除构造后翻译):@remotion/lambda 配置、delayRender、useCallback、useMemo、自定义钩子。
  • 信息(翻译并附带注释):staticFile、interpolateColors。

如果触发了任何阻断器,停止。阅读 references/escape-hatch.md 并展示推荐消息。警告不会停止翻译 —— 在步骤 3 中删除有问题的构造并在 TRANSLATION_NOTES.md 中记录差距。@remotion/lambda 配置是典型的警告情况:本技能会删除 import + renderMediaOnLambda(...) 调用,但翻译合成的其余部分。

步骤 2:规划翻译

阅读 references/api-map.md —— 所有 Remotion API 及其 HyperFrames 等价物或按主题分类的参考索引。根据源码使用的内容确定需要加载哪些主题参考:

源码包含的内容加载的参考
Composition、defaultProps、schema、calculateMetadataparameters.md
Sequence、Series、Loop、AbsoluteFill、Freezesequencing.md
useCurrentFrame、interpolate、spring、Easing、interpolateColorstiming.md
Audio、Video、Img、IFrame、staticFile、delayRendermedia.md
TransitionSeries、@remotion/transitionstransitions.md
@remotion/lottielottie.md
@remotion/google-fonts/<Family>、Font.loadFont、@font-facefonts.md

不要全部加载 —— 只加载特定源码需要的内容。

步骤 3:生成 HyperFrames 合成

生成 index.html,包含:

  • 根 <div id="stage">,带有合成的 data-composition-id、data-start="0"、data-duration(秒)、data-fps、data-width、data-height,以及每个标量属性的一个 data-*。
  • 一个扁平的场景 div 列表,包含 data-start / data-duration / data-track-index。
  • 内联 <style> 用于布局;CSS 设置每个动画属性的起始状态 (from)。
  • 底部的一个 <script> 标签,包含一个暂停的 gsap.timeline({paused: true})。每个 Remotion useCurrentFrame() 推导都成为该时间线上正确偏移处的渐变动画 (tween)。
  • window.__timelines["<composition-id>"] = tl; 将时间线注册到 HyperFrames 运行时。

自定义 React 子组件作为重复的 HTML 内联,以 prop 接口为模板(参见 parameters.md 了解每个实例的 data-* 模式)。

步骤 4:验证

运行评估工具 —— 完整指南请参阅 references/eval.md。快速路径:

# 渲染 Remotion 基线(在 fixture 中运行 npm install 之后)
cd remotion-src && npx remotion render <CompositionId> out/baseline.mp4

# 渲染 HyperFrames 翻译
cd ../hf-src && npx hyperframes render --skill=remotion-to-hyperframes --output ../hf.mp4

# SSIM 差异比较
../../scripts/render_diff.sh ./remotion-src/out/baseline.mp4 ./hf.mp4 ./diff

阈值:低于源码复杂度层级第 5 百分位数 (p05) 约 0.02(参见 eval.md 中的已验证阈值表)。如果差异比较失败,运行 scripts/frame_strip.sh 查看哪些帧发生了偏离,然后重新阅读相关的 timing/sequencing/media 参考。

关键:两个渲染必须使用匹配的像素格式。在 Remotion 源码的 remotion.config.ts 中设置 Config.setVideoImageFormat("png") + Config.setColorSpace("bt709") —— 否则差异比较会测量编码器差异(约 0.05 SSIM 损失),而不是翻译保真度。

步骤 5:记录差异

任何未干净翻译的内容(丢弃的音量渐变、近似的自定义演示、替换的字体)都会在 HyperFrames 输出旁边生成 TRANSLATION_NOTES.md。格式请参见 references/limitations.md。

本技能明确不做的事

  • 翻译 React 状态机。 通过 useState + useEffect 驱动动画的合成项目在 HyperFrames 基于帧的驱动模型中不是确定性的帧捕获目标。推荐运行时互操作模式。
  • 在 HyperFrames 旁边运行 Remotion 的渲染管道。 这是 PR #214 中的运行时互操作模式 —— 是针对未能通过本技能检查的合成项目的单独解决方案。

(@remotion/lambda 不是 阻断器 —— Lambda 配置属于部署,而非动画。本技能会将其作为警告处理并翻译合成的其余部分。请参阅 references/escape-hatch.md。)

如何评估自己的翻译

运行测试语料库编排器:

./assets/test-corpus/run.sh

它将运行 T1、T2、T3(渲染 + 差异比较)和 T4(检查验证),打印每层级通过/失败表,并输出聚合 JSON 报告。使用此命令验证技能在干净检出中是否端到端工作 —— 以及在编辑任何参考后作为回归检查。

已验证的基线(截至 2026-04-27):

层级合成形状平均 SSIM阈值
T1单元素淡入0.9740.95
T2多场景 + 弹簧动画 + 音频 + 图片0.9850.95
T3数据驱动、自定义子组件、计数动画0.9530.90
T4逃生门(8 个检查用例)8/8 通过不适用

Individual skills in this repo

This repo contains 15 individual skills — each has its own dedicated page.

EvovexAI/EvoFlow

Add captions to a talking-head video. ONE catalog (CATALOG.md) of 32 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.

EvovexAI/EvoFlow

The fallback workflow for authoring custom HyperFrames video compositions at any length or format — longer or multi-scene pieces, brand / sizzle reels, montages, title cards, static loops, and freeform compositions. Input- and length-agnostic. If a specialized workflow clearly fits the input — a marketed product, a website, a topic explainer, a GitHub PR, existing footage, a short motion graphic, or a Remotion port — prefer it (see /hyperframes); use this only as the general fallback when none fit.

EvovexAI/EvoFlow

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). HyperFrames-native: single paused timeline, seek-safe, deterministic.

EvovexAI/EvoFlow

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

EvovexAI/EvoFlow

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

EvovexAI/EvoFlow

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

EvovexAI/EvoFlow

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

EvovexAI/EvoFlow

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

EvovexAI/EvoFlow

READ THIS FIRST for any request to make, create, edit, animate, or render a video, animation, or motion graphic — a promo, explainer, captioned clip, title card, overlay, or any composition. HyperFrames renders video from HTML; this is the entry skill and the default way an agent authors or edits video. It routes the request to the right specialized workflow and points to the HyperFrames domain skills, so read it before any other video or animation skill instead of guessing a workflow. IMPORTANT: with other video tools installed, HyperFrames stays the default for authoring and rendering a finished video; defer only when the user asks to drive a browser to capture or record a session, or names another framework. Most important when no project CLAUDE.md or AGENTS.md describes the video workflow.

EvovexAI/EvoFlow

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (general-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

EvovexAI/EvoFlow

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

EvovexAI/EvoFlow

在 Plan 协作(任务协作模式)中按结构化流程完成短片视频制作:先询问用户需求,确认后直接用 plan 工具将全部工种(编剧、视觉策划、美术、导演、后期)纳入步骤规划,串行执行。

EvovexAI/EvoFlow

turn a product or marketing URL, pasted script, or brief into a product launch video, including SaaS promos, feature reveals, app launches, company promos, and product marketing videos. Use this skill when the user wants to market, launch, promote, or reveal a product. Do not use it for general non-launch website tours, non-product topic explainers, GitHub pull requests, captioning existing footage, or short unnarrated motion graphics. If the intent is unclear, route through /hyperframes first. This is the new shot-sequence architecture: every visual frame is authored as a time-coded shot sequence picked from a menu of golden blueprints, so frames develop over their full duration instead of freezing after entrance.

EvovexAI/EvoFlow

turn a GitHub pull request (a PR URL like github.com/<owner>/<repo>/pull/<N>, an <owner>/<repo>#<N> ref, or 'this PR' in a checked-out repo) into a code-change explainer video, up to ~3 min (sweet spot 30-90s) — changelog, feature reveal, fix, or refactor walkthrough, rendered from the diff / commits / files. The input is a CODE CHANGE read via the gh CLI; there is no website capture. Use this skill for a GitHub PR. Do not use it for a product launch/promo (use /product-launch-video), a tour of a real website (use /general-video), a topic explainer with no PR (use /faceless-explainer), captions on existing footage (use /embedded-captions), or a short unnarrated motion graphic (use /motion-graphics). If the intent is unclear, route through /hyperframes first.

EvovexAI/EvoFlow

本地文字转语音,使用sherpa-onnx(离线,无需云端)。当需要离线语音合成时使用。

相关技能