Communitygithub.com

alecs5am/ralphy

HyperFrames HTML でビデオコンポジション、アニメーション、タイトルカード、オーバーレイ、キャプション、ナレーション、音声連動ビジュアル、シーントランジションを作成します。HTML ベースの動画コンテンツの構築、音声に同期した字幕の追加、テキスト読み上げナレーションの生成、音楽駆動のビート同期・グロー・パルスなどの音声連動アニメーション、アニメーションテキストのハイライト(マーカースイープ、手描き円、バースト線、スクリブル、スケッチアウト)、シーン間のトランジション(クロスフェード、ワイプ、リビール、シェーダートランジション)を求められた際に使用します。コンポジションの作成、タイミング、メディア、そして動画制作の全ワークフローをカバーします。dev-loop CLI コマンド(init, lint, inspect, preview, render)については hyperframes-cli スキルを、アセット前処理コマンド(tts, transcribe, remove-background)については hyperframes-media スキルを参照してください。

ralphy とは?

HyperFrames は、HTML をビデオの唯一のソースオブトゥルースとして扱う、革新的な動画制作フレームワークです。このスキルは、ビデオコンポジション、アニメーション、タイトルカード、オーバーレイ、キャプション、ナレーション、音声連動ビジュアル、シーントランジションを HyperFrames HTML で作成するための包括的なガイドを提供します。開発者は、`data-*` 属性によるタイミング制御、GSAP タイムラインによるアニメーション、CSS によるスタイリングを用いて、HTML ファイル自体でビデオ全体を定義できます。このアプローチにより、レイアウトをアニメーションよりも先に静的な HTML+CSS として構築することで、意図しない要素の重なりを防ぎます。プロンプト拡張、デザインシステムの読み込み、ビート方向のテンプレートといった段階的なワークフローを提供し、一貫性のある高品質な動画制作を支援します。また、パラメータ化されたコンポジションにより、同じテンプレートから異なるコンテンツを動的にレンダリングすることも可能です。

対応~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/alecs5am/ralphy/tree/HEAD/.agents/skills/hyperframes

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

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

ドキュメント

HyperFrames

HTML はビデオの唯一のソースオブトゥルースです。コンポジションは、タイミングのための data-* 属性、アニメーションのための GSAP タイムライン、そして外観のための CSS を持つ HTML ファイルです。フレームワークは、クリップの可視性、メディア再生、タイムライン同期を処理します。

アプローチ

ディスカバリー(探索的なリクエストのみ)

ユーザーが方向性を決めていないオープンエンドなリクエスト(「製品ローンチビデオを作って」「ブランド用に何か作って」など)では、色を決める前に意図を理解します:

  • 視聴者 — 誰が見るのか?開発者?経営幹部?一般消費者?
  • プラットフォーム — どこで再生されるのか?ソーシャルメディア(15秒)、Webサイトのヒーロー、製品デモ、社内向け?
  • 優先事項 — 何が最も重要か?モーションの品質?コンテンツの正確性?ブランドの忠実度?速度?
  • バリエーション — ユーザーは複数の選択肢を望んでいるのか、それとも単一のベストな案を望んでいるのか?

具体的なリクエスト(「タイトルカードを追加して」「シーン3のタイミングを修正して」)の場合は、ディスカバリーをスキップします。

探索的なリクエストについては、意味のある違いがある2〜3のバリエーションを検討します — 単なる色の変更ではなく、異なるペーシング、エネルギーレベル、または構造的なアプローチです。一つは安全で予想されるもの、もう一つは野心的なもの。これを必須にはしません — 適切な場合に利用可能なツールです。

ステップ 1: デザインシステム

design.md または DESIGN.md がプロジェクトに存在する場合、まずそれを読みます(両方の大文字小文字を確認 — Linux では別のファイルです)。ブランドカラー、フォント、制約の唯一のソースオブトゥルースです。正確な値を使用し — 色を発明したりフォントを代替したりしないでください。どのような形式でも機能します(YAML フロントマター、散文、表 — 値を抽出するだけです)。

指定されたフォントがローカルに見つからない場合(fonts/ ディレクトリに .woff2 ファイルがなく、組み込みフォントでもない場合)、HTML を書く前にユーザーに警告します:「design.md に [フォント名] が指定されていますが、フォントファイルが見つかりません。fonts/ に .woff2 ファイルを追加してください。追加されない場合は、最も近い組み込みの代替フォントを使用します。」

