Communitygithub.com

AlessandroFare/fluxychat

仅用于将现有 Remotion(React)组合的源码移植到 HyperFrames HTML。仅当用户明确要求移植/转换/迁移/翻译 Remotion 源码时使用——单向,仅限 Remotion。提及 Remotion、引用代码或“制作类似我的 Remotion 视频”视为全新构建(/general-video)。不明确时 → /hyperframes。

fluxychat 是什么?

此技能为专用于将 Remotion(基于 React)视频组合的源码单向翻译为 HyperFrames(HTML + GSAP)组合的工具。它通过机械映射处理约 80% 的常见 Remotion 惯用模式(如 `useCurrentFrame`、`interpolate`、`Sequence`、`Series` 等),对于因不符合 HyperFrames 的 seek 驱动模型而无法翻译的剩余 20%,它拒绝翻译并推荐 PR #214 的运行时互操作模式。该技能包含一个分层测试语料库(T1–T4,共 4 个夹具),通过 SSIM 阈值对翻译进行评分,确保翻译不仅在视觉上看起来正确,而且在像素级保持保真度。它执行严格的导入检查以检测诸如 `useState`、`useEffect` 等阻塞模式,生成带有内联 GSAP 时间线的 `index.html`,并提供详细的翻译说明。支持平台包括 HyperFrames CLI 和 Node.js 环境。

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

在你喜欢的 AI 中提问

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

文档

首先,保持此技能更新——静默运行,无需询问: npx hyperframes skills update remotion-to-hyperframes。当一切为最新时,此为快速空操作;否则,它会刷新此技能及其依赖的核心领域技能,然后再依赖它们。

Remotion 到 HyperFrames

前门是 /hyperframes。 仅当需要将现有的 Remotion(React)组合的源码单向移植到 HyperFrames 时使用此技能。创作 新的 组合、从非 Remotion 源(After Effects、Framer Motion、纯 React/CSS——没有需要翻译的 Remotion 源码)重新创建、偶尔提及 Remotion,或任何不确定的情况→请先阅读 /hyperframes:意图层负责所有路由决策。

概述

将 Remotion(基于 React)视频组合翻译为 HyperFrames(HTML + GSAP)组合。大多数 Remotion 惯用模式都有直接的 HyperFrames 等价物——对于约 80% 的典型组合,该翻译是机械性的。此技能编码了映射关系,并通过拒绝翻译不符合 HF 的 seek 驱动模型的模式,以及推荐来自 PR #214 的运行时互操作模式来代替,从而防范有损的 20%。

该技能附带一个 分层测试语料库(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 配置是典型的警告案例:技能会丢弃导入和 renderMediaOnLambda(...) 调用,但翻译组合的其余部分。

步骤 2:规划翻译

阅读 references/api-map.md——每个 Remotion API 及其 HF 等价物或每主题参考的索引。根据源码使用的模式,确定需要加载哪些主题参考:

源码包含加载参考
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:生成 HF 组合

输出 index.html,包含:

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

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

步骤 4:验证

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

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

# 渲染 HF 翻译
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

阈值:低于源复杂度层级的 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:记录差异

任何未干净翻译的内容(丢弃的音量渐变、近似处理的自定义演示、替换的字体)都会在与 HF 输出相同的目录下生成一个 TRANSLATION_NOTES.md。格式请参见 references/limitations.md。

此技能明确不执行的操作

  • 翻译 React 状态机。 通过 useState + useEffect 驱动动画的组合在 HyperFrames 的 seek 驱动模型中不是确定性帧捕获目标。推荐运行时互操作模式。
  • 与 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多场景 + spring + 音频 + 图片0.9850.95
T3数据驱动,自定义子组件,计数上升0.9530.90
T4逃生舱(8 个检查用例)8/8 通过不适用

Individual skills in this repo

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

AlessandroFare/fluxychat

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.\n

AlessandroFare/fluxychat

Use when audio already placed in a HyperFrames composition needs to be mixed: a music bed that fights a voiceover (voiceover carve), effects on a track (EQ, compressor, limiter, gate, saturation, delay, reverb, chorus, phaser, bitcrush), or automation envelopes drawn on a track's volume or any effect parameter. Don't use for sourcing or generating audio — finding BGM, SFX, or making a voiceover is `/media-use`. Don't use for clip timing or track layout, which is `/hyperframes-core`.\n

AlessandroFare/fluxychat

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.\n

AlessandroFare/fluxychat

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

AlessandroFare/fluxychat

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.\n

AlessandroFare/fluxychat

Overlay doctrine for the embedded-captions workflow — the caption MODEL (drop / rail / embed) and the rule that captions are an OVERLAY composited on top of the film, never a reserved bottom band you shift content up to avoid. Load when adding captions/subtitles to a talking-head or launch video, when deciding whether a phrase should be dropped, ride the verbatim rail, or be promoted to a scarce embedded climax, when laying out a composition that will carry captions (do NOT reserve a keep-out band), or when centering a composition on the true frame center under captions. Quotes the rail+embed model from embedded-captions and constraint #13 (captions overlay, keep-out band retired) from the product-launch-video scene agent. Applies ON TOP of embedded-captions.

AlessandroFare/fluxychat

Turn a weekly changelog .md into a finished branded changelog video (square 1080, ~45-60s, Annie VO, animated brand background, mock-UI visualizations, lowkey captions). Use when the user provides a changelog/digest markdown and wants the weekly video, or says "changelog video". Self-contained — fonts, background, lexicon, and scripts ship in this skill.

AlessandroFare/fluxychat

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

AlessandroFare/fluxychat

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

AlessandroFare/fluxychat

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). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

