Communitygithub.com

ComeOnOliver/skillshub

使用 Remotion 從 Stitch 專案生成流暢的導覽影片,包含過場動畫、縮放效果與文字覆蓋層。

skillshub 是什麼?

此技能專為將 Stitch 設計專案中的螢幕畫面,自動轉換為專業的導覽影片而設計。它整合了 Stitch 的畫面擷取能力與 Remotion 的程式化影片生成技術,能產出流暢的過場、縮放效果與情境文字說明。支援的流程包括:透過 MCP 伺服器發現專案與畫面、下載螢幕截圖、建立 Remotion 專案結構、撰寫 React 元件(如 ScreenSlide.tsx 與 WalkthroughComposition.tsx)以控制動畫與時序,最後渲染輸出 MP4 等格式。此外,還支援進階功能如互動熱點、語音旁白整合與動態文字提取。使用者可透過 Remotion Studio 即時預覽與調整,確保影片品質。此技能適用於 Claude Code、Cursor 等支援 MCP 的 AI 代理平台,能大幅簡化開發者與設計師製作產品示範或教學影片的工作流程。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/google-labs-code/remotion

在你喜歡的 AI 中提問

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

說明文件

Stitch 到 Remotion 導覽影片

您是一位專注於從應用程式設計稿產出引人入勝導覽影片的影片製作專家。您結合 Stitch 的畫面擷取能力與 Remotion 的程式化影片生成技術,產出流暢且專業的簡報。

概述

此技能讓您能夠建立展示應用程式畫面的導覽影片,具備專業過場效果、縮放動畫與情境文字覆蓋。工作流程會從 Stitch 專案中擷取畫面,並將其編排成 Remotion 影片合成。

前置需求

必要條件:

  • 存取 Stitch MCP 伺服器
  • 存取 Remotion MCP 伺服器(或 Remotion CLI)
  • 已安裝 Node.js 與 npm
  • 一個包含設計好畫面的 Stitch 專案

建議:

  • 熟悉 Remotion 的影片功能
  • 了解 React 元件(Remotion 使用 React)

擷取與網路連線

步驟 1:探索可用的 MCP 伺服器

執行 list_tools 以識別可用的 MCP 伺服器及其前綴:

  • Stitch MCP:尋找 stitch: 或 mcp_stitch: 前綴
  • Remotion MCP:尋找 remotion: 或 mcp_remotion: 前綴

步驟 2:擷取 Stitch 專案資訊

  1. 專案查詢(如果未提供專案 ID):

    • 呼叫 [stitch_prefix]:list_projects,參數為 filter: "view=owned"
    • 依標題(例如 "Calculator App")識別目標專案
    • 從 name 欄位中提取專案 ID(例如 projects/13534454087919359824)
  2. 畫面擷取:

    • 使用專案 ID(僅數字)呼叫 [stitch_prefix]:list_screens
    • 檢視畫面標題,識別導覽所需的所有畫面
    • 從每個畫面的 name 欄位提取畫面 ID
  3. 畫面元資料擷取: 針對每個畫面:

    • 使用 projectId 和 screenId 呼叫 [stitch_prefix]:get_screen
    • 取得以下資訊:
      • screenshot.downloadUrl — 用於影片的視覺素材
      • htmlCode.downloadUrl — 可選:用於提取文字/內容
      • width, height — 用於正確縮放的畫面尺寸
      • 畫面標題與描述(用於文字覆蓋)
  4. 素材下載:

    • 使用 web_fetch 或 Bash 搭配 curl 下載螢幕截圖
    • 儲存至暫存目錄:assets/screens/{screen-name}.png
    • 依導覽流程順序組織素材

步驟 3:設定 Remotion 專案

  1. 檢查現有 Remotion 專案:

    • 尋找 remotion.config.ts 或包含 Remotion 相依性的 package.json
    • 若存在,則使用現有專案結構
  2. 建立新的 Remotion 專案(如果需要):

    npm create video@latest -- --blank
    
    • 選擇 TypeScript 模板
    • 在專用 video/ 目錄中設定
  3. 安裝相依套件:

    cd video
    npm install @remotion/transitions @remotion/animated-emoji
    

影片合成策略

架構

建立一個模組化的 Remotion 合成,包含以下元件:

  1. ScreenSlide.tsx — 單一畫面顯示元件

    • 屬性:imageSrc, title, description, width, height
    • 功能:縮放動畫、淡入淡出過場
    • 持續時間:可設定(預設每個畫面 3-5 秒)
  2. WalkthroughComposition.tsx — 主要影片合成

    • 序列化多個 ScreenSlide 元件
    • 處理畫面間的過場
    • 加入文字覆蓋與註解
  3. config.ts — 影片設定

    • 影格率(預設:30 fps)
    • 影片尺寸(匹配 Stitch 畫面尺寸或按比例縮放)
    • 總時長計算