design.md が存在しない場合は、ユーザーに選択肢を提示します:

  1. ユーザーがスタイルや雰囲気を指定した? → visual-styles.md を読み、8つの名前付きプリセットから最も近いものを選びます。
  2. 視覚的にオプションを閲覧したい? → デザインピッカーを実行:reference/design-picker.md を読み、完全なワークフローを確認します。これにより視覚的なピッカーページが提供されます。ユーザーはブラウザで雰囲気、パレット、タイポグラフィ、モーションを設定し、生成された design.md をコピーして会話に貼り付けます。
  3. スキップして迅速に進めたい? → 雰囲気、明るいか暗いか、ブランドカラーやフォントはあるか?を尋ねます。次に house-style.md からパレットを選びます。

design.md はブランドを定義します。ビデオコンポジションのルールを定義するものではありません。 それらのルールは references/video-composition.md と house-style.md から来ます。ブランドカラーはビデオに適したスケールで使用します — Web UI の不透明度ではありません。

ステップ 2: プロンプト拡張

すべてのコンポジション(単一シーンの作品と些細な編集を除く)で常に実行します。このステップは、ユーザーの意図を design.md と house-style.md に照らして具体化し、すべての下流エージェントが同じように読み取る一貫した中間出力を生成します。

完全なプロセスと出力形式については references/prompt-expansion.md を読んでください。

ステップ 3: 計画

HTML を書く前に、高いレベルで考えます:

  1. 何を — 視聴者は何を体験すべきか?ナラティブアーク、キーモーメント、感情的なビートを特定します。
  2. 構造 — コンポジションはいくつあるか、どのコンポジションがサブコンポジション vs インラインか、どのトラックが何を運ぶか(ビデオ、オーディオ、オーバーレイ、キャプション)。
  3. リズム — 実装前にシーンのリズムを宣言します。どのシーンがクイックヒットか、どのシーンがホールドか、シェーダーがどこに配置されるか、エネルギーがどこでピークに達するか。パターンに名前を付けます:fast-fast-SLOW-fast-SHADER-hold。references/beat-direction.md でリズムテンプレートを読んでください。
  4. タイミング — どのクリップが再生時間を決定するか、トランジションはどこに配置されるか、ペーシングはどうか。
  5. レイアウト — まず最終状態を構築します。以下の「アニメーションの前にレイアウト」を参照。
  6. アニメーション — 次に、以下のルールを使用してモーションを追加します。

要求されたものを構築します。 「タイトルカード」のリクエストは、「タイトルカード + 3つの補助シーン + 背景音楽 + キャプション」のリクエストではありません。すべてのシーン、すべての要素、すべてのトゥイーンは、その存在意義を正当化する必要があります。追加のシーンや要素が作品を真に向上させる場合は提案します — 勝手に追加しないでください。

小さな編集(色の修正、タイミングの調整、1つの要素の追加)の場合は、すぐにルールにスキップします。

アニメーションの前にレイアウト

すべての要素を、最も目立つ瞬間 — 完全に入場し、正しく配置され、まだ退場していないフレーム — に配置します。これをまず静的な HTML+CSS として記述します。まだ GSAP はありません。

なぜこれが重要なのか: 要素をアニメーションの開始状態(画面外、スケール0、不透明度0)に配置し、そこから着地すべき場所にトゥイーンすると、最終的なレイアウトを推測していることになります。重なりはビデオがレンダリングされるまで見えません。最初に最終状態を構築することで、モーションを追加する前にレイアウトの問題を確認して修正できます。

プロセス

  1. 各シーンのヒーローフレームを特定 — 最も多くの要素が同時に表示される瞬間。これが構築するレイアウトです。
  2. そのフレームの静的 CSS を記述。.scene-content コンテナは、width: 100%; height: 100%; padding: Npx;、display: flex; flex-direction: column; gap: Npx; box-sizing: border-box を使用してシーン全体を埋める必要があります。パディングを使用してコンテンツを内側に押し込みます — コンテンツコンテナに position: absolute; top: Npx を決して使用しないでください。絶対配置のコンテンツコンテナは、コンテンツが残りのスペースよりも高い場合にオーバーフローします。position: absolute は装飾要素のみに予約します。
  3. gsap.from() で入場を追加 — 画面外/非表示から CSS の位置へアニメーションします。CSS の位置が真実であり、トゥイーンはそこに到達するための経路を記述します。(data-composition-src でロードされたサブコンポジションでは、gsap.fromTo() を優先します — references/motion-principles.md の負荷のかかる GSAP ルールを参照。)
  4. gsap.to() で退場を追加 — CSS の位置から画面外/非表示へアニメーションします。

例

