Communitygithub.com

heygen-com/hyperframes

HyperFrames コンポジションコントラクト — 1つのレンダリング可能なプロジェクトを構築します。コンポジション構造、`data-*`タイミング属性、`class="clip"`、トラック、サブコンポジション、変数、フレームワーク管理のメディア再生、決定論的レンダリングルール、バリデーションに使用します。コンポジションHTMLを作成する前に読んでください。

hyperframes とは?

HyperFrames Coreスキルは、HTMLベースのビデオレンダリングフレームワークであるHyperFramesの中心的な技術契約を定義します。このスキルは、1つのレンダリング可能なプロジェクトを構築するための完全なガイドを提供し、特に`data-*`属性によるタイミング宣言、`class="clip"`の使用、トラックとクリップの構成、サブコンポジションの連携、変数とメディアの管理、そして決定論的レンダリングルールに焦点を当てています。 このスキルは、Claude CodeやCursorなどのAIエージェントがHyperFramesプロジェクトのコンポジションHTMLを作成する際に必須のリファレンスとして機能します。スタンドアロンコンポジションとサブコンポジションの2つのルート形式の違い、GSAPアニメーションの注意点(例:transformとGSAPの競合回避)、メディア再生のフレームワーク所有権、そして厳格なバリデーションルールをカバーしています。 AIエージェントは、このスキルの指示に従うことで、シーク可能なタイムライン、正しいタイミング属性、適切なコンポジション構造を持つHyperFramesプロジェクトを確実に構築できます。また、`references/`ディレクトリ内の詳細ドキュメント(最小コンポジション、パターン、データ属性、トラックとクリップ、編集レシピなど)へのリンクも提供されており、必要に応じて深掘りできます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/heygen-com/hyperframes/tree/main/skills/hyperframes-core

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

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

ドキュメント

プラグインのインストール: セットアップまたはフレッシュネスコマンドの前に、このスキルがHyperFramesプラグイン内にある場合は、プラグイン実行ルールに従ってください。スタンドアロンインストールの場合は、以下の更新手順をそのまま使用します。

HyperFrames Core

エージェントの落とし穴(最初にお読みください):

  • センタリングはflex/insetを使用し、後でGSAPのx/yでアニメーションさせるノードにCSS transform: translate(-50%,-50%)を使用しないでください。リンター: gsap_css_transform_conflict。代わりにfromToまたはxPercent/yPercentを使用してください。
  • シーン終了時にtl.set(..., {visibility:"hidden"})を追加しないでください。ランタイムは既にタイミング指定されたクリップを非表示にします。内部ノード(または.clipのopacity)での不透明度フェードで十分です。キャプションのハードキルは別のルールです。
  • window.__timelines["id"]はルートのdata-composition-idと一致している必要があります。
  • render後、サマリーの2行目を確認してください:beginframe vs screenshot、GPUモード、ステージタイミング。Linuxでのscreenshot + software gpuは低速パスです。

HyperFramesはHTMLからビデオをレンダリングします。コンポジションとは、data-*属性でDOMがタイミングを宣言し、アニメーションランタイムがシーク可能で、メディア再生がフレームワークによって管理されるHTMLファイルです。

このスキルは技術的な契約です — 1つのhyperframesプロジェクトを構築する方法について説明します。以下の本文は構築ガイドです。トピックごとの詳細はreferences/(次はインデックス)にあり、必要に応じて参照してください。プロセスドキュメント(ブリーフ、ストーリーボード、レビュー、プロダクション、ディスパッチ、フレームワーカー)は/hyperframes → references/にあります。その他の関心事は、関連するドメインスキル(hyperframes-animation、hyperframes-creative、media-use、hyperframes-cli、hyperframes-registry)にあります。各スキルがカバーする内容については、/hyperframesの機能マップを参照してください。

リファレンス

