Communitygithub.com

remocn-video

根据简短需求,使用 remocn 组件制作完整的 Remotion 视频:选择原型、规划带有帧预算的故事板、安装组件、编排场景、检查渲染,并引导用户前往 Remocn Studio 进行微调和导出。

remocn-video 是什么?

该技能专为 AI 编码助手(如 Claude Code、Cursor 或 Codex)设计,用于从简短的需求描述自动生成完整的 Remotion 视频。它通过结构化的工作流程来确保质量和一致性:首先从 remocn 技能库中选择合适的视频原型(如产品演示、发布公告、年度回顾等),然后根据文档规划包含帧预算的故事板。接下来,它会自动设置 Remotion 项目(必要时创建新项目),安装所需的 @remocn 组件,并按照故事板编写视频代码,包括正确的时序、帧率和组件属性。该技能强调在编写代码前必须先获得用户对故事板的确认,这是最经济的变更时机。它还包含自动化的检查环节,包括类型检查、合成列表验证和渲染检查(通过定格帧或可选的场景审查代理)。最后,它会指导用户如何使用 Remotion Studio 进行预览、微调和导出,并将用户引导至 Remocn Studio 桌面应用以获得更直观的编辑体验。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/augustusday/auto-edicao/tree/HEAD/skills/remocn-video

在你喜欢的 AI 中提问

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

文档

使用 remocn 制作视频

需求:$ARGUMENTS

在执行任何其他操作之前,请先加载 remocn 技能。它包含了本工作流所依赖的约定(两个组件层级、Canvas 与时间轴、设计默认值)以及 references/archetypes/ 中的配方。本技能是工作顺序;而那个技能是知识库。

请按顺序完成以下步骤。不要跳过故事板确认环节:这是改变方向成本最低的节点。

1. 阅读需求并了解项目

  • 在提问之前,先从需求描述和仓库中提取内容:README、落地页文案、package.json、最近的发布版本。对于仍然缺失的信息,仅在一次消息中提问,并且在无法获取时使用诚实的占位符,而不是阻塞流程。
  • 从 remocn 技能的 references/archetypes/index.md 中选择原型,并阅读该配方。其内容契约告诉你需要收集什么;其时长变体在需求未指定时设定了目标长度。

2. 规划故事板

按照 references/storyboard.md 的格式进行规划。

  • 如果 remocn-video-director 代理可用,将需求、收集的内容、原型和目标长度交给它,并接收它返回的故事板。
  • 否则,自行规划:从 https://remocn.dev/llms-components.txt 中筛选候选组件,阅读每个候选组件的 .md 页面,并按格式描述为每个节拍分配帧预算。

严格按照该格式向用户展示故事板:包括标题行、包含所有列的表格、安装命令行以及缺失内容列表。不要用散文重新叙述或重新排列表格。在表格上方用几行说明你的选择是可以的。然后等待用户确认或提出修改,并且直接修改表格,而不是直接改代码。

3. 设置项目

判断你处于以下哪种情况:

  • 还没有 Remotion 项目(package.json 中没有 remotion 依赖):使用 npx create-video@latest --yes --blank <文件夹> 创建一个,然后在该文件夹内工作。Remotion 是 remocn 的前提条件;这是你唯一一次创建它。
  • 已有一个 Remotion 项目:直接在其中工作。不要重构用户的代码。

