Communitygithub.com

Army161/OpenMontage — HyperFrames 核心合成協定

HyperFrames 合成合約 — 建立一個可渲染的專案。用於合成結構、`data-*` 時間屬性、`class="clip"`、軌道、子合成、變數、框架擁有的媒體播放、確定性渲染規則與驗證。在撰寫合成 HTML 前請先閱讀。

OpenMontage — HyperFrames 核心合成協定 是什麼?

此技能定義了 HyperFrames 的技術合約,HyperFrames 是一個能從 HTML 渲染影片的框架。合成本質上是一個 HTML 檔案,其 DOM 透過 `data-*` 屬性宣告時間軸,動畫執行階段可搜尋,且媒體播放由框架控制。本文件作為建構指南,說明如何建立獨立的或子合成專案,涵蓋關鍵規則,例如根元素必須有明確尺寸、每個合成註冊一個暫停的時間軸、以及嚴格的確定性規則(禁止執行時時脈、未種子的隨機亂數、或重複 -1)。它也提供了一個完整的參考文件索引,涵蓋最小合成範本、資料屬性、軌道與片段、子合成、變數與媒體、以及用於驗證的 CLI 命令。此技能支援 Cursor、Codex 以及類似 Claude Code 的 AI 代理工具,可引導開發者建構符合框架嚴格要求的合成,避免 `lint` 或 `validate` 無法捕捉到的靜默錯誤。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Army161/OpenMontage/tree/HEAD/.agents/skills/hyperframes-core

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

HyperFrames 核心

HyperFrames 從 HTML 渲染影片。合成是一個 HTML 檔案,其 DOM 使用 data-* 屬性宣告時間,其動畫執行階段可搜尋,且媒體播放由框架擁有。

此技能是技術合約——如何建構一個 hyperframes 專案。以下內容為建構指南;每個主題的詳細資訊位於 references/(索引如下),按需閱讀。其他相關問題位於兄弟領域技能中——hyperframes-animation、hyperframes-creative、hyperframes-media、hyperframes-cli、hyperframes-registry。/hyperframes 中的能力對應圖會說明每個技能涵蓋的範圍。

參考資料

檔案閱讀目的…
references/minimal-composition.md從最小可渲染的合成骨架開始
references/composition-patterns.md選擇單體式 vs 模組化;建構模組化 index.html;選擇子合成原型
references/data-attributes.md查詢任何 data-*(根/片段/子合成宿主/舊別名);使用 class="clip"
references/tracks-and-clips.md選擇 data-track-index,處理相同軌道重疊 / z-index,將片段相對於另一個片段進行時間定位
references/sub-compositions.md連接子合成(宿主屬性、<template>、每個實例的變數)並在其中製作動畫
references/variables-and-media.md宣告變數;放置 <video>/<audio>,設定音量,裁剪
references/determinism-rules.md建構可搜尋的時間軸;確定性禁止事項;可動畫屬性允許清單;佈局 / 文字適應
references/full-screen-motion.md使用共享背景創作全幀動畫
references/storyboard-format.md創作 STORYBOARD.md 計劃(+ 解析後的操作清單)
references/script-format.md創作選用的 SCRIPT.md 鎖定旁白
references/subagent-dispatch.md將子代理分發動詞(平行展開 / 背景 / 等待)映射到你的工具鏈
references/tailwind.md在 Tailwind v4 專案中工作(init --tailwind;執行時期合約與 Studio 的 v3 不同)

有關動畫執行階段的具體資訊(GSAP API、Lottie、Three.js 等),請前往 hyperframes-animation → adapters/<runtime>.md。

建構合成

兩種根形式(不可互換)

  • 獨立式(頂層 index.html)——根 <div data-composition-id="…"> 直接位於 <body> 中,沒有 <template> 包裝(包裝它會隱藏所有內容並破壞渲染)。
  • 子合成(透過 data-composition-src 載入)——根必須包裹在 <template> 中。

⚠ 傳輸規則:執行階段僅克隆 <template> 的內容;外部的一切(包括 <head> 樣式/腳本)都會被丟棄——請將 <style>/<script> 放在模板內部。 ⚠ 宿主 ID 規則:宿主槽的 data-composition-id 必須完全等於內部模板的 data-composition-id 以及 window.__timelines["<id>"] 的鍵——不要使用 -mount/-slot/-host 後綴。