/* scene-content はシーンを埋め、パディングがコンテンツを配置 */
.scene-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 120px 160px;
  gap: 24px;
  box-sizing: border-box;
}
.title {
  font-size: 120px;
}
.subtitle {
  font-size: 42px;
}
/* コンテナは任意のシーンサイズ(1920x1080、1080x1920 など)にフィット */
/* パディングがコンテンツを配置。Flex + gap がスペーシングを処理 */

間違い — ハードコードされた寸法と絶対配置:

.scene-content {
  position: absolute;
  top: 200px;
  left: 160px;
  width: 1920px;
  height: 1080px;
  display: flex; /* ... */
}
// ステップ 3: それらの位置にアニメーションで入場
三目並べから(".title", { y: 60, opacity: 0, duration: 0.6, ease: "power3.out" }, 0);
三目並べから(".subtitle", { y: 40, opacity: 0, duration: 0.5, ease: "power3.out" }, 0.2);
三目並べから(".logo", { scale: 0.8, opacity: 0, duration: 0.4, ease: "power2.out" }, 0.3);

// ステップ 4: それらの位置からアニメーションで退場
三目並べへ(".title", { y: -40, opacity: 0, duration: 0.4, ease: "power2.in" }, 3);
三目並べへ(".subtitle", { y: -30, opacity: 0, duration: 0.3, ease: "power2.in" }, 3.1);
三目並べへ(".logo", { scale: 0.9, opacity: 0, duration: 0.3, ease: "power2.in" }, 3.2);

要素が時間を超えてスペースを共有する場合

要素 A が要素 B が同じエリアに入場する前に退場する場合、両方ともそれぞれのヒーローフレームに対して正しい CSS 位置を持つ必要があります。タイムラインの順序は、それらが視覚的に共存しないことを保証します — しかし、レイアウトステップをスキップすると、タイミングエラーによって偶然重なるケースを見逃します。

意図的な重なりと見なされるもの

レイヤー効果(テキストの背後にあるグロー、影の要素、背景パターン)と z スタックデザイン(カードスタック、奥行きレイヤー)は意図的です。レイアウトステップの目的は、意図しない重なりを捕捉することです — 2つの見出しが互いに重なる、統計がラベルを覆う、コンテンツがフレームからはみ出るなど。

データ属性

すべてのクリップ

属性必須値
idはい一意の識別子
data-startはい秒数またはクリップ ID 参照("el-1"、"intro + 2")
data-durationimg/div/コンポジションに必須秒数。ビデオ/オーディオはメディアの長さをデフォルトとする。
data-track-indexはい整数。同じトラックのクリップは重複できません。
data-media-startいいえソースへのトリムオフセット(秒)
data-volumeいいえ0-1(デフォルト 1)

data-track-index は視覚的なレイヤリングに影響しません — CSS z-index を使用します。

コンポジションクリップ

属性必須値
data-composition-idはい一意のコンポジション ID
data-startはい開始時間(ルートコンポジション:"0" を使用)
data-durationはいGSAP タイムラインの長さよりも優先される
data-width / data-heightはいピクセル寸法(1920x1080 または 1080x1920)
data-composition-srcいいえ外部 HTML ファイルへのパス
data-variable-valuesいいえサブコンポジションホスト上のインスタンスごとの変数オーバーライドの JSON オブジェクト

ルート <html> 要素上:

属性必須値
data-composition-variablesいいえ宣言された変数(id/type/label/default)の JSON 配列 — Studio 編集 UI を駆動し、getVariables() のデフォルトを提供する

コンポジション構造

data-composition-src でロードされるサブコンポジションは <template> ラッパーを使用します。スタンドアロンコンポジション(メインの index.html)は <template> を使用しません — data-composition-id の div を直接 <body> に配置します。スタンドアロンファイルで <template> を使用すると、すべてのコンテンツがブラウザから隠され、レンダリングが壊れます。

サブコンポジションの構造:

<template id="my-comp-template">
  <div data-composition-id="my-comp" data-width="1920" data-height="1080">
    <!-- コンテンツ -->
    <style>
      [data-composition-id="my-comp"] {
        /* スコープ付きスタイル */
      }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      window.__timelines = window.__timelines || {};
      const tl = gsap.timeline({ paused: true });
      // トゥイーン...
      window.__timelines["my-comp"] = tl;
    </script>
  </div>
</template>

ルートでのロード:<div id="el-1" data-composition-id="my-comp" data-composition-src="compositions/my-comp.html" data-start="0" data-duration="10" data-track-index="1"></div>

変数(パラメータ化されたコンポジション)

異なるコンテンツ(タイトル、テーマカラー、価格、キャプション)で同じコンポジションを、ソース HTML を編集せずにレンダリングします。

