Communitygithub.com

Army161/OpenMontage

HyperFrames CLI 開發循環。在執行 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, 或 remove-background 時,或是在排解 HyperFrames 建置/渲染環境問題時使用。作為 AWS Lambda 雲端渲染(`hyperframes lambda deploy / render / progress / destroy / policies`)的進入點。

OpenMontage 是什麼?

HyperFrames CLI 是一個強大的開發工具,專為管理 HyperFrames 專案從初始化到雲端渲染的完整工作流程而設計。它能引導使用者建立新專案(`init` 或 `capture`)、撰寫 HTML 合成內容、並提供一連串檢查命令(`lint`、`validate`、`inspect`)以確保產出品質。預覽功能會開啟整合時間軸編輯器 Studio,讓使用者在渲染前能手動調整所有細節。為了因應不同情境,它支援多種渲染方式:本地快速疊代(`render --quality draft`)、最終交付(`render --quality high`)、CI 環境驗證(`render --docker --strict`),以及透過 AWS Lambda 進行雲端分散式渲染以處理長時間或高解析度影片。此工具包含嚴格的代理程式慣例,例如在非 TTY 模式下強制使用 `--example` 參數、透過 `--json` 輸出提供結構化結果、以及在渲染前暫停等待使用者確認。此外,其靜態檢查與視覺快照(`snapshot`)的組合,能有效捕捉跨檔案掛載失敗等靜態檢查無法發現的錯誤。

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

在你喜歡的 AI 中提問

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

說明文件

HyperFrames CLI

所有操作都透過 npx hyperframes 進行,除非專案說明指定了本地包裝器。請嚴格遵守本地包裝器。需要 Node.js >= 22 和 FFmpeg。

工作流程

  1. Scaffold(支架建立) — npx hyperframes init my-video(或從 URL 使用 capture)。init 同時會檢查已安裝的技能是否與 GitHub 上最新版本相符,若有過期則更新全局技能集。目前 --skip-skills 旗標暫時失效(因為 skills.sh 註冊表正在追趕進度),所以每次執行 init 都會進行此檢查並拉取我們最新的技能。
  2. Write(撰寫) — 編寫 HTML 合成內容(請參考 hyperframes-core 技能)
  3. Lint(程式碼檢查) — npx hyperframes lint
  4. Validate(驗證) — npx hyperframes validate(執行時期錯誤 + 對比度檢查)
  5. Visual inspect(視覺檢查) — npx hyperframes inspect
  6. Preview(預覽) — npx hyperframes preview 會開啟 Studio,這是一個時間軸編輯器,使用者不僅可以觀看,還能手動編輯任何內容。在 Studio 中進行審查,並在詢問後再進行渲染。
  7. Render(渲染) — 選擇變體:
    • 疊代:npx hyperframes render --quality draft
    • 交付:npx hyperframes render --quality high --output out.mp4
    • CI / 跨主機重現:npx hyperframes render --docker --strict --output out.mp4
    • 雲端(長時間 / 大型):npx hyperframes lambda render ./my-project --width 1920 --height 1080 --wait(請參閱下方的 Lambda 說明)

在預覽之前執行 lint、validate 和 inspect。lint 會捕捉缺少的 data-composition-id、重疊的軌道和未註冊的時間軸。validate 會在無頭 Chrome 中載入合成內容,並報告執行時期的主控台錯誤以及 WCAG 對比度問題。inspect 會掃描時間軸,報告文字溢出氣泡/容器或超出畫布的情況——並且,當存在 *.motion.json 側邊檔案時,會根據相同的掃描時間軸驗證動畫意圖(進入點觸發、交錯順序、是否在畫框內、活躍度)。

對於動畫密集的工作,建議使用快照驅動的疊代和 *.motion.json 側邊檔案——請參閱 references/lint-validate-inspect.md 了解規範和動畫驗證規格。

代理程式慣例

適用於每個命令的通用規則:

  • --json 在所有命令上都可用,但 render、preview 和 play 除外。 對於支援的命令,在任何代理程式 / CI 調用中都請使用它;輸出包含一個 _meta 封套(CLI 版本、最新可用版本、更新建議)。render 僅透過標準輸出和退出碼報告狀態——使用下面的渲染後檢查來驗證成功;preview / play 是伺服器,不支援 JSON。
  • doctor --json 總是退出碼 0,即使環境有問題也是如此。請依據 payload 的 ok 欄位進行判斷:npx hyperframes doctor --json | jq -e '.ok' > /dev/null。這可以保護 pipeline 不受 CLI 版本變動的影響。
  • 非 TTY 模式是自動偵測的。 當標準輸出不是一個 TTY(例如 CI、代理程式、管道輸出)時,CLI 會自動切換到非互動模式;此時 init 需要 --example。傳入 --non-interactive 可以即使在 TTY 上也強制使用此模式。
  • CI 渲染閘門:--strict 會在 lint 錯誤時失敗,--strict-all 連警告也會導致失敗,--strict-variables 會因未宣告的 --variables 鍵值而失敗。
  • --json 中的路徑會被匿名化——$HOME 會變成字面字串 $HOME,這樣輸出就可以安全地貼到錯誤報告和代理程式的上下文中。
  • 渲染需要使用者許可。 檢查通過後切勿自動渲染。請在 preview 處暫停,告訴使用者在 Studio 中編輯影片,並在使用者批准後才進行渲染。
  • 渲染後驗證。 在 render 回傳退出碼 0 後,請確認輸出檔案存在且大小合理:[ -s "$OUTPUT" ] || echo "render produced no output"。CLI 會在成功時印出 ◇ <路徑>;對於長時間渲染,也請使用 ffprobe -i "$OUTPUT" -show_format -v error 進行合理性檢查。

