Communitygithub.com

9018/mychat

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

mychat 是什麼?

這個技能為 AI 代理程式提供 HyperFrames CLI 的完整指令手冊,這是一個用於影片合成的 Node.js CLI 工具 (Node.js >= 22、FFmpeg)。它定義了一個嚴謹的開發工作流程:從 `npx hyperframes init` 建立專案開始,接著透過 `lint`、`validate`、`inspect` 與 `snapshot` 進行靜態與視覺正確性檢查 (例如:捕捉巢狀合成中的子合成掛載失敗),最後才進入 `preview` (啟動 Studio 時間軸編輯器,不只可觀看還可編輯) 或 `render`。著重於自動化:所有指令支援 `--json` 輸出 (render/preview/play 除外),非 TTY 模式會自動偵測或強制啟用,且 render 結果會驗證檔案大小與 `ffprobe` 持續時間。它還涵蓋 AWS Lambda 雲端渲染 (`hyperframes lambda deploy / render / destroy`) 以處理大型或長時間的任務。支援 Claude Code、Cline、Cursor 等平台,透過結構化的參考文件與跨技能交接 (Tailwind 用 hyperframes-core、區塊用 hyperframes-registry、媒體前處理用 hyperframes-media) 來規範代理程式行為。

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

在你喜歡的 AI 中提問

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

說明文件

HyperFrames CLI

除非專案指示指定本機包裝器,否則所有操作都透過 npx hyperframes 進行。請嚴格遵守本機包裝器。需要 Node.js >= 22 與 FFmpeg。

工作流程

  1. 建立骨架 — npx hyperframes init my-video (或從 URL capture)。init 也會檢查已安裝的技能是否與 GitHub 上的最新版本一致,並在技能過期時更新全域技能集。目前 --skip-skills 旗標已被禁用 (暫時性,等待 skills.sh 註冊表追上進度),因此每次 init 都會執行此檢查並拉取我們最新的技能。
  2. 撰寫 — 編寫 HTML 合成 (參見 hyperframes-core 技能)
  3. Lint — npx hyperframes lint
  4. 驗證 — npx hyperframes validate (執行時期錯誤 + 對比度)
  5. 視覺檢查 — npx hyperframes inspect
  6. 預覽 — npx hyperframes preview 會開啟 Studio,這是一個時間軸編輯器,使用者可以在其中手動編輯任何內容 (不僅是觀看)。在那裡審查,然後在渲染前詢問。
  7. 渲染 — 選擇變體:
    • 迭代: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 僅透過 stdout + 退出碼報告狀態 — 使用下方的渲染後驗證確認成功;preview / play 是伺服器,沒有 JSON。
  • doctor --json 總是返回 0,即使環境已損壞。根據有效載荷的 ok 欄位進行判斷:npx hyperframes doctor --json | jq -e '.ok' > /dev/null。這可以讓管線免受 CLI 版本更迭的影響。
  • 非 TTY 模式會自動偵測。 當 stdout 不是 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 會印出 ◇ <path>;對於長時間渲染,也使用 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) → 在編輯類別或主題權杖之前,使用 hyperframes-core (Tailwind 參考)。
  • 註冊表區塊/元件 (hyperframes add、hyperframes catalog) → 使用 hyperframes-registry 來處理安裝路徑、子合成接線和程式碼片段合併。
  • 素材前處理 (tts、transcribe、remove-background) → 使用 hyperframes-media 來處理語音選擇、Whisper 模型規則、字幕以及 TTS 到字幕的串聯。
  • 參數化渲染 (--variables) → 透過 <html> 上的 data-composition-variables 宣告;請參閱 hyperframes-core 以了解完整架構。

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 孤立地評估每個合成。它們永遠不會載入包含 data-composition-src 子合成的 index.html,因此無法捕獲跨檔案掛載失敗 (請參閱 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.

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

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.

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.

相關技能