Communitygithub.com

Drama2557/4RealDigital-Video-Studio

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

4RealDigital-Video-Studio 是什麼?

此技能定義了 HyperFrames 框架的核心技術合約,用於從 HTML 渲染影片。它提供了一份完整的建構指南,說明如何建立一個可渲染的合成專案,涵蓋了從最小骨架到複雜子合成的所有內容。其關鍵價值在於強制執行確定性渲染規則,確保時間軸可尋、媒體播放由框架控制,並禁止非確定性行為(例如執行時時鐘或未預先 seed 的亂數)。技能支援獨立式(頂層 `index.html`)和子合成(透過 `<template>` 載入)兩種形式,並詳細說明了常見的錯誤模式,例如根元素缺少 `data-start="0"` 或 CSS `transform` 與 GSAP 動畫衝突。此外,它還整合了多個參考文件(用於資料屬性、軌道、變數等),以提供深入的指導,並依賴 `hyperframes-cli` 進行 lint、預覽和渲染驗證。此技能主要設計用於 Cursor、Claude Code 和 Codex 等 AI 代理,但任何需要根據 HyperFrames 規範撰寫合成 HTML 的開發者都適用。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Drama2557/4RealDigital-Video-Studio/tree/HEAD/.agents/skills/hyperframes-core

在你喜歡的 AI 中提問

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

說明文件

HyperFrames 核心

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

此技能是技術合約 — 如何建立一個 hyperframes 專案。以下內容是建構指南;每個主題的詳細資訊存在 references/ 中(索引在下一頁),按需閱讀。其他關注點存在於同領域技能中 — hyperframes-animation、hyperframes-creative、media-use、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/review-loop.md在活動面板上執行計畫 → 草稿 → 建構審查流程 — 所有故事板規劃工作流程共享
references/production-loop.md將已批准的計畫轉化為交付影片 — 階段依賴關係(音訊、影格、組合、轉場、字幕、驗證、交付)一個自由形式的建構直接遵循
references/brief-contract.md簡報的基本規則 — 模式推導(協作 / 自主)、共享欄位註冊表、問題不變量(提問本身存在於 /hyperframes → 意圖層)
references/brief-format.md撰寫 BRIEF.md — 已確認的意圖文件,工作流程的 Setup 階段會寫入,後續每個步驟都會讀取
references/script-format.md撰寫選用的 SCRIPT.md 鎖定旁白
references/subagent-dispatch.md將子代理分發動詞(並行扇出 / 背景 / 等待)對應到你的工具
references/frame-worker-core.md共享的 frame-worker 角色合約 — 每個敘事工作流程的封包建構器會將其預置到該工作流程的 sub-agents/frame-worker.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,內容會堆疊到左上角。不要僅依賴自動化閘門來捕捉此問題;請檢查快照。骨架 → references/minimal-composition.md。

一個暫停的時間軸

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

首次 lint 易錯點(保證的首次建構失敗)

lint 確實會捕捉到兩個規則,但僅在事後 — 請在第一次就正確編寫它們:

  • 根合成元素必須帶有 data-start="0"(以及 data-composition-id/data-width/data-height);省略它會導致 lint 失敗,錯誤碼為 root_composition_missing_data_start。
  • 永遠不要將 CSS 初始 transform 與 GSAP 對同一個屬性的補間動畫配對 — CSS 值與補間的起點會衝突,lint 會以 gsap_css_transform_conflict 拒絕它。使用 gsap.fromTo(el, { x: -40 }, { x: 0 }) 在補間內部設定初始狀態,而不是使用 CSS transform: translateX(-40px)。

不可協商的規則(自動化閘門可能遺漏的無聲錯誤)

在此列出;完整的理由在連結的參考文件中。不要違反:

  • 沒有渲染時時鐘 / 未預先 seed 的 Math.random / 網路 / 輸入狀態;沒有 repeat: -1(使用有限次數)。→ determinism-rules.md
  • 僅對視覺屬性允許清單進行動畫處理;永遠不要補間 display 或原始 visibility。GSAP autoAlpha 和零持續時間的時間軸邊界設置是唯一的可見性例外,且僅適用於非剪輯片段元素或剪輯片段內的包裝器。框架單獨控制 .clip 的可見性。不要在頁面載入時對後續場景的剪輯片段執行 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-hidden 會在預覽和渲染中隱藏它,覆蓋其時間視窗;它是非破壞性/可逆的,並由 Studio 時間軸的眼睛圖示切換。
  • 添加子合成:在連接宿主之前驗證其內部的 data-composition-id。