過場效果

使用 Remotion 的 @remotion/transitions 達到專業效果:

  • 淡入淡出:畫面間的平滑交叉淡出

    import {fade} from '@remotion/transitions/fade';
    
  • 滑入:方向性滑入過場

    import {slide} from '@remotion/transitions/slide';
    
  • 縮放:強調的縮放效果

    • 使用 spring() 動畫實現平滑縮放
    • 應用於重要的 UI 元素

文字覆蓋

使用 Remotion 的文字渲染功能加入情境資訊:

  1. 畫面標題:顯示在每個影格的上方或下方
  2. 功能標註:使用動畫指標強調特定 UI 元素
  3. 描述文字:為每個畫面淡入描述文字
  4. 進度指示器:顯示目前在導覽中的位置

執行步驟

步驟 1:收集畫面素材

  1. 識別目標 Stitch 專案
  2. 列出專案中所有畫面
  3. 下載每個畫面的螢幕截圖
  4. 依導覽流程順序組織
  5. 建立清單檔案(screens.json):
{
  "projectName": "計算機應用程式",
  "screens": [
    {
      "id": "1",
      "title": "主畫面",
      "description": "主要計算機介面,附數字鍵盤",
      "imagePath": "assets/screens/home.png",
      "width": 1200,
      "height": 800,
      "duration": 4
    },
    {
      "id": "2",
      "title": "歷史記錄檢視",
      "description": "檢視先前的計算結果",
      "imagePath": "assets/screens/history.png",
      "width": 1200,
      "height": 800,
      "duration": 3
    }
  ]
}

步驟 2:產生 Remotion 元件

遵循 Remotion 最佳實務建立影片元件:

  1. 建立 ScreenSlide.tsx:

    • 使用 useCurrentFrame() 和 spring() 實現動畫
    • 實作縮放與淡出效果
    • 以適當時間點加入文字覆蓋
  2. 建立 WalkthroughComposition.tsx:

    • 匯入畫面清單
    • 使用 <Sequence> 元件序列化畫面
    • 在畫面間套用過場效果
    • 計算正確的時間點與偏移量
  3. 更新 remotion.config.ts:

    • 設定合成 ID
    • 設定影片尺寸
    • 設定影格率與持續時間

參考資源:

  • 使用 resources/screen-slide-template.tsx 作為起點
  • 參考 resources/composition-checklist.md 確保完整性
  • 檢視 examples/walkthrough/ 目錄中的範例

步驟 3:預覽與調整

  1. 啟動 Remotion Studio:

    npm run dev
    
    • 開啟瀏覽器式預覽
    • 可即時編輯與調整
  2. 調整時間:

    • 確保每個畫面有適當的顯示時間
    • 確認過場效果流暢
    • 檢查文字覆蓋的時間點
  3. 微調動畫:

    • 調整縮放效果的 spring 設定
    • 修改過場的緩動函數
    • 確保文字始終可讀

步驟 4:渲染影片

  1. 使用 Remotion CLI 渲染:

    npx remotion render WalkthroughComposition output.mp4
    
  2. 替代方案:使用 Remotion MCP(如果可用):

    • 使用合成詳細資訊呼叫 [remotion_prefix]:render
    • 指定輸出格式(MP4、WebM 等)
  3. 最佳化選項:

    • 設定品質等級(--quality)
    • 設定編碼器(--codec h264 或 h265)
    • 啟用平行渲染(--concurrency)

進階功能

互動熱點

強調可點擊元素或重要功能:

import {interpolate, useCurrentFrame} from 'remotion';

const Hotspot = ({x, y, label}) => {
  const frame = useCurrentFrame();
  const scale = spring({
    frame,
    fps: 30,
    config: {damping: 10, stiffness: 100}
  });
  
  return (
    <div style={{
      position: 'absolute',
      left: x,
      top: y,
      transform: `scale(${scale})`
    }}>
      <div className="pulse-ring" />
      <span>{label}</span>
    </div>
  );
};

語音旁白整合

為導覽加入旁白:

  1. 從畫面描述生成旁白稿
  2. 使用文字轉語音或錄製音訊
  3. 使用 <Audio> 元件將音訊匯入 Remotion
  4. 同步畫面時間與旁白節奏

動態文字提取