檔案形狀、宿主連接以及預渲染檢查清單 → references/sub-compositions.md。

根必須有尺寸(靜默佈局錯誤)

獨立的根需要一個明確的尺寸盒子(以 px 為單位的 width/height),並且直達 height:100% 元素的每個祖先都必須有解析的高度——否則 flex/100% 的子元素會收縮到約 0,內容會堆疊到左上角。lint/validate/inspect 不會捕捉到這一點。骨架 → references/minimal-composition.md。

一個暫停的時間軸

每個合成在 window.__timelines["<id>"] 註冊恰好一個 gsap.timeline({ paused: true })(鍵 = 根 data-composition-id),在頁面載入時同步建構。渲染持續時間 = 根 data-duration,而非時間軸長度。不要手動將子時間軸嵌套到宿主中。完整合約(包括非 GSAP 執行階段)→ references/determinism-rules.md + hyperframes-animation/adapters/。

不可協商的規則(lint/validate/inspect 不會捕捉到的靜默錯誤)

在此列出;完整理由請參閱連結的參考文件。請勿違反:

  • 不得使用執行時時脈 / 未種子的 Math.random / 網路 / 輸入狀態;不得使用 repeat: -1(請使用有限次數)。→ determinism-rules.md
  • 僅在視覺屬性允許清單上製作動畫;永遠不要使用 display/visibility;不要在後續場景的片段上使用 gsap.set。→ determinism-rules.md
  • 正文中不得使用 <br>;轉換後的元素必須是區塊級別且已設定尺寸;脈衝式的絕對定位裝飾元素需要頂部間距。→ determinism-rules.md
  • <video>/<audio> 必須是宿主根元素的直接子元素(永遠不要在子合成 <template>/包裝器內部);框架擁有播放控制權。→ variables-and-media.md
  • 每個 id 在組裝後的頁面中必須是唯一的;在子合成內部,請使用合成 ID 作為 id 的前綴(#<id>-hero)。重複的 <video>/<img> id 會渲染為空白——生成器透過 getElementById 注入幀,而跨檔案的重複 ID 會從 lint 中溜走。→ composition-patterns.md
  • 全螢幕場景的填充應放在一個滿版出血的子元素上(position:absolute; inset:0),永遠不要放在合成根元素本身上——生成器的幀合成可能會丟棄根元素自身的 background(幀會渲染為黑色),即使預覽/snapshot 顯示正常。→ composition-patterns.md

編輯現有合成

  • 先閱讀檔案。保留不相關的時間、軌道、ID、變數、媒體路徑。
  • 匹配現有的合成 ID 和時間軸鍵。
  • 新增片段:選擇一個非重疊的 data-track-index 或有意地調整周圍的時間。
  • 新增子合成:在連接宿主之前,驗證其內部的 data-composition-id。

驗證

使用 hyperframes-cli 取得命令詳細資訊

  • npx hyperframes lint 通過(0 個錯誤)
  • npx hyperframes validate 通過(0 個控制台錯誤)
  • npx hyperframes inspect 通過(0 個錯誤)
  • 包含子合成的專案:npx hyperframes snapshot --at <midpoints> 並目視檢查每一幀
  • npx hyperframes preview 用於檢閱(使用者可以在 Studio 的時間軸中編輯任何內容)
  • 僅在使用者批准後才執行 npx hyperframes render

Individual skills in this repo

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

Army161/OpenMontage

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). Supports two gateways: HeyGen API and fal.ai API.

Army161/OpenMontage

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.

Army161/OpenMontage

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

Army161/OpenMontage

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

Army161/OpenMontage

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

Army161/OpenMontage

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.

Army161/OpenMontage

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.

Army161/OpenMontage

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

Army161/OpenMontage

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.

Army161/OpenMontage

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

Army161/OpenMontage

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

Army161/OpenMontage

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.

Army161/OpenMontage

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

Army161/OpenMontage

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.

Army161/OpenMontage

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.

Army161/OpenMontage

Best practices for Remotion - Video creation in React

Army161/OpenMontage

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.

Army161/OpenMontage

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

Army161/OpenMontage

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

Army161/OpenMontage

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

相關技能