Communitygithub.com

9018/mychat

工具包專用的 Remotion 慣例模式 — 自訂轉場、共享元件及專案約定。如需核心 Remotion 框架知識(鉤子、動畫、渲染等),請參閱 `remotion-official` 技能。

mychat 是什麼?

此技能定義了一組工具包特定的 Remotion 模式,適用於 AI 編碼代理(例如 Claude Code),以增強影片專案開發。它包含一個共享元件庫(如 `AnimatedBackground`、`SlideTransition` 及 `Vignette`)以及一個自訂轉場集合(如 `glitch`、`lightLeak`、`clockWipe` 及 `checkerboard`),這些轉場超越了官方 `@remotion/transitions` 套件。技能提供明確的使用範例、建議的轉場持續時間(以影格為單位)以及專案時間安排慣例(例如標題場景 3-5 秒)。遵循關鍵最佳實務,例如僅使用基於影格的動畫、從 `useVideoConfig()` 取得 FPS、使用 `extrapolateRight: 'clamp'` 限制插值,以及針對非同步資料使用 `delayRender`。預設所有專案使用 30fps,並提供一個展示畫廊供預覽轉場。此技能涵蓋的內容補充了官方 Remotion 技能,而非取代它。

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

在你喜歡的 AI 中提問

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

說明文件

Remotion — 工具包擴充功能

核心 Remotion 知識 位於 .claude/skills/remotion-official/(從官方 remotion-dev/skills 儲存庫同步)。此檔案僅涵蓋 工具包特定 模式。

共享元件

位在 lib/components/ 中的可重複使用影片元件。在範本中透過以下方式匯入:

import { AnimatedBackground, SlideTransition, Label } from '../../../../lib/components';
元件用途
AnimatedBackground浮動形狀背景(變體:subtle、tech、warm、dark)
SlideTransition場景轉場(淡入、縮放、向上滑入、模糊淡入)
Label浮動標籤徽章,可附帶可選的 JIRA 參考
Vignette電影感邊緣暗化疊層
LogoWatermark角落標誌品牌
SplitScreen並排影片比較
NarratorPiP子母畫面主講人疊層
Envelope具有開蓋動畫的 3D 信封
PointingHand帶有滑入與脈衝效果的動畫手勢表情符號
MazeDecoration角落的動畫等距網格裝飾

自訂轉場

工具包包含位於 lib/transitions/ 的轉場庫,提供超越官方 @remotion/transitions 套件的場景間效果。

使用 TransitionSeries

import { TransitionSeries, linearTiming } from '@remotion/transitions';
// 從 lib 匯入自訂轉場(根據您的專案位置調整路徑)
import { glitch, lightLeak, clockWipe, checkerboard } from '../../../../lib/transitions';
// 或者從 @remotion/transitions 匯入官方轉場
import { slide, fade } from '@remotion/transitions/slide';

<TransitionSeries>
  <TransitionSeries.Sequence durationInFrames={90}>
    <TitleSlide />
  </TransitionSeries.Sequence>
  <TransitionSeries.Transition
    presentation={glitch({ intensity: 0.8 })}
    timing={linearTiming({ durationInFrames: 30 })}
  />
  <TransitionSeries.Sequence durationInFrames={120}>
    <ContentSlide />
  </TransitionSeries.Sequence>
</TransitionSeries>

可用的自訂轉場

轉場選項最佳用途
glitch()intensity、slices、rgbShift技術示範、前衛呈現、賽博龐克
rgbSplit()direction、displacement現代科技、充滿活力的轉場
zoomBlur()direction、blurAmount行動呼籲、高能量時刻、衝擊效果
lightLeak()temperature、direction慶祝活動、電影美學、溫暖時刻
clockWipe()startAngle、direction、segments時間相關內容、趣味呈現
pixelate()maxBlockSize、gridSize、scanlines、glitchArtifacts、randomness復古/遊戲、數位轉換
checkerboard()gridSize、pattern、stagger、squareAnimation趣味呈現、結構化轉場

棋盤格模式: sequential、random、diagonal、alternating、spiral、rows、columns、center-out、corners-in

轉場範例

// 技術/賽博龐克感覺
glitch({ intensity: 0.8, slices: 8, rgbShift: true })

// 溫暖慶祝
lightLeak({ temperature: 'warm', direction: 'right' })

// 高能量縮放
zoomBlur({ direction: 'in', blurAmount: 20 })

// 色相差
rgbSplit({ direction: 'diagonal', displacement: 30 })

// 時鐘掃描呈現
clockWipe({ direction: 'clockwise', startAngle: 0 })

// 復古像素化
pixelate({ maxBlockSize: 50, glitchArtifacts: true })

// 棋盤格模式
checkerboard({ pattern: 'diagonal', gridSize: 8 })
checkerboard({ pattern: 'spiral', gridSize: 10 })
checkerboard({ pattern: 'center-out', squareAnimation: 'scale' })

轉場持續時間指南

類型影格數備註
快速切換15-20快速、有力
標準30-45最常見
戲劇化50-60緩慢呈現
干擾效果20-30應感覺突然
光洩漏45-60需要時間掃過

預覽轉場

執行展示畫廊以查看所有轉場:

cd showcase/transitions && npm run studio

工具包最佳實務

  1. 僅使用基於影格的動畫 — 避免 CSS 轉場/動畫;它們會在渲染期間造成閃爍
  2. 使用 useVideoConfig() 中的 fps — 使動畫與影格率無關
  3. 限制插值 — 使用 extrapolateRight: 'clamp' 防止數值失控
  4. 使用 OffthreadVideo — 對於複雜組合,效能優於 <Video>
  5. 非同步資料使用 delayRender — 務必在資料準備就緒後才開始渲染
  6. 靜態檔案使用 staticFile — 正確引用 public/ 資料夾中的檔案
  7. 所有專案使用 30fps — 時間計算:影格數 = 秒數 × 30
  8. playbackRate 必須保持恆定 — 對於可變/極端速度,請先使用 FFmpeg 進行預處理

專案時間安排慣例

場景類型持續時間備註
標題3-5 秒 (90-150 影格)標誌 + 標題
概述10-20 秒3-5 個要點
示範10-30 秒調整 playbackRate 以符合時間
統計資料8-12 秒3-4 張統計卡片
致謝5-10 秒快速淡出

節奏: 旁白約每分鐘 150 字。旁白決定時間安排。

進階 API

如需所有鉤子、元件、渲染器、Lambda 及 Player API 的詳細 API 文件,請參閱 reference.md。

授權說明

Remotion 具有特殊授權。公司可能需要取得授權才能用於商業用途。請查看 https://remotion.dev/license


意見回饋與貢獻

如果此技能缺少資訊或可改進:

  • 缺少某個模式? 請描述您需要的內容
  • 發現錯誤? 請告知問題所在
  • 想貢獻? 我可以協助您:
    1. 使用改進內容更新此技能
    2. 建立 PR 到 github.com/digitalsamba/claude-code-video-toolkit

只需說「改進此技能」,我將引導您更新 .claude/skills/remotion/SKILL.md。

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

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

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.

相關技能