Communitygithub.com

Remotion 設定技能

建立一個全新的 Remotion 影片專案,並與 Claude Code Agent 技能整合,涵蓋 Node 檢查、create-video 腳手架、技能安裝、資料夾慣例、Google Fonts 以及煙霧測試渲染。

Remotion 設定技能 是什麼?

這個技能會自動執行建立 Remotion 影片專案的一次性環境設定,讓後續的工作流程能夠直接透過 Claude 提示詞來進行創作。它會先檢查 Node.js 版本(需 >= 16),然後使用 create-video 腳手架建立空白專案範本,並安裝 Remotion 官方的 Agent 技能,以便 Claude Code 能夠理解專案結構。技能會建立標準化的 src/compositions 與 public/assets 資料夾,並在 Root.tsx 中註冊一個煙霧測試合成,確保端到端的渲染流程正常運作。此外,它會安裝 @remotion/google-fonts 並示範使用 loadFont() 載入字型,避免渲染時文字因缺乏字型而顯示錯誤。最後,它會執行 npx remotion render 輸出一個 MP4 檔案,並啟動 Remotion Studio 供預覽,整個過程確保開發環境可以順暢地進行影片創作。

相容平台✓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

這是互動式指令。建議選擇 Blank (Hello World) 範本——這是產品影片最簡潔的基礎。CLI 會要求輸入專案目錄和套件管理器;讓使用者選擇,然後 cd 進入新資料夾並安裝:

cd <專案名稱>
npm install

步驟 3 - 安裝 Remotion Agent 技能

讓 Claude Code 在這個儲存庫中擁有 Remotion 自己的技能上下文:

npx remotion skills add remotion

這會將 Remotion 的 agent-skill 檔案放入專案中。如果已安裝的 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 Fonts 有第一等支援,讓文字能夠確定性地渲染。安裝並載入一次:

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 agent 技能、已接線的 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() 阻塞,文字可能會在渲染機器上以替代字型渲染。
  • 不要為產品影片選擇功能豐富的範本;Blank 範本避免了使用者在事後必須刪除的示範程式碼。

品質標準

  • 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.

相關技能