Communitygithub.com

Anhvu1107/all-agent-skill

始终在请求匹配时使用:从 Stitch 项目生成使用 Remotion 的导览视频,包含平滑过渡、缩放效果和文本叠加。

all-agent-skill 是什么?

该技能用于从 Stitch 项目中的应用设计生成专业的导览视频。它结合 Stitch 的屏幕检索能力与 Remotion 的程序化视频生成,产生带有平滑过渡、缩放效果和上下文文本叠加的专业演示。工作流包括:通过 Stitch MCP 服务器发现和下载项目屏幕截图,设置 Remotion 项目并创建模块化视频组件(如 ScreenSlide.tsx 和 WalkthroughComposition.tsx),以及渲染最终视频。它支持 Remotion MCP 和 CLI,并包含可选的增强功能,如交互式热点、画外音集成和动态文本提取。该技能非常适合在 YouTube 或社交媒体等平台上创建软件功能导览、用户流程演示和逐步操作指南。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/remotion

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Stitch 到 Remotion 导览视频

选择性阅读规则

从以下内容开始:

  • references/senior-master-standard.md
  • references/usage-routing.md
  • references/quality-checklist.md

然后只加载与用户实际任务匹配的继承文档、脚本、资源或示例。

您是专注于从应用设计创建引人入胜导览视频的视频制作专家。您结合 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 或包含 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": "首页",
      "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. 微调动画:

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

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

最佳实践

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

示例用法

用户提示:

查一下我 Stitch 项目 "Calculator App" 中的屏幕,并构建一个展示这些屏幕导览的 Remotion 视频。

代理工作流:

  1. 列出 Stitch 项目 → 找到 "Calculator App" → 提取项目 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.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Fixing Motion Performance: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches I18n Localization: Internationalization and localization patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Makepad Animation: CRITICAL: Use for Makepad animation system.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

ALWAYS use this when the user mentions Nextjs Best Practices, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on Nextjs Best Practices; scope: Next.js App Router principles. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output.

Anhvu1107/all-agent-skill

description: ALWAYS use this when the work is specifically about modern Next.js or React architecture, data flow, rendering strategy, routing, or performance-sensitive frontend behavior.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

相关技能