Communitygithub.com

Remotion から HyperFrames への変換

既存の Remotion (React) コンポジションを HyperFrames HTML に移植します。ユーザーが明示的に Remotion のソースを移植/変換/移行することを要求した場合にのみ使用します。

Remotion から HyperFrames への変換 とは?

このスキルは、Remotion (React) で作成されたビデオコンポジションを HyperFrames (HTML + GSAP) に変換するための専用ツールです。これはあくまで一方通行の変換であり、Remotion から HyperFrames へのみ対応します。逆方向の変換 (HyperFrames → Remotion) や、After Effects、Framer Motion などの非 Remotion ソースからの変換はスコープ外です。変換プロセスは、ソースコードの lint (useState、useEffect、非同期 calculateMetadata などのサポートされていないパターンを検出)、API マッピングリファレンスの読み込み、HF コンポジションの生成、検証、ギャップの文書化という5つのステップで構成されます。このスキルには、SSIM しきい値に基づいて翻訳を評価する階層化されたテストコーパス (T1~T4) が含まれており、変換の品質を保証します。変換が難しいパターンについては、ランタイム相互運用パターンを推奨し、変換の試行を拒否します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/9018/mychat/tree/HEAD/OpenMontage/.agents/skills/remotion-to-hyperframes

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

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% は機械的に変換可能です。このスキルはマッピングをエンコードし、損失の多い 20% に対して、HF のシーク駆動モデルに適合しないパターンの変換を拒否し、代わりに PR #214 のランタイム相互運用パターンを推奨することで防御します。

このスキルには、階層化されたテストコーパス (T1~T4、合計 4 つのフィクスチャ) が含まれており、測定された SSIM しきい値に対して翻訳を評価します。評価を実行せずに翻訳しないでください。「見た目は正しい」が、検証済みのベースラインより 0.05 SSIM が低い翻訳は、静かに間違っています。

使用するタイミング

ユーザーが明示的に Remotion からの移行を要求した場合にのみ、このスキルを使用してください。 トリガーフレーズの例:

  • 「Remotion プロジェクトを HyperFrames に移植して」
  • 「この Remotion コードを HyperFrames に変換して」
  • 「Remotion から移行したい」
  • 「この Remotion コンポを翻訳して」
  • 「これを HyperFrames HTML として書き換えて」

