Communitygithub.com

Remotion 项目脚手架

为 Claude Code 搭建全新的 Remotion 视频项目:Node 检查、create-video 脚手架、安装技能、建立文件夹规范、加载 Google 字体并进行冒烟测试渲染。当用户想要用 Remotion 和 Claude 制作视频时(哪怕只是说“用 Claude 做产品视频”),请立即执行此技能。

Remotion 项目脚手架 是什么?

该技能自动化了在 Claude Code 环境中初始化一个可工作的 Remotion 视频项目所需的一切一次性设置步骤。它首先验证 Node.js 版本(需要 >= 16),然后通过 `npx create-video@latest` 创建一个新的 Remotion 项目,并推荐简洁的空白模板。接下来,该技能安装必要的 Remotion 代理技能文件,并强制建立标准文件夹结构(`src/compositions/` 用于视频组件,`public/assets/` 用于静态资源),确保后续的“remotion-compose”和“remotion-render”技能能够无缝协作。为了确保渲染一致性,它通过 `@remotion/google-fonts` 使用 `loadFont()` 加载 Google 字体,从而防止在字体渲染前出现文本闪烁。关键的验证步骤是冒烟测试:它会生成一个简单的“HelloWorld”合成,并通过 `npx remotion render` 将其渲染为 MP4 文件,从而证明整个 Chromium 渲染管线能够正常工作。最后,它启动 Remotion Studio 进行交互式预览。该技能支持开发者在本地机器上使用,作为他们与 Claude 合作创建产品演示视频或任何自定义视频内容工作流程的第一步。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SkillMedev/skills/tree/HEAD/skills/remotion-setup

在你喜欢的 AI 中提问

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

文档

Remotion 搭建

你将搭建一个全新的 Remotion 项目并完成配置,使后续工作流程变成“只需向 Claude 提需求”。这是一次性的环境搭建工作。每个项目执行一次即可;之后 remotion-compose 和 remotion-render 将直接进入创意循环。

请主动触发该技能。如果用户提到任何关于 用 Claude 制作视频 的内容——“搭建 Remotion”、“创建 Remotion 项目”、“我想用 Claude 制作产品视频”、“开始一个视频项目”——请运行此技能。

第 1 步 - 验证工具链

Remotion 使用无头 Chromium 渲染,因此在搭建前先检查 Node:

node --version   # 需要 >= 16;建议使用活跃的 LTS 版本

如果 Node 版本低于 16,请停止并告知用户升级(使用 nvm:nvm install --lts && nvm use --lts)。 同时确认 npx 可用(随 npm 5.2+ 一起提供)。

第 2 步 - 搭建项目

npx create-video@latest

这是一个交互式命令。推荐选择 空白(Hello World)模板——它是产品视频最简洁的基础。CLI 会要求输入项目目录和包管理器;让用户自行选择,然后 cd 到新文件夹并安装依赖:

cd <project-name>
npm install

第 3 步 - 安装 Remotion 代理技能

以便 Claude Code 在此仓库中拥有 Remotion 自身的技能上下文:

npx remotion skills add remotion

此命令会将 Remotion 的代理技能文件放入项目。如果已安装的 Remotion 版本中该命令不可用,请提示用户升级到更新的 @remotion/cli 并继续——这是一个便利功能,并非硬性依赖。

第 4 步 - 建立文件夹规范

标准化布局,以便后续技能始终知道文件存放位置:

src/
  Root.tsx              # 注册每个 <Composition>(入口注册表)
  index.ts              # registerRoot(RemotionRoot)
  compositions/         # 每个视频一个 .tsx 文件 - remotion-compose 将写入此处
public/
  assets/               # 图片、标志、音频 - 通过 staticFile() 引用

如果模板未创建这些文件夹,请手动创建:

mkdir -p src/compositions public/assets

src/Root.tsx 是注册表。每个视频都是一个在此注册的 <Composition>:

// src/Root.tsx
import { Composition } from "remotion";
import { HelloWorld } from "./compositions/HelloWorld";

export const RemotionRoot: React.FC = () => {
  return (
    <Composition
      id="HelloWorld"
      component={HelloWorld}
      durationInFrames={90}
      fps={30}
      width={1920}
      height={1080}
    />
  );
};
// src/index.ts
import { registerRoot } from "remotion";
import { RemotionRoot } from "./Root";
registerRoot(RemotionRoot);

注册时使用合理的默认值:横向产品视频使用 30 fps 和 1920x1080(纵向社交媒体使用 1080x1920),以及较短的时长——90 帧在 30 fps 下是 3 秒,而大多数产品演示视频长度在 15 到 60 秒之间(450-1800 帧)。

第 5 步 - 加载 Google 字体

Remotion 对 Google 字体有一流支持,因此文本能够确定性渲染。一次性安装并加载:

