Communitygithub.com

ComeOnOliver/skillshub

使用 Remotion 从 Stitch 项目生成具有流畅过渡效果、缩放和文字覆盖的讲解视频。

skillshub 是什么?

该技能使开发者能够通过程序化方式,将 Stitch 设计稿中的应用页面截图转换为专业的 Remotion 视频讲解。核心工作流程包括:从 Stitch MCP 服务器获取项目页面截图,创建或复用 Remotion 项目,并基于 React 组件构建可定制的视频结构。它支持淡入淡出、滑动和缩放等过渡效果,并能自动添加页面标题、功能标注和进度指示器等文字覆盖层。通过 JSON 清单文件管理页面资源,开发者可以灵活控制每个页面的显示时长和动画效果,并在 Remotion Studio 中实时预览,最终渲染为 MP4 等格式的高质量视频。该技能适用于任何支持 Stitch MCP 和 Remotion MCP 的 AI 编码工具(如 Claude Code、Cursor、Codex 等),是连接设计稿与产品演示视频的高效自动化工具。

兼容平台~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"
    • 通过标题(例如“计算器应用”)识别目标项目
    • 从 name 字段中提取项目 ID(例如 projects/13534454087919359824)
  2. 屏幕检索:

    • 调用 [stitch_prefix]:list_screens 并传入项目 ID(仅数字)
    • 查看屏幕标题以确定讲解所需的所有屏幕
    • 从每个屏幕的 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 — 独立的屏幕显示组件

    • 属性: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 维护着自己的 Agent 技能,定义了最佳实践。可查阅这些技能以获取高级技巧:

可借鉴的关键 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项目“计算器应用”中查找屏幕,并构建一个展示这些屏幕的 Remotion 讲解视频。

Agent 工作流程:

  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

相关技能