次の場合は、このスキルを使用しないでください。

  • (a) ユーザーが 新しい HyperFrames コンポジションを作成している場合 (類似の Remotion ビデオを持っている、または A/B テストしている場合でも)。
  • (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: ソースを lint する

Remotion ソースディレクトリに対して scripts/lint_source.py を実行します。lint は、クリーンに変換できないパターンを検出します:

  • ブロッカー (拒否 + 相互運用を推奨): useState、useReducer、空でない依存関係を持つ useEffect/useLayoutEffect、非同期の calculateMetadata、サードパーティの React UI ライブラリ (MUI、Chakra、Mantine、antd、shadcn、Radix、NextUI)。
  • 警告 (構造を削除して翻訳): @remotion/lambda の設定、delayRender、useCallback、useMemo、カスタムフック。
  • 情報 (注釈付きで翻訳): staticFile、interpolateColors。

ブロッカーが 1 つでも発生した場合は、停止します。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、およびスカラープロップごとに 1 つの data-* を含めます。
  • data-start / data-duration / data-track-index を持つシーン div のフラットリスト。
  • レイアウト用のインライン <style>。CSS はすべてのアニメーションプロパティの from 状態を設定します。
  • 一番下にある単一の <script> タグ。これには、一時停止された 1 つの gsap.timeline({paused: true}) が含まれます。すべての Remotion useCurrentFrame() の派生は、このタイムライン上の適切なオフセットでのトゥイーンになります。
  • window.__timelines["<composition-id>"] = tl; は、タイムラインを HF のランタイムに登録します。

カスタム React サブコンポーネントは、プロップインターフェースをテンプレートとして使用して、繰り返し HTML としてインライン化されます (インスタンスごとの 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 を実行して どの フレームが分岐したかを確認し、関連するタイミング/シーケンス/メディアリファレンスを再読してください。

重要: 両方のレンダリングは、一致するピクセル形式を使用する必要があります。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 のシーク駆動モデルにおける決定論的なフレームキャプチャターゲットではありません。ランタイム相互運用パターンを推奨します。
  • Remotion のレンダリングパイプラインを HyperFrames と一緒に実行しません。 それは PR #214 のランタイム相互運用パターンです — このスキルの lint に失敗するコンポジションのための別のソリューションです。

(@remotion/lambda はブロッカーでは_ありません_ — Lambda 設定はデプロイメントであり、アニメーションではありません。スキルはそれを警告として削除し、残りを翻訳します。references/escape-hatch.md を参照してください。)

自分の翻訳を評価する方法

テストコーパスオーケストレーターを実行します:

./assets/test-corpus/run.sh

T1、T2、T3 (レンダリング + 差分) と T4 (lint 検証) を実行し、階層ごとの合格/不合格テーブルを出力し、集計 JSON レポートを生成します。これを使用して、クリーンチェックアウトでスキルがエンドツーエンドで機能していることを確認し、リファレンスを編集した後のリグレッションチェックとして使用します。

検証済みベースライン (2026-04-27 時点):

階層コンポジションの形状平均 SSIMしきい値
T1単一要素のフェードイン0.9740.95
T2マルチシーン + spring + オーディオ + 画像0.9850.95
T3データ駆動型、カスタムサブコンポーネント、カウントアップ0.9530.90
T4エスケープハッチ (8 lint ケース)8/8 合格n/a

Individual skills in this repo

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

9018/mychat

Generate AI videos from text prompts using multiple provider gateways. Use when: (1) Generating videos from text descriptions, (2) Creating AI-generated video clips for content production, (3) Image-to-video generation with a reference image, (4) Choosing between video generation providers (VEO, Kling, Sora, Runway, Seedance, MiniMax, Gemini Omni). Supports gateways: HeyGen API, fal.ai API, Kling official direct API, and the Gemini API (Gemini Omni Flash).

9018/mychat

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

9018/mychat

Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.

9018/mychat

Review local character animation with schema checks, Playwright browser previews, frame sampling, and FFmpeg/ffprobe final output checks.

9018/mychat

Create videos from a text prompt using HeyGen's Video Agent. Use when: (1) Creating a video from a description or idea, (2) Generating explainer, demo, or marketing videos from a prompt, (3) Making a video without specifying exact avatars, voices, or scenes, (4) Quick video prototyping or drafts, (5) One-shot prompt-to-video generation, (6) User says "make me a video" or "create a video about X".

9018/mychat

Generate Mandarin and multilingual narration with Volcengine Doubao Speech 2.0. Use when creating Chinese voiceovers, when the user prefers Doubao/Volcengine/火山引擎/豆包 TTS, or when narration needs character-level timestamp metadata for subtitles.

9018/mychat

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

9018/mychat

Use when implementing Disney's 12 animation principles with Framer Motion in React applications

9018/mychat

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.

9018/mychat

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

9018/mychat

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.

9018/mychat

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

9018/mychat

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.

9018/mychat

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

9018/mychat

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 (website-to-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.

9018/mychat

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.

9018/mychat

Toolkit-specific Remotion patterns — custom transitions, shared components, and project conventions. For core Remotion framework knowledge (hooks, animations, rendering, etc.), see the `remotion-official` skill.

9018/mychat

Animate SVG character rigs with GSAP, CSS transforms, Remotion frame control, and HyperFrames-compatible browser previews.

9018/mychat

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

9018/mychat

Download video and audio from YouTube and 1000+ sites using yt-dlp. No API keys needed. Use when: (1) Downloading a video from YouTube or other sites, (2) Extracting audio from a video URL, (3) Downloading subtitles/captions from a video, (4) Getting video metadata without downloading.

関連スキル