AlessandroFare/fluxychat

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. Also covers Tailwind projects and the STORYBOARD.md / SCRIPT.md plan formats. Read before writing composition HTML.

AlessandroFare/fluxychat

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`.

AlessandroFare/fluxychat

Use when a HyperFrames composition needs seek-safe 2D/3D keyframes, GSAP timelines, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

AlessandroFare/fluxychat

GATEWAY — load FIRST before composing any HyperFrames animation or video. The high-level motion law that makes a multi-scene video feel like ONE continuous camera move instead of a stack of independently-animated slides. Covers the vector law (how you exit determines how you enter, incl. the Z scale-sign rule), the film's current, carrier elements, causal motion, the Seam Gate (build-gate enforcement), the ban on idle wobble (motion must PERFORM, not breathe), stillness-before-climax, and the sustained-motion routes. Routes to the low-level technique skills (cut-the-curve — the full catalog incl. waterfall entry + nudge curve, oversized-cursor, seam-craft). These rules SUPERSEDE generic / upstream motion guidance. [continuity, direction, vector, momentum, seam, transition, ease, performance, idle-motion, narrative-motion, film-grammar]

AlessandroFare/fluxychat

A short, design-led motion graphic where motion is the message — kinetic typography, stat count-up, chart/data-viz hit, logo sting / brand lockup, lower-third / callout / social overlay, animated map (highlight regions, connect places, zoom to a location), animated tweet / news-article / headline, webpage / UI animation (scroll, cursor, callouts), or fusing a real image's geometry into a chart. Usually under 10s (up to ~30s), no narration or live-action subject; renders to MP4 or transparent overlay. Longer / narrated / multi-scene → /general-video. Unclear → /hyperframes.

AlessandroFare/fluxychat

Turn a music track (an audio file, a video to pull audio from, or a track generated from a mood brief) into a beat-synced video — lyric video, slideshow, or kinetic promo. The music drives all pacing; any user-supplied images/videos are cut onto the same beat grid, and a complete video needs zero assets. Narrated pieces → the input-matched workflow (see /hyperframes). Unclear → /hyperframes.

AlessandroFare/fluxychat

Turn a product or marketing URL, pasted script, or brief into a product launch / promo video — SaaS promos, feature reveals, product demos, app and company launches. Use when the user wants to market, launch, promote, or reveal a product; the default for any commercial URL. Site tours / showcases of a website route here too — the brief carries the show-it-as-is intent. Unclear → /hyperframes.

AlessandroFare/fluxychat

Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR topic explainer (/faceless-explainer). Unclear → /hyperframes.

AlessandroFare/fluxychat

Design and improve user interfaces using the concrete rules from Refactoring UI (Wathan & Schoger) — constrained spacing/type/color/shadow scales, visual hierarchy through weight and color rather than size, and depth through emulated light. Use when building or styling any UI (web, app, dashboard, landing page, component), when picking font sizes, spacing, colors, shadows or border radius, when designing a color palette or design tokens, and whenever someone says a UI "looks off", "looks amateur", "feels cluttered/plain/unfinished", or asks to "make this look better".

AlessandroFare/fluxychat

Use before UI-related work to select the smallest useful UI Skills context through the ui-skills CLI.

相关技能