Communitygithub.com

Remotion Compose

自然言語のビデオブリーフから、すぐにプレビュー可能なRemotionコンポジション(React/TypeScript)を生成します。期間、シーン、ブランドカラー、アスペクト比、実際のコピーを抽出し、フレーム予算を計画し、useCurrentFrame、interpolate、spring、AbsoluteFill、Sequenceを使ったデータ駆動型のコードを記述し、Root.tsxに登録します。

Remotion Compose とは?

このスキルは、ユーザーが自然言語でビデオの概要を説明するだけで、Remotion(Reactベースの動画フレームワーク)用の完全なコンポジションを生成します。ユーザーは、例えば「20秒の製品デモビデオを作って」「機能のウォークスルーをアニメーション化して」「このマーケティングクリップのRemotionコードを書いて」といった指示を出すだけで、その内容を解析し、各シーンの構成、ブランドカラー、アスペクト比、実際のコピーを抽出します。そして、各シーンを個別のReactコンポーネントとして実装し、`<Sequence>`を使ってタイムライン上に配置、全体を`Root.tsx`に登録します。生成されたコードは、Studioですぐにスクラブプレビュー可能で、`useCurrentFrame()`をベースにした純粋関数型アニメーションを採用しているため、前後どちらにスクラブしても同一の結果が得られます。このスキルは、コードを書く工程を自動化するためのもので、最終的なMP4のレンダリングや、プロジェクトの初期セットアップは担当しません。それらはそれぞれ別のツール(remotion-render、remotion-setup)の役割です。

対応~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/SkillMedev/skills/tree/HEAD/skills/remotion-compose

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Remotion Compose は何をしますか?

あなたは、自然言語のブリーフを完全で、すぐにプレビュー可能なRemotionコンポジションに変換します - フレーム駆動アニメーションを備えた本物のReact/TypeScriptコードです。出力はsrc/compositions/ディレクトリにある.tsxファイルで、src/Root.tsxに登録され、ユーザーがStudioですぐにスクラブしたり、remotion-renderに渡したりできるようになります。

製品デモ、ウォークスルー、機能紹介、マーケティングアニメーションのための、作成、生成、アニメーション化、または「ビデオコードを書く」リクエストがあった場合にトリガーされます。これには「Xを示す20秒のビデオを作って」という指示も含まれます。

ステップ1 - ブリーフを抽出する

以下の情報が揃うまでコーディングを開始しないでください。これらは一度にまとめて質問し、明らかなギャップは立ち止まる代わりに妥当なデフォルト値で埋めてください。

  1. 秒単位の長さ、およびfps(デフォルトは30。製品やマーケティングビデオの標準で、60fpsの半分のレンダリングコストです。60fpsは、30fpsでは明らかにカクつくような、細かいカーソルの動きやスクロールUIをアニメーションさせる場合のみ使用します)。
  2. シーン - 何が、どの順序で起こるか。「アプリのデモ」よりも「ロゴ、次に3つの機能、最後にCTA」といったビートリストを押し出してください。
  3. ブランド - プライマリ/アクセント/背景の16進数カラー、およびフォント(@remotion/google-fontsのファミリー名)。
  4. アスペクト比 / プラットフォーム - 16:9 横長(1920×1080)、ソーシャル向け9:16縦長(1080×1920)、または1:1正方形(1080×1080)。
  5. コピー - 実際の見出し/機能名/CTAテキスト。製品の主張をでっち上げることは決してせず、実際の言葉を尋ねてください。

秒数は常にフレームに変換します: durationInFrames = seconds * fps。 典型的な合計時間: ソーシャル/製品デモは15~60秒、広告カットは6~15秒。

ステップ2 - シーンプランを構築する

ビデオごとに1つの**<Composition>**、シーンごとに1つのコンポーネントを、<Sequence>でタイムライン上に連結します。コードを書く前にフレーム予算をレイアウトしてください。

合計: 20秒 @ 30fps = 600 フレーム
  イントロ (ロゴ)       フレーム   0-90    (Sequence from=0   durationInFrames=90)
  機能 1               フレーム  90-240   (Sequence from=90  durationInFrames=150)
  機能 2               フレーム 240-390   (Sequence from=240 durationInFrames=150)
  機能 3               フレーム 390-540   (Sequence from=390 durationInFrames=150)
  CTA アウトロ         フレーム 540-600   (Sequence from=540 durationInFrames=60)

予算を立てる際のペーシングの基準:

  • テキストを含むビートは、エンターアニメーションとホールドを合わせて少なくとも2秒(30fpsで60フレーム)与えてください。見出しは、読みやすくするために1単語あたり約150~200ミリ秒のホールドが必要です。6単語の見出しは、着地後に約1秒のホールドが必要です。
  • エンターアニメーション: 10~20フレーム。クロスフェードとイグジット: 12~15フレーム。これより長いと鈍く、短いとグリッチのように見えます。
  • 意図的なフラッシュカットでない限り、約45フレームより短いシーンは避けてください。

