Communitygithub.com

AlessandroFare/fluxychat

將現有的 Remotion (React) 合成內容移植到 HyperFrames HTML。僅在明確要求移植/轉換/遷移/翻譯 Remotion 原始碼時使用——單向、僅限 Remotion。若只是提及 Remotion、僅作為參考的程式碼,或「製作一個像我的 Remotion 影片那樣的東西」均屬於新建立 (/general-video)。不確定時 → /hyperframes。

fluxychat 是什麼?

此技能提供一個專門的管道,將現有的 Remotion (React) 影片合成內容單向移植到 HyperFrames (HTML + GSAP) 格式。它透過自動化處理約 80% 的常見 Remotion 慣用語法(如 Sequence、useCurrentFrame、interpolate 等)來實現機械化的翻譯,同時嚴謹地拒絕移植無法完美對應 HyperFrames 基於時間軸模型之模式,並就此類情況建議運行時互通模式。 技能配備一個分層測試語料庫(T1–T4,共 4 個測試案例),透過結構相似性指標(SSIM)閾值來評分翻譯品質,確保翻譯結果的行為與像素級渲染均忠於原始 Remotion 輸出。此技能支援 Claude Code 等 AI 代理平台,其工作流程包含原始碼檢查、根據來源內容進行有選擇性的參考文件載入、生成對應的 HyperFrames index.html 檔案,並提供驗證與回歸測試的指令。它也能夠產出 TRANSLATION_NOTES.md 來記錄任何因近似處理或功能捨棄而產生的差異。此技能不支援反向移植或非 Remotion 的來源。

相容平台~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 基於時間軸搜尋模型的模式來防護其餘有損耗的 20%,同時建議改用來自 PR #214 的運行時互通模式。

此技能附帶一個分層測試語料庫(T1–T4,總共 4 個測試案例),該語料庫會根據測量到的 SSIM 閾值來評分翻譯結果。請務必在運行評測後再進行翻譯——一個「看起來正確」但渲染結果比已驗證基準線低 0.05 SSIM 的翻譯其實是錯誤的。

使用時機

僅在使用者明確要求從 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 及其 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 設定每個動畫屬性的初始 (from) 狀態。
  • 底部一個 <script> 標籤,其中包含一個暫停的 gsap.timeline({paused: true})。每個 Remotion 的 useCurrentFrame() 推導結果都會在正確的偏移量處成為此時間軸上的一個補間動畫。
  • window.__timelines["<composition-id>"] = tl; 將時間軸註冊到 HF 的運行時中。

自訂的 React 子元件會作為重複的 HTML 內聯,使用 prop 介面作為模板(關於每個實例的 data-* 模式,請參閱 parameters.md)。

步驟 4:驗證

執行評測工具——完整指南請參閱 references/eval.md。快速路徑:

# 渲染 Remotion 基準線(在 fixture 中執行 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 來查看哪些影格出現了差異,然後重新閱讀相關的時間軸/序列/媒體參考文件。

重要提示:兩個渲染必須使用匹配的像素格式。在 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 基於時間軸搜尋的模型中並非確定性的影格擷取目標。建議使用運行時互通模式。
  • 與 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.

相關技能