3 ステップのパターン:

  1. 宣言:コンポジションの <html> ルートに data-composition-variables で変数を宣言します。各エントリには id、type(string、number、color、boolean、enum のいずれか)、label、default が必要です。Enum エントリには options: [{value, label}, ...] も必要です。
  2. 読み取り:コンポジションのスクリプト内で window.__hyperframes.getVariables() を使用して解決された値を読み取ります。宣言されたデフォルト + インスタンスごとのオーバーライド + CLI オーバーライドのマージ結果を返します。
  3. オーバーライド:レンダリング時に npx hyperframes render --variables '{...}'(トップレベル)またはホスト要素の data-variable-values='{...}'(サブコンポジションのインスタンスごと)でオーバーライドします。
<!doctype html>
<html
  data-composition-variables='[
  {"id":"title","type":"string","label":"Title","default":"Hello"},
  {"id":"theme","type":"enum","label":"Theme","default":"light","options":[
    {"value":"light","label":"Light"},
    {"value":"dark","label":"Dark"}
  ]}
]'
>
  <body>
    <div data-composition-id="root" data-width="1920" data-height="1080">
      <h1 id="hero" class="clip" data-start="0" data-duration="3"></h1>
      <script>
        const { title, theme } = window.__hyperframes.getVariables();
        document.getElementById("hero").textContent = title;
        document.body.dataset.theme = theme;
      </script>
    </div>
  </body>
</html>
# 開発プレビューは宣言されたデフォルトを使用
npx hyperframes preview

# オーバーライドでレンダリング
npx hyperframes render --variables '{"title":"Q4 レポート","theme":"dark"}' --output q4.mp4

# または JSON ファイルから
npx hyperframes render --variables-file ./vars.json

サブコンポジションのインスタンスごとの値: data-composition-src でロードされたサブコンポジション内でも同じ getVariables() が機能します。各ホスト要素は独自の値を渡します:

<div
  data-composition-id="card-pro"
  data-composition-src="compositions/card.html"
  data-variable-values='{"title":"Pro","price":"$29"}'
></div>
<div
  data-composition-id="card-enterprise"
  data-composition-src="compositions/card.html"
  data-variable-values='{"title":"Enterprise","price":"お問い合わせください"}'
></div>

ビデオコンポジションのルール

完全なルールについては references/video-composition.md を読んでください。これらのルールは常に適用されます:

  • テキストの最大ラップ幅は 50% 未満にしない — 特に縦型ビデオ(1080x1920)では、パディングと flex を使用してタイトルを狭めすぎないでください。
  • 色には常に hsl() を使用し、hsl() からアニメーションする — 16進数や rgb() は避け、hsl トゥイーンは補間がうまくいきます。
  • GSAP キーフレーム構文はサポートされていません — キーフレームは避け、個別のトゥイーンのチェーンのために tl.to().to().to() を使用します。
  • clip-path を inset() または circle() と共に使用して、トランジション/リビールを作成する。
  • <style> で GSAP アウトライン宣言を設定しない — GSAP がそれらをトゥイーンします。
  • data-duration は GSAP の時間よりも優先されます — コンポジションの data-duration が設定されている場合、それがコンポジションの全長を決定します。GSAP タイムラインは data-duration の範囲内で動作します。data-duration が GSAP の時間よりも長い場合、コンポジションは GSAP の終了後、終了まで最後のフレームに留まります。
  • パーセンテージベースの幅/高さはルートコンポジションでは機能しません — ルートコンポジションで 100% 幅/高さを必要とする div には data-width と data-height を使用します。
  • <img> クリップの object-fit にガードレールを使用する — data-duration が設定された画像は、object-fit: cover が設定されていなければなりません。

補足ルール

  • display: none は使用しない — アクティブでないクリップはフレームワークによって opacity: 0 に設定されます(上書きしないでください)。
  • 各スクリプトタグは一意の ID を持つ。
  • 画像は <img> タグで、loading="eager" を設定して予熱する。
  • <style> または <script> タグに data-* 時間属性を設定しない — これらは非表示の要素です。
  • <script> タグ内で document.querySelector または getElementById を使用する場合、コンテキストの data-composition-id でスコープを絞る。
  • <source> タグを持つ <video> 要素は、<video> 自体に data-start と data-duration を設定する。
  • サブコンポジションでは gsap.from() よりも gsap.fromTo() を優先する — これにより、サブコンポジションのスクリプト実行時(DOM が準備できているが CSS の位置がまだ適用されていない可能性がある)に期待される動作が保証されます。
  • サブコンポジションは常に「paused: true」タイムラインを使用して window.__timelines に登録する — サブコンポジションの開始/停止はフレームワークによって管理されます。

