Communitygithub.com

9018/mychat

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

mychat 是什麼?

此技能是 HyperFrames 的核心技術合約,定義了如何建立一個可渲染的影片組合專案。HyperFrames 將 HTML 渲染為影片,其 DOM 透過 `data-*` 屬性宣告時間軸,動畫運行時可進行定位搜尋,且媒體播放由框架完全掌控。技能涵蓋了組合的兩種根形式(獨立與子組合)、計時規則、確定性渲染禁令、可動畫屬性許可清單,以及使用 CLI 工具進行驗證的完整流程。它支援所有 HyperFrames 生態系統的開發平台,包括 CLI、Studio 和子代理調度。文件提供了詳細的參考文件索引,分別說明最小組合、組合模式、data-* 屬性、軌道與片段、子組合、變數與媒體、確定性規則等主題。使用此技能時,開發者必須遵循非協商規則,例如避免使用運行時時鐘、未種子化的 Math.random、無限重複,以及確保所有 ID 在組裝後的頁面中唯一。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/9018/mychat/tree/HEAD/OpenMontage/.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選擇單體式或模組式;結構化模組式 index.html;挑選子組合原型
references/data-attributes.md查詢任何 data-*(根 / 片段 / 子組合容器 / 舊別名);使用 class="clip"
references/tracks-and-clips.md選擇 data-track-index,處理同一軌道的重疊 / z 軸層級,將一個片段相對於另一個設定時間
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 為單位),並且直到 height:100% 元素的每個祖先都必須有已解析的高度 — 否則 flex / 100% 子元素會崩潰到約 0,內容堆疊到左上角。lint / validate / inspect 不會捕捉到這個問題。骨架 → references/minimal-composition.md。

一個暫停的時間軸

每個組合在 window.__timelines["<id>"](鍵 = 根 data-composition-id)註冊恰好一個 gsap.timeline({ paused: true }),在頁面載入時同步建立。渲染持續時間 = 根 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 注入幀,跨檔案的重複會逃過 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 console 錯誤)
  • 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.

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

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

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.

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.

相關技能