ファイルこれを読む目的…
references/minimal-composition.md最小のレンダリング可能なコンポジションスケルトンから始める
references/composition-patterns.mdモノリシックとモジュラーのどちらかを選択する。モジュラーなindex.htmlを構造化する。サブコンポのアーキタイプを選択する。
references/data-attributes.md任意のdata-*(ルート / クリップ / サブコンポホスト / レガシーエイリアス)を検索する。class="clip"を使用する。
references/tracks-and-clips.mddata-track-indexが制御するもの(そして制御しないもの)を理解する、z-index、別のクリップに対する相対時間。npx hyperframes timelineですべてのトラックとクリップを一覧表示する。
references/creator-editing-recipes.md信頼できるカット/トリム/並べ替え/再タイミング/フリーズ/カメラ/マスク/クロスフェード/オーディオ編集レシピとその制限をコピーする。
references/sub-compositions.mdサブコンポジション(ホスト属性、<template>、インスタンス変数)を配線し、その内部でアニメーションさせる。
references/variables-and-media.md変数を宣言する。<video>/<audio>を配置し、音量を設定し、トリミングする。
references/determinism-rules.mdシーク可能なタイムラインを構築する。決定論の禁止事項。レイアウト / テキストフィット。
references/full-screen-motion.md共有背景を使用したフルフレームモーションを作成する。
references/tailwind.mdTailwind v4プロジェクトで作業する(init --tailwind。ランタイム契約はStudioのv3とは異なります)。

アニメーションランタイムの詳細(GSAP API、Lottie、Three.jsなど)については、hyperframes-animation → adapters/<runtime>.mdを参照してください。

コンポジションの構築

2つのルート形式(互換性なし)

  • スタンドアロン(トップレベルのindex.html):ルート<div data-composition-id="…">が<body>内に直接配置されます。<template>ラッパーはありません。スタンドアロンルートをラッピングするとすべてのコンテンツが非表示になり、lintでエラーとして拒否されます(standalone_composition_wrapped_in_template)。
  • サブコンポジション(data-composition-src経由で読み込み):ルートを<template>でラップします。これが記述すべき形式です。ローダーはプレーンな完全なドキュメントも受け入れ、その<body>にフォールバックしますが、テンプレート形式が例とツールで想定されているものです。

⚠ 転送ルール:テンプレート化されたサブコンポジションの場合、アセンブラはファイル自身の<head>の<style>/<script>を削除します(packages/core/src/compiler/compositionAssembly.ts、hasTemplateゲート)。そのため、<style>/<script>はテンプレート内部に配置してください。<link>はどちらの場合もホイストされます。 ⚠ ホストIDの慣例:ホストスロット、内部テンプレート、およびwindow.__timelines["<id>"]キーに同じIDを指定してください。異なるローカルIDもサポートされています(アセンブラはファイル内の最初のルートにフォールバックします)が、不一致はサイレントであるため、特別な理由がない限り一致させてください。

ファイル形状、ホスト配線、およびレンダリング前チェックリスト → references/sub-compositions.md。

ルートはサイズ指定が必要(サイレントレイアウトバグ)

スタンドアロンルートはwidth/height: 100%を作成します。キャンバスサイズはdata-width/data-heightです。ランタイムはこれらのピクセルをコンポジションルートにスタンプします。#rootに1920px/1080pxをハードコードしないでください。スケルトン → references/minimal-composition.md。

1つの一時停止タイムライン

各コンポジションは、window.__timelines["<id>"](キー = ルートdata-composition-id)に正確に1つのgsap.timeline({ paused: true })を登録します。非同期コールバック(document.fonts.ready)内での構築もサポートされています。重要なのは、構築が完了した後にのみ登録することです。レンダリング長はルートのdata-durationであり、タイムラインの長さではありません:タイムラインがそれを超えるとカットされ、早期に終了すると最後のフレームを保持します。ルートのdata-durationを省略すると、長さは代わりに推測されます(タイムライン、メディアウィンドウ、またはアダプター)。window.__timelines = window.__timelines || {}は必要ありません:ランタイムはインラインスクリプトが実行される前にレジストリを作成し、lintはもはやそれを要求しません。サブタイムラインを手動でホストにネストしないでください。ランタイムは登録された子タイムラインを自動的にネストします。完全な契約(非GSAPランタイムを含む) → references/determinism-rules.md + hyperframes-animation/adapters/。