<Sequence from={F}>は、子要素のローカルクロックをシフトするため、そのコンポーネント内部ではuseCurrentFrame()が0から始まります。各シーンは、フレーム0から始まるかのようにアニメーションさせてください。

ステップ3 - コアAPIリファレンス

  • useCurrentFrame() - 現在のフレーム(時計)。すべてのアニメーションはこの関数として表現されます。
  • useVideoConfig() - { fps, width, height, durationInFrames }。
  • interpolate(frame, [inFrames], [outValues], opts) - 線形マッピング。エンター/イグジットでは、値が範囲を超えないように、常に{ extrapolateLeft: "clamp", extrapolateRight: "clamp" }を渡してください。
  • spring({ frame, fps, config }) - 物理ベースの0→1(わずかにオーバーシュート)。生き生きとした感じを出すべきもの(ポップ、スライド、スケールイン)に使用します。
  • AbsoluteFill - 全フレームの絶対配置のdiv。すべてのシーンのベースレイヤーです。
  • Sequence - 子要素の時間をシフトし、時間範囲を制限します(シーンスケジューラー)。
  • Series / Series.Sequence - fromオフセットを手動で計算せずに、シーンを連続して配置できます。
  • Img、staticFile - ステップ6を参照。

ステップ4 - spring() vs interpolate()

spring()を使うべき時…interpolate()を使うべき時…
動きが物理的に感じられるべき場合 - ポップ、バウンス、スケールイン、スライドイン正確で線形な制御が必要な場合
自然な落ち着き/オーバーシュートが欲しい場合フェード(opacity 0→1)、色の変化、プログレスバー、フレーム単位のタイミングが必要なもの
カード、ロゴ、バッジのエントランスオーバーシュートがおかしく見えるクロスフェードやイグジット

パターン - トランスフォームはspringで、opacityはinterpolateで駆動します:

const { fps } = useVideoConfig();
const frame = useCurrentFrame();
const pop = spring({ frame, fps, config: { damping: 200 } });   // 0 → 1, lively
const opacity = interpolate(frame, [0, 15], [0, 1], { extrapolateRight: "clamp" });
const scale = interpolate(pop, [0, 1], [0.8, 1]);

damping: 200は実用的な設定です - 素早く落ち着き、かろうじてオーバーシュートします。ダンピングを低くすると(約10~20)バウンスが目立ちます。バウンスが目的の場合のみ使用してください。

ステップ5 - 標準的な製品デモ構造

ブリーフが特に指定しない限り、この形をエンコードしてください: ロゴ/ブランドイントロ → N個の機能紹介 → CTAアウトロ。 バリエーションを自由に作れるように、データ駆動型(ステップ6)にしてください。

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

const { fontFamily } = loadFont();

export type Feature = { title: string; body: string };
export type ProductDemoProps = {
  brand: string;
  colors: { bg: string; fg: string; accent: string };
  logoText: string;
  features: Feature[];
  cta: string;
};

const Intro: React.FC<{ text: string; colors: ProductDemoProps["colors"] }> = ({ text, colors }) => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();
  const s = spring({ frame, fps, config: { damping: 200 } });
  const scale = interpolate(s, [0, 1], [0.7, 1]);
  const opacity = interpolate(frame, [0, 12], [0, 1], { extrapolateRight: "clamp" });
  return (
    <AbsoluteFill style={{ backgroundColor: colors.bg, justifyContent: "center", alignItems: "center" }}>
      <h1 style={{ fontFamily, fontSize: 120, color: colors.fg, transform: `scale(${scale})`, opacity }}>
        {text}
      </h1>
    </AbsoluteFill>
  );
};

const FeatureCallout: React.FC<{ feature: Feature; colors: ProductDemoProps["colors"] }> = ({ feature, colors }) => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();
  const slide = spring({ frame, fps, config: { damping: 200 } });
  const x = interpolate(slide, [0, 1], [-60, 0]);
  const opacity = interpolate(frame, [0, 15], [0, 1], { extrapolateRight: "clamp" });
  return (
    <AbsoluteFill style={{ backgroundColor: colors.bg, justifyContent: "center", paddingLeft: 160 }}>
      <div style={{ transform: `translateX(${x}px)`, opacity }}>
        <div style={{ fontFamily, fontSize: 32, color: colors.accent, fontWeight: 700, letterSpacing: 2 }}>
          {feature.title.toUpperCase()}
        </div>
        <div style={{ fontFamily, fontSize: 64, color: colors.fg, maxWidth: 1100, marginTop: 16 }}>
          {feature.body}
        </div>
      </div>
    </AbsoluteFill>
  );
};

const Outro: React.FC<{ cta: string; colors: ProductDemoProps["colors"] }> = ({ cta, colors }) => {
  const frame = useCurrentFrame();
  const opacity = interpolate(frame, [0, 18], [0, 1], { extrapolateRight: "clamp" });
  return (
    <AbsoluteFill style={{ backgroundColor: colors.accent, justifyContent: "center", alignItems: "center" }}>
      <h2 style={{ fontFamily, fontSize: 84, color: colors.bg, opacity }}>{cta}</h2>
    </AbsoluteFill>
  );
};