npm install @remotion/google-fonts
// 在合成文件顶部附近加载
import { loadFont } from "@remotion/google-fonts/Inter";
const { fontFamily } = loadFont();
// 然后使用:<div style={{ fontFamily }}>...</div>

loadFont() 会阻塞渲染直至字体就绪,因此屏幕上的文本永远不会闪现无样式的后备字体。选择与品牌匹配的字体——将 Inter 替换为 Poppins、Roboto 等。

第 6 步 - 冒烟测试合成

编写一个简单的合成,以证明环境能够端到端渲染:

// src/compositions/HelloWorld.tsx
import { AbsoluteFill, useCurrentFrame, interpolate } from "remotion";
import { loadFont } from "@remotion/google-fonts/Inter";

const { fontFamily } = loadFont();

export const HelloWorld: React.FC = () => {
  const frame = useCurrentFrame();
  const opacity = interpolate(frame, [0, 30], [0, 1], {
    extrapolateRight: "clamp",
  });
  return (
    <AbsoluteFill style={{ backgroundColor: "#0B0B0F", justifyContent: "center", alignItems: "center" }}>
      <h1 style={{ fontFamily, color: "white", fontSize: 90, opacity }}>
        成功了。
      </h1>
    </AbsoluteFill>
  );
};

确保它在 src/Root.tsx 中注册(第 4 步),然后渲染它:

npx remotion render src/index.ts HelloWorld out/smoke-test.mp4

首次渲染会下载无头 Chromium(几百 MB——在正常网络下预计等待几分钟);之后,这个 90 帧的冒烟测试应在不到一分钟内渲染完成。如果 out/smoke-test.mp4 能播放一个淡入的标题,则环境正常。如果渲染失败,几乎总是因为: (a) Chromium 下载/权限问题,(b) 合成未在 Root.tsx 中注册,或 (c) 第 1 步中的 Node 版本问题。

第 7 步 - 启动 Remotion Studio 进行预览

如需交互式预览(拖拽时间线、编辑后热重载):

npx remotion studio

这将在 http://localhost:3000 提供 Studio 服务。create-video 模板也将 npm run dev 指向相同的命令。在迭代过程中保持 Studio 运行——对合成文件的编辑会即时热重载。

交付物

用户最终将获得一个可工作的 Remotion 项目:搭建好的仓库,包含 src/compositions/ + public/assets/ 布局、已安装的 Remotion 代理技能、已配置的 Google 字体、已注册的冒烟测试合成、实际可播放的 out/smoke-test.mp4 渲染文件,以及正在运行的 Remotion Studio 用于预览。在冒烟测试 MP4 文件存在并播放之前,不能认为“搭建完成”。

禁止事项

  • 不要跳过 Node 检查就直接搭建——低于 16 的 Node 会在 Chromium 渲染深处出现令人困惑的错误,而不会在安装时提示。
  • 不要在没有渲染冒烟测试的情况下就宣布搭建完成;一个能编译但从未生成过 MP4 的项目无法证明 Chromium 管线正常工作。
  • 不要将合成或资源放在临时位置——后续技能(remotion-compose、remotion-render)依赖于 src/compositions/ 和 public/assets/ 存在。
  • 不要通过相对路径或 URL 引用资源;应使用来自 public/ 的 staticFile(),否则渲染在本地正常,换到其他环境就会出错。
  • 不要为屏幕上的文本使用系统字体或 CSS 导入的字体——不使用 loadFont() 阻塞,文本在渲染机器上可能以后备字体显示。
  • 不要为产品视频选择功能繁多的模板;空白模板避免了携带用户稍后必须删除的演示代码。

质量标准

  • node --version >= 16,并且在搭建之前已检查。
  • out/smoke-test.mp4 存在并播放一个淡入的标题。
  • 文件夹规范完全按照指定方式存在,并且冒烟合成已在 src/Root.tsx 中注册。
  • 文本通过 @remotion/google-fonts 的 loadFont() 渲染,而不是系统后备字体。
  • Remotion Studio 在 localhost:3000 启动,并且编辑文件后能热重载。

交接

一旦冒烟测试渲染完成并且 Studio 启动,告诉用户项目已就绪并交接:“搭建完成。请描述你想要的视频——时长、场景、品牌颜色——我将编写合成(remotion-compose),然后渲染并迭代(remotion-render)。”

Individual skills in this repo

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

SkillMedev/skills

Designs REST API surfaces - resource naming, HTTP method and status-code semantics, error shapes, pagination, and filtering - and delivers an endpoint spec a consumer can build against without asking questions. Use when someone asks "how should I name this endpoint", "what status code should this return", "should this be PUT or PATCH", "how do I paginate this list", or is reviewing an API before it ships to external consumers. Do NOT use for planning breaking-change rollouts and deprecation windows - use api-versioning-strategist instead; for GraphQL type and resolver design - use graphql-schema instead; for generating client SDKs from an existing spec - use api-client-generator instead; for designing inbound webhook endpoints - use webhook-receiver-hardener instead.

