Communitygithub.com

JantonioFC/skillsbank

从 Stitch 项目中生成带有平滑过渡、缩放和文字叠加的演示视频,基于 Remotion 实现

skillsbank 是什么?

此技能的作用是将 Stitch 项目中的屏幕设计转化为专业的演示视频。它利用 Stitch 的屏幕检索能力获取设计截图,再借助 Remotion 的程序化视频生成功能,将这些截图编排成具有平滑过渡效果、缩放动画和文字标注的视频。技能支持自动发现 MCP 服务器、获取 Stitch 项目信息、下载屏幕截图、搭建 Remotion 项目并生成模块化的视频组件(如 ScreenSlide.tsx 和 WalkthroughComposition.tsx)。用户可以通过配置过渡效果(淡入淡出、滑动、缩放)和文字叠加(标题、功能标注、描述、进度指示器)来定制视频。最终输出符合开发者预期的视频文件。该技能适用于需要在 Stitch 设计基础上快速制作产品演示或功能解说视频的场景,兼容 Stitch MCP 和 Remotion MCP 服务器。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JantonioFC/skillsbank/tree/HEAD/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"
    • 通过标题识别目标项目(例如,“计算器应用”)
    • 从 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. 微调动画:

    • 为缩放效果调整弹簧配置
    • 为过渡修改缓动函数
    • 确保文本始终可读

步骤 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 project directory
│   ├── 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;使用具有适当阻尼的正确弹簧配置
Remotion 构建失败检查 Node 版本兼容性;确保所有依赖项已安装;查看 Remotion 文档
时机感觉不对在清单中调整每个屏幕的持续时间;在 Remotion Studio 中预览;与实际用户测试

最佳实践

  1. 保持宽高比:使用实际的 Stitch 屏幕尺寸或按比例缩放
  2. 一致的时机:除非强调特定屏幕,否则保持屏幕显示持续时间一致
  3. 可读的文本:确保足够的对比度;使用适当的字体大小;避免杂乱的叠加
  4. 平滑的过渡:使用弹簧动画实现自然运动;避免突兀的剪切
  5. 彻底预览:在最终渲染前始终在 Remotion Studio 中预览
  6. 优化素材:适当压缩图像;使用高效格式(UI 使用 PNG,照片使用 JPG)

示例用法

用户提示:

在我的 Stitch 项目“计算器应用”中查找屏幕,并构建一个展示屏幕演示的 Remotion 视频。

代理工作流程:

  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.

JantonioFC/skillsbank

AI-powered image editing with style transfer and object removal

JantonioFC/skillsbank

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

JantonioFC/skillsbank

Analise e auditoria de editais de leilao judicial e extrajudicial. Riscos ocultos, clausulas perigosas, debitos, ocupante e classificacao da oportunidade.

JantonioFC/skillsbank

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

JantonioFC/skillsbank

Best practices for Remotion - Video creation in React

JantonioFC/skillsbank

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

JantonioFC/skillsbank

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.

JantonioFC/skillsbank

Video and audio perception, indexing, and editing. Ingest files/URLs/live streams, build visual/spoken indexes, search with timestamps, edit timelines, add overlays/subtitles, generate media, and create real-time alerts.

JantonioFC/skillsbank

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

JantonioFC/skillsbank

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

JantonioFC/skillsbank

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.

JantonioFC/skillsbank

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

JantonioFC/skillsbank

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

JantonioFC/skillsbank

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,'...

JantonioFC/skillsbank

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, expla...

JantonioFC/skillsbank

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awarene...

JantonioFC/skillsbank

Generate AI videos with Google Veo, Seedance, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 1.5 Pro, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, lipsync, avatar animation, video upscaling, fole...

JantonioFC/skillsbank

Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

JantonioFC/skillsbank

Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

JantonioFC/skillsbank

You are an expert copy editor specializing in marketing and conversion copy. Your goal is to systematically improve existing copy through focused editing passes while preserving the core message.

相关技能