最初のパスでのlintの落とし穴(最初のビルドが確実に失敗する)

lintが実際にキャッチするルールですが、事後的にのみです。最初から正しく記述してください:

  • CSSの初期transformと、同じプロパティに対するGSAPトゥイーンを決して組み合わせないでください — CSS値とトゥイーンの開始が競合し、lintはgsap_css_transform_conflictで拒否します。CSSのtransform: translateX(-40px)の代わりに、gsap.fromTo(el, { x: -40 }, { x: 0 })を使用してトゥイーン内で初期状態を設定してください。
  • <video>/<audio>にcrossoriginを決して付けないでください。lintはそれをmedia_crossorigin_breaks_preview(エラー)で無条件に拒否します。キャンバス/WebGL/WebAudioの読み戻しも含みます。抑制はありません。
  • data-startを持つ<video>に、同じくdata-startを持つ祖先を与えないでください。lintはvideo_nested_in_timed_element(エラー)で拒否します。ラッパーまたはビデオのどちらか一方にタイミングを設定し、両方には設定しないでください。
  • すべての<audio>にはidが必要です。lintはmedia_missing_idで拒否し、idのない<audio>はミキサーによって決してピックアップされないため、レンダリングは無音になります。
  • .clipをautoAlphaまたはvisibilityでトゥイーンしないでください — lintはgsap_animates_clip_elementで拒否します。代わりに子要素をアニメーションさせてください。
  • 名前付きCSS font-familyには、出荷されたローカルファイルへのファイル内@font-faceが必要です。そうしないと、lintがfont_family_without_font_faceを発動します。
  • サブコンポジション#rootはwidth/height: 100%(またはinset: 0)を使用し、1920px/1080pxをハードコードしないでください。キャンバスサイズはdata-width/data-heightです。

lint エラーはレイアウトとコントラストの監査もオフにします:checkはその後0 sample(s)と0/0 text checksを報告します。これはクリーンファイルのように見えますが、何も実行されなかったことを意味します。これらの数値を信頼する前に、lintエラーをクリアしてください。

交渉の余地のないルール(自動ゲートが見逃す可能性のあるサイレントバグ)