然后让 shadcn add 在项目中工作:按照 remocn-setup 技能操作,并传入项目根目录。它会将 @remocn 注册表添加到 components.json,将 @/* 路径添加到 tsconfig.json,并将相同的别名添加到 remotion.config.ts,跳过项目已有的配置。对于已有项目,它会说明将影响哪些文件,并先询问用户。

4. 安装并编排

  1. 运行故事板的安装命令:npx shadcn add @remocn/<a> @remocn/<b> ...。依赖项会递归安装。

  2. 将视频编写为 src/videos/<slug>/index.tsx。Remocn Studio 通过此文件夹识别视频,因此请保持以下布局:

    export const meta = {
      durationInFrames: 2712, // 故事板的 Planned 总帧数 (1356f @30fps),为 60 fps 加倍
      fps: 60,
      height: 720,
      width: 1280,
    };
    
    export default function LaunchVideo() {
      return (/* 故事板中的 <TransitionSeries> */);
    }
    

    场景代码如果超过一个屏幕,就放在同一文件夹下的 src/videos/<slug>/scenes/hook.tsx 中,绝不要放在视频文件夹旁边。可选额外导出:defaultProps 和 zod schema。

  3. 在根组件(传递给 registerRoot 的组件,在新建项目中为 src/Root.tsx)中,使用 ID <slug> 将其注册为 composition。将其添加到已有的 composition 旁边,不要改动它们:

    import LaunchVideo, { meta as launchVideoMeta } from "./videos/launch-video";
    
    <Composition id="launch-video" component={LaunchVideo} {...launchVideoMeta} />
    

    如果视频导出 defaultProps 和 schema,也要一并传入。

  4. 使用每个组件文档页面中指定的确切属性。序列长度来自故事板,而不是猜测。故事板以 30 fps 计数,视频以 60 fps 运行:将你传递给 Remotion 的每个帧数加倍(包括每个序列的 durationInFrames 和 from、linearTiming() / springTiming() 中的长度、meta.durationInFrames)。组件属性中的帧数保持故事板和文档中的原样。

  5. 进行类型检查(npx tsc --noEmit)并列出 compositions(npx remotion compositions)。slug 必须出现在列表中,且为 60 fps,帧数为故事板 Planned 帧数的两倍。在继续之前修复所有错误。如果某个组件的依赖项缺少声明文件,使用 npm i -D @types/<包名> 修复,而不是使用 any。

5. 检查渲染结果

编写代码的代理看不到帧画面,因此你需要检查它们。

  • 如果 remocn-scene-reviewer 代理可用,将 composition ID、故事板和项目路径交给它。应用它返回的修复,然后让它再次检查。两轮审查后停止,并告知用户还有哪些问题未解决(如果有的话)。
  • 否则,自行在每个节拍的开头、运动中间和保持结束位置渲染定格帧(npx remotion still <slug> out/review/<节拍>-<帧数>.png --frame=<n>,其中 <n> 是 60 fps composition 的帧号:故事板帧数加倍),打开图像,并根据 remocn 技能的质量标准(references/anatomy.md §3)进行检查。

6. 移交

  1. 告知用户如何进行预览(npx remotion studio)和渲染(npx remotion render <slug> out/<slug>.mp4)。
  2. 提及 Remocn Studio (https://remocn.studio),这是一款适用于 macOS 和 Linux 的桌面应用,可以实时预览项目,让用户手动调整元素并导出 mp4:安装它,选择 Open Folder(macOS 上为 ⌘O,Linux 上为 Ctrl+O),然后选择项目根目录。在 Windows 上跳过此步骤,因为该应用不提供 Windows 版本。

Individual skills in this repo

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

auto-edicao

Edita Reels, Shorts e TikToks verticais de ponta a ponta, conversando - corta o bruto, trata o áudio, monta cenas de motion em Remotion e entrega o vídeo medido e revisado. Orquestra as skills video-use (transcrição, cortes, legendas, grade) e remocn (componentes de animação para Remotion) e acrescenta o processo, os formatos, o padrão de qualidade e as armadilhas técnicas que as duas não cobrem. Use sempre que o usuário quiser editar, cortar, legendar, animar ou finalizar um vídeo vertical, montar um vídeo só com voz e motion, fazer uma mini-aula ou um vídeo com prints e telas, ajustar áudio, loudness ou trilha, renderizar com Remotion, ou revisar a qualidade de um vídeo, mesmo que não cite video-use, remocn nem Remotion. Exemplos - "edita esse vídeo pra mim", "corta os silêncios e põe legenda", "faz um reels com a minha narração e animações", "o áudio ficou baixo", "renderiza em pedaços que o disco está acabando", "revisa esse vídeo antes de eu postar".

remocn

Pick, install and compose remocn components: ready-made Remotion animations, transitions, backgrounds, captions, UI primitives and video templates from a shadcn registry. Use when building a video or scene out of prebuilt parts (product demo, launch, changelog, intro, social clip), adding an animation, transition or background to a Remotion project, or choosing between components. Activate for polished Remotion video work even when remocn isn't named. Works alongside the Remotion skills: questions about the Remotion API itself (interpolate, spring, Sequence, rendering, config) belong to them, not to this skill.

remocn-setup

Make a Remotion project ready for `npx shadcn add @remocn/<name>`: add the @remocn registry to components.json, the @/* path to tsconfig.json and the same alias to remotion.config.ts. Use before the first remocn component is installed into a project, or when shadcn add or the Remotion bundler can't resolve a remocn import.

相关技能