export const ProductDemo: React.FC<ProductDemoProps> = ({ colors, logoText, features, cta }) => {
  const intro = 90;
  const per = 150;
  const outro = 60;
  return (
    <AbsoluteFill>
      <Sequence durationInFrames={intro}>
        <Intro text={logoText} colors={colors} />
      </Sequence>
      {features.map((f, i) => (
        <Sequence key={i} from={intro + i * per} durationInFrames={per}>
          <FeatureCallout feature={f} colors={colors} />
        </Sequence>
      ))}
      <Sequence from={intro + features.length * per} durationInFrames={outro}>
        <Outro cta={cta} colors={colors} />
      </Sequence>
    </AbsoluteFill>
  );
};

src/Root.tsxに登録し、同じ数値からdurationInFramesを計算し、defaultPropsを提供します:

<Composition
  id="ProductDemo"
  component={ProductDemo}
  durationInFrames={90 + 3 * 150 + 60}
  fps={30}
  width={1920}
  height={1080}
  defaultProps={{
    brand: "Acme",
    colors: { bg: "#0B0B0F", fg: "#FFFFFF", accent: "#6C5CE7" },
    logoText: "Acme",
    features: [
      { title: "Fast", body: "Ship in seconds, not sprints." },
      { title: "Simple", body: "One prompt, one video." },
      { title: "Yours", body: "Your brand, your copy." },
    ],
    cta: "Start free →",
  }}
/>

縦型/ソーシャル用の場合は、width={1080} height={1920}に設定します。正方形の場合は1080×1080に設定します。コンポーネントは同一のままにします - キャンバスのみが変更されます。

ステップ6 - データ駆動型プロップと静的アセット

上記のコンポジションは完全にデータ駆動型です。すべての単語と色がプロップとして提供されています。これがポイントです - バリエーション(新しいコピー、新しいパレット、ローカライズされたテキスト)は再プロンプト不要で、異なるプロップを渡すだけで済みます(remotion-renderはバッチ処理用にJSONファイルからこれを行います)。

静的アセット(ロゴ、スクリーンショット、オーディオ)はpublic/assets/に配置し、staticFile()で参照します - インポートや生のパスは使用しません:

import { Img, staticFile } from "remotion";
<Img src={staticFile("assets/logo.png")} />

ステップ7 - 出力

完成したファイルをsrc/compositions/<VideoName>.tsxに保存し、src/Root.tsxに登録し、ユーザーにnpx remotion studio(http://localhost:3000)でプレビューするよう伝えます。そして、次のように引き継ぎます: 「Studioでスクラブしてみてください。変更点があれば教えてください - 速すぎる、色が違う、コピーが異なる - 私が編集して再レンダリング(remotion-render)します。」

やってはいけないこと

  • CSSトランジション/アニメーションやsetTimeout/setIntervalでアニメーションさせないでください。Remotionはフレームを独立して並行にレンダリングします。useCurrentFrame()から派生していないものは、ブラウザプレビューでは問題なく見えても、最終レンダリングでは見えないか不整合になります。
  • 散在/パーティクル効果にMath.random()を使用しないでください。レンダリングワーカーごとに異なる値が生成され、フレームが一致しなくなります。決定論的な擬似乱数にはRemotionのrandom(seed)を使用してください。
  • delayRender() / continueRender()なしでデータをフェッチしたり、非同期処理を待たないでください。レンダラーはデータが到着する前にフレームをキャプチャしてしまいます。
  • シーンコンポーネント内でfps、width、heightをハードコードしないでください。useVideoConfig()から読み取ることで、30↔60fpsや横横↔縦の切り替えがすべてのタイミングとレイアウトを壊さないようにします。
  • エンター/イグジットの補間でextrapolateLeft/Right: "clamp"を省略しないでください。範囲終了後にopacityが1を超えたり、要素がキャンバス外にドリフトしたりします。
  • 見出し、機能の主張、CTAをでっち上げないでください。ユーザーの実際のコピーを使用し、ない場合はそれを尋ねてください。

品質基準

  • すべてのアニメーション値はuseCurrentFrame()(とプロップ)の純粋関数であること。Studioで後方にスクラブしても、前方に再生した場合と同一に見える必要があります。
  • プラン内のフレーム予算がRoot.tsxのdurationInFramesと正確に一致し、どのテキストビートも読み取り可能な最小値を下回るホールド時間になっていないこと。
  • すべてのコピーと色は、defaultPropsが指定された型付きプロップを介して渡されること。シーンコンポーネント内にリテラルが埋め込まれていないこと。
  • アセットはstaticFile()でロードされ、ファイルはクリーンに登録され、Studioでコンソールエラーなしにプレビューできること。

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

Scaffolds a new Remotion video project wired for Claude Code Agent Skills - Node check, create-video scaffold, skills install, folder conventions, Google Fonts, and a smoke-test render. Use whenever someone wants to start making videos with Remotion and Claude, even just "make product videos with Claude.

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.

関連スキル