從 Stitch HTML 程式碼中提取文字以自動產生註解:

  1. 下載每個畫面的 htmlCode.downloadUrl
  2. 解析 HTML 以提取關鍵文字元素(標題、按鈕、標籤)
  3. 為重要 UI 元素自動生成標註
  4. 以時間點文字覆蓋的形式加入合成中

檔案結構

project/
├── video/                      # Remotion 專案目錄
│   ├── src/
│   │   ├── WalkthroughComposition.tsx
│   │   ├── ScreenSlide.tsx
│   │   ├── components/
│   │   │   ├── Hotspot.tsx
│   │   │   └── TextOverlay.tsx
│   │   └── Root.tsx
│   ├── public/
│   │   └── assets/
│   │       └── screens/        # 下載的 Stitch 螢幕截圖
│   │           ├── home.png
│   │           └── history.png
│   ├── remotion.config.ts
│   └── package.json
├── screens.json                # 畫面清單
└── output.mp4                  # 渲染後的影片

與 Remotion Skills 整合

Remotion 維護其自身的 Agent Skills,定義了最佳實務。請參考這些以獲得進階技巧:

可運用的關鍵 Remotion 技能:

  • 動畫時間點與緩動
  • 合成架構模式
  • 效能最佳化
  • 音訊同步

常見模式

模式 1:簡單幻燈片

使用淡出過場的基本導覽:

  • 每個畫面 3-5 秒
  • 交叉淡出過場
  • 底部文字覆蓋顯示畫面標題
  • 頂部進度列

模式 2:功能強調

聚焦於特定 UI 元素:

  • 縮放至特定區域
  • 指向功能的動畫圓形/箭頭
  • 關鍵交互的慢動作強調
  • 並排的前後對比

模式 3:使用者流程

展示逐步使用者旅程:

  • 使用方向性滑入的連續畫面流程
  • 編號步驟覆蓋
  • 強調使用者操作(點擊、輕觸)
  • 使用動畫路徑連接畫面

疑難排解

問題解決方案
螢幕截圖模糊確保下載的圖片為全解析度;檢查 screenshot.downloadUrl 的品質設定
文字對齊不準確認畫面尺寸與合成大小匹配;根據實際畫面尺寸調整文字位置
動畫卡頓將影格率提升至 60fps;使用適當的彈簧設定,搭配合適的阻尼
Remotion 建置失敗檢查 Node 版本相容性;確認所有相依套件已安裝;查閱 Remotion 文件
時間點感覺不對在清單中調整每個畫面的持續時間;在 Remotion Studio 中預覽;以實際使用者測試

最佳實務

  1. 維持長寬比:使用 Stitch 實際畫面尺寸或按比例縮放
  2. 一致的時間點:除非要強調特定畫面,否則保持畫面顯示時間一致
  3. 可讀文字:確保足夠的對比;使用合適的字體大小;避免雜亂的覆蓋層
  4. 流暢的過場:使用彈簧動畫實現自然運動;避免突兀的切換
  5. 徹底預覽:在最終渲染前,務必先在 Remotion Studio 中預覽
  6. 最佳化素材:適當壓縮圖片;使用高效格式(UI 用 PNG,照片用 JPG)

使用範例

使用者提示:

在我的 Stitch 專案「計算機應用程式」中查詢畫面,並建立一個展示畫面的導覽影片。

代理工作流程:

  1. 列出 Stitch 專案 → 找到「計算機應用程式」→ 提取專案 ID
  2. 列出專案中的畫面 → 識別所有畫面(主畫面、歷史記錄、設定)
  3. 下載每個畫面的螢幕截圖 → 儲存至 assets/screens/
  4. 建立包含畫面元資料的 screens.json 清單
  5. 生成 Remotion 元件(ScreenSlide.tsx、WalkthroughComposition.tsx)
  6. 在 Remotion Studio 中預覽 → 調整時間點與過場效果
  7. 渲染最終影片 → calculator-walkthrough.mp4
  8. 完成回報,附上影片預覽連結

成功秘訣

  • 從簡單開始:先使用基本的淡出過場,再加入複雜動畫
  • 遵循 Remotion 模式:充分利用 Remotion 的官方技能與文件
  • 使用清單檔案:將畫面資料以 JSON 組織,便於更新
  • 頻繁預覽:使用 Remotion Studio 及早發現問題
  • 考慮無障礙性:加入字幕;確保文字可讀;使用清晰的視覺效果
  • 針對平台最佳化:根據目標平台(YouTube、社群媒體等)調整影片尺寸

參考資料

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相關技能