驗證

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

  • npx hyperframes check 通過(在 lint、執行時期、版面、動態和對比度方面有 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.

Drama2557/4RealDigital-Video-Studio

Overlay doctrine for the embedded-captions workflow — the caption MODEL (drop / rail / embed) and the rule that captions are an OVERLAY composited on top of the film, never a reserved bottom band you shift content up to avoid. Load when adding captions/subtitles to a talking-head or launch video, when deciding whether a phrase should be dropped, ride the verbatim rail, or be promoted to a scarce embedded climax, when laying out a composition that will carry captions (do NOT reserve a keep-out band), or when centering a composition on the true frame center under captions. Quotes the rail+embed model from embedded-captions and constraint #13 (captions overlay, keep-out band retired) from the product-launch-video scene agent. Applies ON TOP of embedded-captions.

Drama2557/4RealDigital-Video-Studio

Turn a weekly changelog .md into a finished branded changelog video (square 1080, ~45-60s, Annie VO, animated brand background, mock-UI visualizations, lowkey captions). Use when the user provides a changelog/digest markdown and wants the weekly video, or says "changelog video". Self-contained — fonts, background, lexicon, and scripts ship in this skill.

Drama2557/4RealDigital-Video-Studio

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]

Drama2557/4RealDigital-Video-Studio

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Drama2557/4RealDigital-Video-Studio

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.

Drama2557/4RealDigital-Video-Studio

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.

Drama2557/4RealDigital-Video-Studio

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

Drama2557/4RealDigital-Video-Studio

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

Drama2557/4RealDigital-Video-Studio

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

Drama2557/4RealDigital-Video-Studio

Install, discover, and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

Drama2557/4RealDigital-Video-Studio

Agent Media OS, the single skill for every media need in a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal.

Drama2557/4RealDigital-Video-Studio

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]

Drama2557/4RealDigital-Video-Studio

A short, design-led motion graphic where motion is the message — kinetic typography, stat count-up, chart/data-viz hit, logo sting / brand lockup, lower-third / callout / social overlay, animated map (highlight regions, connect places, zoom to a location), animated tweet / news-article / headline, webpage / UI animation (scroll, cursor, callouts), or fusing a real image's geometry into a chart. Usually under 10s (up to ~30s), no narration or live-action subject; renders to MP4 or transparent overlay. Longer / narrated / multi-scene → /general-video. Unclear → /hyperframes.

Drama2557/4RealDigital-Video-Studio

Turn a music track (an audio file, a video to pull audio from, or a track generated from a mood brief) into a beat-synced video — lyric video, slideshow, or kinetic promo. The music drives all pacing; any user-supplied images/videos are cut onto the same beat grid, and a complete video needs zero assets. Narrated pieces → the input-matched workflow (see /hyperframes). Unclear → /hyperframes.

Drama2557/4RealDigital-Video-Studio

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.

Drama2557/4RealDigital-Video-Studio

Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR topic explainer (/faceless-explainer). Unclear → /hyperframes.

Drama2557/4RealDigital-Video-Studio

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.

Drama2557/4RealDigital-Video-Studio

Author a HyperFrames slideshow — a presentation, pitch deck, or interactive deck with discrete slides, fragment reveals, branching, hotspot navigation, and built-in presenter mode with speaker notes; also converts an existing page into a deck. Output is a navigable deck, not a rendered MP4. If the user didn't explicitly ask for a slideshow, confirm before authoring. Unclear → /hyperframes.

Drama2557/4RealDigital-Video-Studio

Package an existing talking-head / interview / podcast video with timed, designed GRAPHIC OVERLAY cards — kinetic titles, lower-thirds, data callouts, quotes, side panels, picture-in-picture — synced to the transcript, on a 16:9 / 9:16 / 4:5 canvas of your choice; the clip plays untouched underneath. Trigger on "graphic overlays", "on-screen graphics", "package / dress up my video". Not plain subtitles (/embedded-captions). Unclear → /hyperframes.

Drama2557/4RealDigital-Video-Studio

Agent skill / project related to launch or product demo video: Drama2557/4RealDigital-Video-Studio

相關技能