完全な詳細については video-composition.md を参照してください。

Individual skills in this repo

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

alecs5am/ralphy

>- Composition and render craft — assembles scenario.json plus asset-manifest.json into a HyperFrames HTML composition and renders the mp4. Owns timing, transitions, captions, audio mix and ducking, the green zone, the render pipeline, and VO sync. Generates no media of its own. USE WHEN the user asks to "compose the video", "render", "preview", "fix the captions", "mix the audio", "tighten the transitions", "final cut", or edits HyperFrames composition code. TRIGGER (EN): "render it", "compose the video", "captions", "audio mix", "transitions", "final cut", "preview the composition".

alecs5am/ralphy

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

alecs5am/ralphy

Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.

alecs5am/ralphy

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, and registry discovery.

alecs5am/ralphy

>- How to make a vivid, character-driven brand POSTER — a single still image, not a video. A generalized overlay on the art-director step: supplies the poster-as-landing architecture (top banner → massive beveled wordmark → chest-up hero photo → scattered vinyl-sticker collage → copy block → thin footer strip), the parameterized slot set (brand, exclamation word, hero, product, palette, original blob glyph, aesthetic register), the model stack (gpt-5.4-image-2 for crisp typography, gemini fallback), and the niche's failure modes. Works for ANY brand and ANY aesthetic the user names — Y2K streetwear, vaporwave, grunge zine, clean DTC — the skill supplies the layout know-how, the user supplies the subject + vibe. USE WHEN the user asks for a poster / flyer / drop poster / "poster-as-landing-page" / brand key-art / album-cover-style still / hype graphic, with no specific existing poster to reproduce. This is a content-niche craft-overlay SKILL (generalized), loaded on top of a poster-format template match — n...

alecs5am/ralphy

>- Compatibility shim for the legacy `/ralphy-remotion` skill name. Use when a saved Claude Code command, old project note, or user request still mentions Ralphy Remotion; redirect the task to HyperFrames and the current Ralphy render playbooks instead of authoring new Remotion code.

alecs5am/ralphy

>- Compatibility shim for the legacy `/remotion-to-hyperframes` skill name. Use when an old project, note, or user request asks to migrate Ralphy Remotion work; translate the intent into the current HyperFrames composition model and follow the editor and HyperFrames playbooks.

alecs5am/ralphy

The full extract → classify → blueprint → de-dup → publish pipeline for a finished `.ralphy/workspaces/<ws>/projects/<id>/`. Reads its `units/*/unit.json` (#069) as the Unit source of truth, then factors the project into ALL FIVE entities — Unit + the four typed blocks Template (structure), Style (look), Recipe (effect/treatment), Asset (reusable media). Applies the recipe-vs-tag split (#082/#083): a candidate is a Recipe only if it carries an extractable artifact (ffmpeg filtergraph / HyperFram

alecs5am/ralphy

>- How to make a realistic AI UGC ad for a product — generalized niche know-how that looks real and doesn't feel AI. A domain overlay on the standard pipeline: supplies the shooting-script shape (timestamp | VO | shot | mannerism), the creator-persona build, the problem-mirror hook, the trust-through-mannerisms rule, and the 9:16 ~15s UGC format defaults. Works for ANY product the user names — their skincare line, a no-name app, a gadget. The skill supplies the know-how; the user supplies the product. USE WHEN the user asks for a UGC ad / creator-style product ad / "make an ad that looks like a real person reviewing my product" / testimonial-style or problem-solution short for TikTok / Reels / Shorts, with no specific existing video to reproduce. This is a niche SKILL (generalized), not a remix TEMPLATE. For "remix this exact ad but swap the product/person", use the remix path (docs/skills-vs-templates.md). For swapping the creator in an existing clip, see /ugc-model-swap.

alecs5am/ralphy

When the user needs marketing ideas, inspiration, or strategies for their SaaS or software product. Also use when the user asks for 'marketing ideas,' 'growth ideas,' 'how to market,' 'marketing strategies,' 'marketing tactics,' 'ways to promote,' 'ideas to grow,' 'what else can I try,' 'I don't know how to market this,' 'brainstorm marketing,' or 'what marketing should I do.' Use this as a starting point whenever someone is stuck or looking for inspiration on how to grow. For specific channel execution, see the relevant skill (paid-ads, social-content, email-sequence, etc.).

alecs5am/ralphy

Full end-to-end workflow for generating a realistic AI UGC ad for a product. 15-second format. Looks real. Doesn't feel AI.

関連スキル