video
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMake a video with remocn
使用 remocn 制作视频
The brief: $ARGUMENTS
Load the skill before anything else. It carries the conventions this flow relies on (the two
component tiers, Canvas & timing, design defaults) and the recipes in its
. This skill is the order of work; that one is the knowledge.
remocnreferences/archetypes/Work through the steps in order. Don't skip the storyboard confirmation: it is the cheapest point to
change direction.
需求说明:$ARGUMENTS
先加载 skill,然后再进行其他操作。它包含此流程所依赖的规范(两级组件体系、Canvas 与时序、设计默认值),以及 中的各种方案。当前 skill 规定工作顺序; skill 提供相应知识。
remocnreferences/archetypes/remocn请按顺序完成各步骤。不要跳过分镜脚本确认:这是改变方向成本最低的节点。
1. Read the brief and the project
1. 阅读需求说明和项目
- Pull the content from the brief and the repo before asking: , landing copy,
README, recent releases. Ask only for what is still missing, in one message, and fall back to honest placeholders rather than blocking.package.json - Pick the archetype from the skill's
remocnand read that recipe. Its content contract tells you what to gather; its duration variants set the target length when the brief doesn't.references/archetypes/index.md
- 在提问前,先从需求说明和仓库中提取内容:、落地页文案、
README、最近发布的内容。仅用一条消息询问仍然缺失的信息;如果无法获取,则使用明确标注的占位内容,不要阻塞流程。package.json - 从 skill 的
remocn中选择原型,并阅读对应方案。其内容契约决定需要收集哪些信息;当需求说明未指定时,其时长版本用于确定目标时长。references/archetypes/index.md
2. Plan the storyboard
2. 规划分镜脚本
Plan it in the format of references/storyboard.md.
- If the agent is available, hand it the brief, the gathered content, the archetype and the target length, and take its storyboard back.
remocn:video-director - Otherwise plan it yourself: shortlist from , read the
https://remocn.dev/llms-components.txtpage of every pick, and budget each beat as the format describes..md
Show the storyboard to the user as it is in that format: the header lines, the table with all its
columns, the install line and the missing-content list. Don't retell it as prose or reshape the
table. A few lines above it on the choices you made are fine. Then wait for a yes or for
changes, and apply changes to the table, not straight to code.
按 references/storyboard.md 的格式规划分镜脚本。
- 如果 agent 可用,将需求说明、已收集的内容、原型和目标时长交给它,并接收它给出的分镜脚本。
remocn:video-director - 否则自行规划:从 筛选候选组件,逐一阅读每个候选项的
https://remocn.dev/llms-components.txt页面,并按照该格式的要求为每个节拍分配帧数预算。.md
完全按照该格式向用户展示分镜脚本:标题行、包含所有列的表格、安装命令和缺失内容列表。不要用散文复述,也不要改变表格结构。可以在表格上方用几行说明你所做的选择。然后等待用户确认或提出修改,并将修改应用到表格中,而不是直接修改代码。
3. Set up the project
3. 设置项目
Find out which case you are in:
- No Remotion project yet (no dependency in
remotion): create one withpackage.json, then work inside it. Remotion is a prerequisite of remocn; this is the only time you create it.npx create-video@latest --yes --blank <folder> - An existing Remotion project: work in it as it is. Don't restructure the user's code.
Then, in both cases:
-
Makework in the project:
shadcn addbashnode "${CLAUDE_SKILL_DIR}/scripts/setup.mjs" <project-root>(Outside Claude Code:next to this file.)scripts/setup.mjsrefuses Remotion projects, and Remotion's bundler ignores tsconfig paths, so the script writesshadcn initwith thecomponents.jsonregistry, adds the@remocnpath to@/*, and resolves the same alias intsconfig.json. Each step is skipped when the project already has it; relay anyremotion.config.tsin the result.warning -
Make the project open in Remocn Studio as-is by following theskill's Prepare step.
studio
For an existing project, say which files these two steps will touch and ask before running them.
判断当前属于哪种情况:
- 还没有 Remotion 项目(中没有
package.json依赖):使用remotion创建一个,然后在该目录中工作。Remotion 是 remocn 的前置依赖;仅在此时创建一次。npx create-video@latest --yes --blank <folder> - 已有 Remotion 项目:在现有项目中工作,不要重构用户的代码。
随后,在两种情况下都执行以下操作:
-
让项目支持:
shadcn addbashnode "${CLAUDE_SKILL_DIR}/scripts/setup.mjs" <project-root>(在 Claude Code 之外使用时,运行位于本文件旁的。)scripts/setup.mjs不支持 Remotion 项目,而 Remotion 的 bundler 会忽略 tsconfig paths,因此该脚本会写入带有shadcn initregistry 的@remocn,在components.json中添加tsconfig.json路径,并在@/*中解析同一个 alias。如果项目中已经存在相应配置,则跳过相应步骤;如结果中有任何remotion.config.ts,应转达给用户。warning -
按照skill 的 Prepare 步骤操作,使项目无需修改即可在 Remocn Studio 中打开。
studio
对于已有项目,先说明上述两个步骤将修改哪些文件,并在执行前征求用户同意。
4. Install and compose
4. 安装并编排
-
Run the storyboard's install line:. Dependencies install transitively.
npx shadcn add @remocn/<a> @remocn/<b> ... -
Write the video as. This layout is what Remocn Studio scans, and the scan registers it as a Remotion composition with id
src/videos/<slug>/index.tsx:<slug>tsxexport const meta = { durationInFrames: 1356, // Planned total from the storyboard fps: 30, height: 720, width: 1280, }; export default function LaunchVideo() { return (/* the <TransitionSeries> from the storyboard */); }Scenes that grow past a screen of code go next to it in the same folder (), never beside the video folder. Optional extra exports:src/videos/<slug>/scenes/hook.tsxand a zoddefaultProps, both forwarded to the composition.schema -
Use the exact props from each component's docs page. Sequence lengths come from the storyboard, not from guesses.
-
Typecheck () and list compositions (
npx tsc --noEmit). The slug must be in the list. Fix every error before moving on. A missing declaration file for a component's dependency is fixed withnpx remotion compositions, not withnpm i -D @types/<package>.any
-
运行分镜脚本中的安装命令:。依赖项会通过传递依赖一并安装。
npx shadcn add @remocn/<a> @remocn/<b> ... -
将视频编写为。Remocn Studio 会扫描此目录结构,并将扫描到的内容注册为 id 为
src/videos/<slug>/index.tsx的 Remotion composition:<slug>tsxexport const meta = { durationInFrames: 1356, // Planned total from the storyboard fps: 30, height: 720, width: 1280, }; export default function LaunchVideo() { return (/* the <TransitionSeries> from the storyboard */); }如果某个场景的代码超过一屏,将它放在同一目录下的相邻位置(),不要放在视频目录旁。可选的其他导出项包括:src/videos/<slug>/scenes/hook.tsx和 zoddefaultProps,二者都会转发给 composition。schema -
对每个组件,使用其文档页面中的准确 props。序列长度应来自分镜脚本,而不是凭猜测确定。
-
执行类型检查()并列出 composition(
npx tsc --noEmit)。slug 必须出现在列表中。继续之前修复所有错误。如果组件的依赖缺少声明文件,应使用npx remotion compositions修复,不要使用npm i -D @types/<package>。any
5. Check the render
5. 检查渲染结果
The agent that writes the code never sees the frames, so look at them.
- If the agent is available, hand it the composition id, the storyboard and the project path. Apply the fixes it returns, then ask it to check again. Stop after two review rounds and tell the user what is still open, if anything.
remocn:scene-reviewer - Otherwise render stills yourself at the start, the middle of the motion and the end of the hold of
each beat (), open the images, and check them against the
npx remotion still <slug> out/review/<beat>-<frame>.png --frame=<n>skill's quality bar (remocn§3).references/anatomy.md
编写代码的 agent 不会看到画面,因此要实际查看画面。
- 如果 agent 可用,将 composition id、分镜脚本和项目路径交给它。应用它返回的修复建议,然后请它再次检查。最多进行两轮审查,并告知用户仍未解决的问题(如果有)。
remocn:scene-reviewer - 否则自行渲染静帧:每个节拍动效开始时、动效中段以及保持段结束时(),打开这些图像,并按照
npx remotion still <slug> out/review/<beat>-<frame>.png --frame=<n>skill 的质量基准(remocn§3)进行检查。references/anatomy.md
6. Hand off
6. 交付
- Tell the user how to preview () and render (
npx remotion studio).npx remotion render <slug> out/<slug>.mp4 - Offer "Open in Remocn Studio to tweak and export?" and, on a yes, follow the skill's Open step. Remocn Studio is a desktop app for tuning elements visually and exporting mp4; skip the offer on Windows, where it isn't available.
studio
- 告知用户预览()和渲染(
npx remotion studio)的方法。npx remotion render <slug> out/<slug>.mp4 - 主动询问:“要在 Remocn Studio 中打开以微调并导出吗?” 如果用户同意,按照 skill 的 Open 步骤操作。Remocn Studio 是一款桌面应用,可用于可视化调整元素并导出 mp4;在 Windows 上该应用不可用,因此跳过此邀请。
studio