SkillMedev/skills

Produce an accurate, properly timed caption track (SRT or WebVTT) from a video's audio - transcribing or aligning to the voiceover script, timing cues to speech, and enforcing line-length and reading-speed rules so captions are readable and in sync. Use when someone says "generate captions", "make subtitles from the audio", "transcribe and caption this", "export an SRT or VTT", "the captions are out of sync", or "the subtitles flash by too fast to read". Do NOT use to burn-in, style, reframe, or position an existing caption track for a platform (9:16, brand styling, safe areas) - that is social-video-formatter; do NOT use to animate text word-by-word as a motion graphic - that is kinetic-typography; do NOT use to write the spoken script in the first place - that is narration-script.

SkillMedev/skills

Turns data and charts into a decision-driving narrative structured as headline finding, trend, implication, and recommended action - with finding-led chart titles, context for every number, annotation guidance, and honest flags on any conclusion the data cannot support. Use when someone says "turn these numbers into a story", "what's the takeaway from this data", "help me present these results to leadership", or has charts but no narrative. Do NOT use for compressing a long document into a one-pager - use executive-summary instead - or for running the analysis that produces the findings - use eda-playbook instead.

SkillMedev/skills

Use when a task needs live or historical money data - "convert USD to EUR", "current/past exchange rate", "FX rate on this date / over this range", or "current price of Bitcoin/Ethereum, market cap, 24h change". Frankfurter (ECB reference rates, no key) is the FX default; CoinGecko's free keyless tier covers crypto. Do NOT use for stock quotes or equities - no keyless stock API survives verification, say so instead of guessing; do NOT use for country economic indicators like GDP or inflation series - use government-open-data instead; if the request is a vague "I need live data", route through public-data-api-picker.

SkillMedev/skills

Builds a driver-based FP&A operating model linking business inputs to P&L, balance sheet, and cash flow outputs. Use when building an annual plan, preparing investor materials, running scenario analysis, or stress-testing the business.

SkillMedev/skills

Use when a task needs live geographic lookups - "geocode this address", "what's at these coordinates" (reverse geocoding), "lat/lon for this city", "which country/state is this ZIP or postal code in", or "country facts: capital, currency, population, flag". Nominatim (OpenStreetMap) is the geocoding default; Zippopotam for postal codes; APICountries for country facts. All keyless. Do NOT use for weather at a location - use weather-climate instead; do NOT use for country-level statistics over time (GDP, population trends) - use government-open-data instead; if the request is a vague "I need live data", route through public-data-api-picker.

SkillMedev/skills

Runs the full Getting Things Done loop - capture, clarify, organize, reflect, engage - building a trusted system of context lists, a projects list with defined next actions, and a weekly review habit. Use when someone says "I'm overwhelmed and things are slipping through the cracks", "set up GTD for me", "help me do a brain dump and organize it", or "my to-do list is a mess". Do NOT use for just running the weekly review ritual itself - use weekly-review instead - or for clearing an email backlog - use inbox-zero.

SkillMedev/skills

Processes any email backlog to zero using the 4Ds - Delete, Delegate, Defer, Do - with a mass-archive strategy for the obvious, a touch-each-email-once discipline, and a keep-it-clear system of batched processing windows, ruthless unsubscribing, filters, and a minimal folder setup. Use when someone says "I have 5,000 unread emails", "help me get to inbox zero", "email is eating my whole day", or treats their inbox as a to-do list. Do NOT use for drafting the reply emails themselves or prioritization rules for an ongoing support queue - use email-triage instead - or for protecting focus time around the email windows - use deep-work-planner instead.

SkillMedev/skills

Write landing-page copy section by section - hero, social proof, features-as-benefits, objections, CTA - leading with one promise and proving it down the page. Use when someone asks "write my landing page", "improve my hero headline", "what should the homepage say", "turn these features into benefits", or is shipping a new page for a launch or campaign. Do NOT use for testing and optimizing an existing page's conversion rate - use landing-page-cro instead; for the one-line claim itself use positioning-statement; for the full message ladder use messaging-hierarchy.

SkillMedev/skills

Improves an existing landing page's conversion rate through evidence-first CRO - audit heatmaps and recordings, write structured hypotheses, prioritize with ICE scoring, and run one-variable tests to statistical significance. Use when someone asks "why isn't my landing page converting", "audit this page before we scale spend", "which A/B test should we run first", or after a CVR drop or ahead of a paid-traffic push. Do NOT use for writing a new landing page from scratch - use landing-page-copy instead. Do NOT use for auditing the ad accounts sending the traffic - use paid-acquisition-audit instead. Do NOT use for reading the results of a finished experiment - use ab-test-analyzer instead.

