Communitygithub.com

ASoudy/AGS

從 Stitch 專案中,使用 Remotion 搭配流暢轉場、縮放與文字覆蓋,產生引導式操作影片。

AGS 是什麼?

這項技能讓開發者或 AI 代理能夠從 Stitch 應用程式設計的畫面,自動生成專業的引導式操作影片。它透過 Stitch MCP 伺服器擷取螢幕截圖,再運用 Remotion 的程式化影片生成能力,為每個畫面加入縮放動畫、淡化或滑動等轉場效果,以及說明文字疊層。技能支援 Stitch 和 Remotion 的 MCP 協定,同時也允許直接使用 Remotion CLI。使用者可以自訂每張畫面的持續時間、轉場樣式,甚至整合語音旁白或動態文字擷取,產出高品質的 MP4 或 WebM 影片。此技能特別適合產品展示、使用者流程教學或功能亮點介紹,並提供多種常見模式(如幻燈片輪播、區域聚焦、步驟導覽)來滿足不同場景。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/AGAS/plugins/antigravity-awesome-skills-claude/skills/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"
    • 根據標題(例如「計算機 App」)識別目標專案
    • 從 name 欄位(例如 projects/13534454087919359824)提取專案 ID
  2. 畫面擷取:

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

    • 呼叫 [stitch_prefix]:get_screen 並帶入 projectId 與 screenId
    • 擷取:
      • screenshot.downloadUrl — 影片的視覺素材
      • htmlCode.downloadUrl — 可選:用於提取文字/內容
      • width、height — 畫面尺寸,以利正確縮放
      • 畫面標題與說明,用於文字疊層
  4. 素材下載:

    • 使用 web_fetch 或帶有 curl 的 Bash 下載螢幕截圖
    • 儲存到暫存目錄: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 — 個別畫面顯示元件

    • Props: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": "Calculator App",
  "screens": [
    {
      "id": "1",
      "title": "Home Screen",
      "description": "Main calculator interface with number pad",
      "imagePath": "assets/screens/home.png",
      "width": 1200,
      "height": 800,
      "duration": 4
    },
    {
      "id": "2",
      "title": "History View",
      "description": "View of previous calculations",
      "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 技能的整合

Remotion 維護其自己的代理技能,定義了最佳實務。請參閱這些技能以獲得進階技術:

要運用的主要 Remotion 技能:

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

常見模式

模式 1:簡單幻燈片

使用淡化轉場的基本引導式操作:

  • 每張畫面 3-5 秒
  • 交叉淡出轉場
  • 底部文字疊層顯示畫面標題
  • 頂部進度條

模式 2:功能亮點

聚焦於特定 UI 元素:

  • 縮放到特定區域
  • 動態圓圈/箭頭指向功能
  • 對關鍵互動進行慢動作強調
  • 並排比較前後差異

模式 3:使用者流程

展示逐步的使用者旅程:

  • 帶有方向性滑動的順序畫面流程
  • 編號步驟疊層
  • 強調使用者操作(點擊、輕觸)
  • 使用動態路徑連接畫面

疑難排解

問題解決方案
模糊的螢幕截圖確保下載的圖片為全解析度;檢查 screenshot.downloadUrl 的品質設定
文字錯位確認畫面尺寸符合組合大小;根據實際畫面尺寸調整文字位置
動畫卡頓將幀率提升至 60fps;使用適當的 spring 設定與阻尼
Remotion 建置失敗檢查 Node 版本相容性;確保所有依賴已安裝;檢視 Remotion 文件
時間感不對在資訊清單中調整每張畫面的持續時間;在 Remotion Studio 中預覽;以實際使用者測試

最佳實務

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

使用範例

使用者提示:

請查詢我的 Stitch 專案「Calculator App」中的畫面,並建立一個展示這些畫面的 Remotion 引導式操作影片。

代理工作流程:

  1. 列出 Stitch 專案 → 找到「Calculator App」→ 提取專案 ID
  2. 列出專案中的畫面 → 識別所有畫面(Home、History、Settings)
  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.

ASoudy/AGS

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

ASoudy/AGS

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

ASoudy/AGS

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

ASoudy/AGS

One sentence - what this skill does and when to invoke it

ASoudy/AGS

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

ASoudy/AGS

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

ASoudy/AGS

Pull a YouTube video transcript into a queryable markdown vault with yt-dlp subtitle discovery, VTT cleanup, metadata frontmatter, and capture-seed stubs.

ASoudy/AGS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

ASoudy/AGS

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

ASoudy/AGS

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

ASoudy/AGS

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

ASoudy/AGS

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

ASoudy/AGS

Next.js App Router principles. Server Components, data fetching, routing patterns.

ASoudy/AGS

Expert integration of Supabase Auth with Next.js App Router

ASoudy/AGS

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

ASoudy/AGS

Best practices for Remotion - Video creation in React

ASoudy/AGS

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

ASoudy/AGS

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

ASoudy/AGS

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

ASoudy/AGS

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

相關技能