路由

想要...請閱讀
建立專案支架(init、capture、skills)references/init-and-scaffold.md
檢查正確性(lint、validate、inspect、snapshot)references/lint-validate-inspect.md
預覽或渲染(preview、play、render、publish)references/preview-render.md
診斷環境(doctor、browser)references/doctor-browser.md
在 AWS Lambda 上進行雲端渲染(lambda deploy / sites / render / progress / destroy / policies)references/lambda.md
其他所有項目(info、upgrade、compositions、docs、benchmark、telemetry、素材預處理)references/upgrade-info-misc.md

跨技能交接

  • Tailwind 專案(init --tailwind)→ 在編輯 class 或主題 token 前,請使用 hyperframes-core(Tailwind 參考)。
  • Registry 區塊/元件(hyperframes add、hyperframes catalog)→ 使用 hyperframes-registry 處理安裝路徑、子合成接線和程式碼片段合併。
  • 素材預處理(tts、transcribe、remove-background)→ 使用 hyperframes-media 處理語音選擇、Whisper 模型規則、字幕和 TTS 轉字幕鏈。
  • 參數化渲染(--variables)→ 透過 <html> 上的 data-composition-variables 宣告;請參閱 hyperframes-core 了解完整 schema。

Lambda(雲端渲染)

hyperframes lambda 將分散式渲染部署到 AWS Lambda,並從您的筆電或 CI 驅動渲染。端到端需要三個命令:

npx hyperframes lambda deploy                                             # 佈建 SAM 堆疊(Lambda + Step Functions + S3)
npx hyperframes lambda render ./my-project --width 1920 --height 1080 --wait
npx hyperframes lambda destroy                                            # 銷毀(S3 儲存貯體會被保留)

當渲染時間過長 / 過大,單一主機無法處理時(例如長達數分鐘的影片、4K、大型並行批次),且您已設定 AWS 憑證時,請使用 Lambda。對於開發循環的疊代,請留在本機的 render。

請參閱 references/lambda.md 了解先決條件、所有 6 個子命令(deploy、sites create、render、progress、destroy、policies)、IAM 政策驗證、狀態檔案以及成本 / 清理規則。

最低完成閘門

靜態閘門

npx hyperframes lint
npx hyperframes validate

對於版面敏感的工作,請加上 inspect,並在 CI 中使用 render --strict 以便在 lint 錯誤時失敗。

視覺冒煙測試——當專案使用子合成時必須執行

lint / validate / inspect 是孤立地評估每個合成。它們永遠不會載入 index.html 並透過 data-composition-src 掛載子合成,因此無法捕捉跨檔案掛載失敗(請參閱 hyperframes-core → references/sub-compositions.md 中的「常見陷阱」)。唯一能捕捉這些問題的閘門是實際載入 index.html 並掃描時間軸的測試。

請使用 hyperframes snapshot——它會以與 render 相同的方式載入專案(因此會執行相同的掛載路徑),但只捕捉您要求的時間戳幀,因此只需幾秒鐘而非完整渲染:

# 在每個子合成的中間點捕捉一幀。
# 中間點 = index.html 中每個主機插槽的 data-start + data-duration/2。
npx hyperframes snapshot --at <t1>,<t2>,<t3>,...

# 或者,如果您不需要逐場景定位,可以使用均勻間隔的取樣:
npx hyperframes snapshot --frames 9

輸出會放在 snapshots/frame-NN-at-Xs.png 中。請逐一檢查每幀與場景計畫是否相符。

每幀出現的紅旗(每個都對應到靜態閘門遺漏的特定失敗模式):

您看到的現象根本原因
文字在左上角以極小且未套用樣式的形式顯示<style> 區塊被留在 <head> 中的 <template> 外部(陷阱 1)—— 沒有 CSS 到達實際的 DOM
SVG/圖示元素被放大到畫布大小同上——沒有套用寬度/高度限制
場景的主要元素完全消失;只看到背景和浮水印主機 ID ≠ 範本 ID(陷阱 2)—— 時間軸從未執行,幀在初始狀態被捕捉
快照命令記錄 Sub-composition timelines not registered after 45000ms陷阱 2 —— 直接確認

snapshots/ 目錄在檢查後可以刪除;使用者最終的渲染是另一個獨立的步驟,使用 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

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

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.

相關技能