SkillMedev/skills

Runs structured coaching sessions using values clarification and the GROW model, ending every session with one committed action, a deadline, and an if-then plan for the likely obstacle. Use when someone says "I feel stuck in my life", "help me figure out what I want", "hold me accountable to my goals", or "coach me through this decision". Do NOT use for building a stress toolkit - use stress-management instead - or a journaling practice - use journal-framework; for a standing goal-tracking system, use goals-accountability. Coaching, not therapy: signs of clinical distress route to a licensed professional.

SkillMedev/skills

Adapts English content for a target language and region - swapping idioms, setting the right formality register, replacing cultural references, converting dates, units, and currency - and delivers the localized text with a notes column explaining each adaptation and flagging what needs a native reviewer. Use when someone asks "localize this copy for the Japanese market", "adapt our marketing copy for the Mexican market", "make this translation sound native instead of literal", or a literal translation reads foreign, stiff, or risky. Do NOT use for auditing in-product UI text quality - use ux-writing-audit instead.

SkillMedev/skills

Turns a natural-language video brief into a complete, ready-to-preview Remotion composition - extracts duration, scenes, brand colors, aspect ratio, and real copy; plans the frame budget; and writes data-driven React/TypeScript using useCurrentFrame, interpolate, spring, AbsoluteFill, and Sequence, registered in Root.tsx. Use when someone says "build a 20-second product demo video", "animate a feature walkthrough", "write the Remotion code for this marketing clip", or wants a scene-by-scene composition they can scrub in Studio. Do NOT use for rendering, iterating, or batching the finished MP4 - use remotion-render instead - or for installing and scaffolding the project - use remotion-setup instead.

SkillMedev/skills

Classifies incident severity (SEV1-4) using impact, scope, and urgency signals and decides who to page. Use when an alert fires or a report comes in and a severity call must be made quickly.

SkillMedev/skills

Use the Skill Me catalog from inside any conversation - discover, install, and manage Claude skills through the Skill Me MCP, and load installed skills automatically each session.

SkillMedev/skills

Write one platform-native caption from a topic and brand voice, with a front-loaded hook, native length, and a single earned CTA. Use when the user gives a topic (and optionally brand voice or a described image/video) and asks for an Instagram, LinkedIn, X/Twitter, or TikTok caption. Do NOT use when the user wants a dedicated standalone LinkedIn post - use linkedin-post-writer instead; or a multi-post X thread - use tweet-thread-builder instead; or to adapt one existing piece of content into versions for several channels - use cross-platform-reformatter instead.

SkillMedev/skills

Reframe and export a finished video for social platforms - 9:16 ↔ 16:9 cropping, burned-in captions, a platform-native first frame, loop design, and per-platform specs (aspect, length, safe areas) for TikTok, Reels, Shorts, X, and LinkedIn. Use when someone says "make this vertical", "crop to 9:16", "format for TikTok/Reels/Shorts", "add captions/subtitles", "why is my video cut off on mobile", "resize for Instagram", or "export for social". Do NOT use when the question is about the storyboard or shot order before any video exists (use video-storyboard); the animation craft of how elements move (use motion-design-principles); animated word-by-word caption styling (use kinetic-typography); palette, contrast, or lighting (use motion-color-and-light); directing the product-demo content and screen choreography (use product-demo-director); or scoring, beat-syncing, or audio (use sound-and-music-sync) - this is the craft layer that decides WHAT to format for the feed, then hands a concrete spec to remotion-compo...

SkillMedev/skills

Writes and tunes PySpark jobs - join strategy and broadcast size limits, shuffle-partition sizing, skew diagnosis and salting, UDF avoidance, caching, and output file layout - with concrete size and skew thresholds. Use when someone asks "why is my Spark job slow", "should I broadcast this join", "one task takes forever while the rest finish", "my job OOMs during a join", or is writing a new PySpark ETL job. Do NOT use for Kafka topic, consumer-group, or streaming-pipeline design - use kafka-pipelines instead; do NOT use for single-machine dataframe work that fits in memory - use pandas-expert instead.

SkillMedev/skills

Builds clean, performant, accessible SwiftUI views with correct state ownership, scoped invalidation, and smooth list scrolling, and reviews existing SwiftUI code against a concrete frame-time and re-render budget. Use when someone asks "why does my SwiftUI list stutter", "should this be @State or @Observable", "my whole screen re-renders when one row changes", "how do I animate this transition", or wants a SwiftUI view built or refactored. Do NOT use for cross-platform React Native apps - use react-native-pro instead; do NOT use for Flutter widget trees - use flutter-widget-architect instead; do NOT use for Android Compose UIs - use jetpack-compose-builder instead.

相关技能