ここに示します。完全な根拠はリンクされたリファレンスにあります。違反しないでください:

  • レンダリング時間のクロック / シードされていないMath.random / ネットワーク / 入力状態は使用しないでください。repeat: -1は使用しないでください(有限カウントを使用)。 → determinism-rules.md
  • .clip要素でdisplay、visibility、またはautoAlphaを決してトゥイーンしないでください。フレームワークがクリップの可視性を所有し、lintはそれを拒否します(gsap_animates_clip_element)。代わりに子要素をアニメーションさせてください。 → determinism-rules.md
  • 本文テキストに<br>は使用しないでください。変換された要素はブロックレベルでサイズ指定されている必要があります。パルスする絶対配置の装飾要素にはピーククリアランスが必要です。 → determinism-rules.md
  • <video>/<audio>はフラットなドキュメントクエリによって検出されるため、フレームワークはそれらを任意のネスト深度でシークおよびデコードします(サブコンポ<template>またはラッパー内も含む)。1つのハードリミット:data-startを持つ<video>が、同じくdata-startを持つ別のプレーンな要素(サブコンポジションホストは例外)の内側にある場合、lintはエラーになります。また、実際の失敗(間違ったソースフレーム、その後ミッドスロットでクリップが消える)が発生するため、タイミングはラッパーまたはビデオのどちらか一方に設定し、両方には設定しないでください。サブコンポジションホストは例外です:サブコンポジション内のメディアは正しくレンダリングされます。もう1つの注意点はタイムラインであり、配置ではありません:サブコンポのタイムラインはホストルート要素をアニメーションできません。 → variables-and-media.md
  • アセンブルされたページ全体で各idを一意に保ってください(サブコンポのidにはコンポジションidを接頭辞として付けます、#<id>-hero)。これにより、独自の#id CSSとgetElementById呼び出しが解決されます。フレームインジェクションはもはやそれに依存しません:コンパイラはすべてのvideo[src]/audio[src]/img[src]にドキュメント一意のdata-hf-render-idをスタンプします。src属性の代わりに<source>子要素を使用するメディアはスタンプされないため、そこで一意のidが依然として重要です。 → composition-patterns.md
  • コンポジションルートへの全画面フィルは、通常のレンダリングでは問題ありません。レイヤードコンポジットパス(HDRコンテンツ、またはシェーダートランジションを使用するコンポジション)でのみドロップされます。このパスでは、エンジンがすべてのコンポジションルートを透明に強制し、下のレイヤーが透けて見えるようにします。コンポジションがシェーダートランジションまたはHDRメディアを使用する場合は、フィルを全面子要素(position:absolute; inset:0)に配置してください。 → composition-patterns.md

既存のコンポジションの編集

  • 最初にファイルを読んでください。無関係なタイミング、トラック、ID、変数、メディアパスは保持してください。
  • プロジェクトのタイムライン上にあるもの(トラック、クリップ、開始、終了、再生内容)を確認するには、index.htmlとすべてのサブコンポジションファイルを読む代わりに、npx hyperframes timeline [--json]を実行してください。
  • 既存のコンポジションIDとタイムラインキーに一致させてください。
  • クリップを追加する:周囲のクリップに対して意図的にdata-start/data-durationを設定してください。data-track-indexはStudioの表示レーンであり、タイミングの制約ではないため、空いている必要はありません。
  • ルートのdata-durationを超えて終了するクリップはカットされます:同じ編集でルートのdata-durationをクリップの終了まで拡張してください(lintはclip_ends_past_root_durationを警告します)。
  • 任意のコンポジション要素のdata-hiddenは、プレビューとレンダリングの両方でその要素を非表示にし、その時間枠をオーバーライドします。これは非破壊的/可逆的であり、Studioのタイムライン目のアイコンで切り替えられます。
  • サブコンポジションを追加する:ホストを配線する前に、内部のdata-composition-idを確認してください。

検証

コマンドの詳細についてはhyperframes-cliを使用してください。

  • npx hyperframes checkが成功する(lint、ランタイム、レイアウト、モーション、コントラスト全体で0件の検出)
  • サブコンポジションがあるプロジェクト:npx hyperframes snapshot --at <midpoints>を実行し、各フレームを目視確認する
  • レビュー用にnpx hyperframes preview --backgroundを実行する(ユーザーはStudioのタイムラインで何でも編集でき、サーバーは呼び出しコマンド後も存続します)
  • ユーザーが承認した後にのみnpx hyperframes renderを実行する

Individual skills in this repo

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

general-video

>

heygen-com/animejs

Anime.js adapter patterns for HyperFrames. Use when writing Anime.js animations or timelines inside HyperFrames compositions, registering animations on window.__hfAnime, making Anime.js seek-driven and deterministic, or translating Anime.js examples into render-safe HyperFrames HTML.

heygen-com/claude-design-hyperframes

Use when running inside Claude Design specifically. Produces a valid, brand-accurate HyperFrames video draft using pre-valid skeletons. For Claude Code / Cursor / Codex, use the `hyperframes` skill instead.

heygen-com/contribute-catalog

Author a new HyperFrames registry block (caption style, VFX block, transition, lower third) or component (text effect, overlay, snippet) and ship it as an upstream PR to the hyperframes repo. Use ONLY when the user wants to CONTRIBUTE to the public catalog — for in-project caption/transition authoring use the `hyperframes` skill, for installing existing registry items use the `hyperframes-registry` skill.

heygen-com/css-animations

CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

heygen-com/gsap

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

heygen-com/hyperframes

Leaves sweep through the frame and part to reveal the headline. HyperFrames block, 1920×1080, 12s, 11 variables.

heygen-com/hyperframes

Render-correctness doctrine for scene-to-scene seams in HyperFrames launch videos — the prerequisites that make transitions composite correctly on the master timeline. Load when assembling the master timeline / index.html, when a white flash appears at a cut or crossfade seam (especially on dark films), when reasoning about why a transition opacity dip shows through, or when verifying the render-side mechanics of how overlapping scene wrappers blend. Covers the opaque stage-ground (#root background) white-flash guard and how the injector overlaps wrappers, holds final frames, ping-pongs tracks, and stamps lint-clean template code onto the master timeline. Does NOT contain the per-transition catalog — see the transition registry for individual transition entries.

heygen-com/hyperframes

The technique catalog: five velocity-matched SEAMS (zoom-through, INVERSE zoom-through, cut-the-curve, waterfall cut, rack-focus blur-cut) plus the two in-scene techniques — waterfall ENTRY (staggered arrival cascades for title cards / segment openers) and the nudge curve (slow-fast-slow three-phase group slides). Covers partial-travel (~12% of frame) velocity matching via mirrored power4 eases, the Z scale-sign rule, size-scaled blur (10px text / 18-20px full-frame), word-by-word staggered cuts, cascade pacing by element weight, and the 10/65/25 slide ratio. Read before authoring any transition, text-beat handoff, kinetic text entry, or group reposition. [depth, zoom, inverse-zoom, scale-sign, mirrored-zoom, rack-focus, pacing, velocity, cut-the-curve, waterfall, stagger, cascade, kinetic-text, title-card, segment-opener, nudge, slide, easing, group-motion, z-depth, motion-graphics, cinematic, transition, blur, directional-continuity]

heygen-com/hyperframes

Glass shards fly in through fog and tile themselves into the headline. HyperFrames block, 1920×1080, 12.16s, 19 variables.

heygen-com/hyperframes

A single feature card orbits a dot sphere on approved Blender camera motion. HyperFrames block, 1920×1080, 10s, 4 variables.

heygen-com/hyperframes

A wireframe portal bursts open, the title comes through, then its letters swap into a second phrase. HyperFrames block, 1920×1080, 8s, 9 variables.

heygen-com/hyperframes

An orbiting camera follows an ice logo as it breaks apart, reforms into two text moments, and fades. HyperFrames block, 1920×1080, 22.5s, 216 variables.

heygen-com/hyperframes

House-style oversized macOS cursor technique for HyperFrames launch videos. Load whenever a scene involves cursors or a pointer-led action, when kicking off a UI scene, when igniting a morph/transition/typing run with a click, or when a scene reads as static, dead, or stale and needs a cheap high-yield source of motion to carry the viewer's eye and segment them out of the stale state. Covers cursor size/look (incl. brand-motif cursors), the off-screen entry law, tip-targeting and the click tap, click-ignites-the-next-beat, and exit / cross-scene handoff.

heygen-com/hyperframes

name: embedded-captions

heygen-com/hyperframes

A chain of bevelled cuboids rides a travelling wave as a content carousel. HyperFrames block, 1920×1080, 6.666666666666667s, 40 variables.

heygen-com/hyperframes

A tiled headline surface flips cell by cell under a sweeping depth field to reveal the rear headline. HyperFrames block, 1920×1080, 8s, 18 variables.

heygen-com/hyperframes

Turn arbitrary text — an article, notes, a topic, a brief — into a faceless explainer video: there is no site or footage to capture, so the visuals are invented per scene (typography, abstract graphics, diagrams, data-viz). Use for topic explainers, concept breakdowns, how-tos, listicles. Not a video built from a website (/product-launch-video — promo or tour). Unclear → /hyperframes.

heygen-com/hyperframes

Import Figma content into a HyperFrames composition — rendered assets, brand tokens, components, storyboard sections → reconstructed motion (frames read as states, not slides) (REST/CLI), connector-assisted motion when available, and shaders from a connector or native export. Use when the user pastes a figma.com link or asks to bring a Figma design, frame, logo, brand, or animation into a video/composition.

heygen-com/hyperframes

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]

関連スキル