Communitygithub.com

muhammedadnank/Antigravity-Skills

Remotion(Reactで動画を作成するライブラリ)のベストプラクティスをまとめたスキルです。

Antigravity-Skills とは?

このスキルは、Remotionを用いた動画制作におけるベストプラクティスと具体的な実装パターンを提供します。RemotionはReactコンポーネントを使ってプログラムで動画を生成するライブラリであり、本スキルでは新規プロジェクトのセットアップ、アニメーションの設計、アセットの管理、シーケンス制御、メタデータの動的設定など、開発者が日常的に直面するタスクを効率的に解決するための知識が体系的にまとめられています。また、字幕、FFmpegの活用、音声可視化、3Dコンテンツ、Google Fontsの読み込み、Lottieアニメーションの埋め込み、トランジション、透明動画など、多岐にわたる応用トピックへの参照も含まれており、初心者から上級者まで幅広く活用できます。このスキルはClaude Code等のAIエージェント向けに設計されており、Remotion関連の開発依頼があった際に自動的に読み込まれ、正確で一貫性のあるアドバイスを提供します。

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

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

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

プレビュー

スキル README より

ドキュメント

使用するタイミング

このスキルは、Remotionのコードを扱う際にドメイン固有の知識を得るために使用してください。

新規プロジェクトのセットアップ

空のフォルダまたはRemotionプロジェクトが存在しないワークスペースで、以下のコマンドを使用して新しいプロジェクトを作成します。

npx create-video@latest --yes --blank --no-tailwind my-video

my-video は適切なプロジェクト名に置き換えてください。

動画の設計

useCurrentFrame() と interpolate() を使ってプロパティをアニメーションさせます。アニメーションのタイミングをカスタマイズするにはEasingを使用します。

import { useCurrentFrame, Easing } from "remotion";

export const FadeIn = () => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();

  const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
    extrapolateRight: "clamp",
    extrapolateLeft: "clamp",
    easing: Easing.bezier(0.16, 1, 0.3, 1),
  });

  return <div style={{ opacity }}>Hello World!</div>;
};

CSSトランジションやアニメーションは禁止です。正しくレンダリングされません。 Tailwindのアニメーションクラス名も禁止です。正しくレンダリングされません。

アセットはプロジェクトルートの public/ フォルダに配置してください。

public/ フォルダ内のファイルを参照するには staticFile() を使用します。

画像は <Img> コンポーネントを使って追加します。

import { Img, staticFile } from "remotion";

export const MyComposition = () => {
  return <Img src={staticFile("logo.png")} style={{ width: 100, height: 100 }} />;
};

動画は @remotion/media の <Video> コンポーネントを使って追加します。

import { Video } from "@remotion/media";
import { staticFile } from "remotion";

export const MyComposition = () => {
  return <Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />;
};

音声は @remotion/media の <Audio> コンポーネントを使って追加します。

import { Audio } from "@remotion/media";
import { staticFile } from "remotion";

export const MyComposition = () => {
  return <Audio src={staticFile("audio.mp3")} />;
};

アセットはリモートURLとして参照することもできます。

import { Video } from "@remotion/media";

export const MyComposition = () => {
  return <Video src="https://remotion.media/video.mp4" />
};

コンテンツを遅延させるには、<Sequence> でラップし from を使用します。 要素の長さを制限するには、<Sequence> の durationInFrames を使用します。 <Sequence> はデフォルトで絶対配置(absolute fill)になります。インラインコンテンツの場合は layout="none" を使用してください。

import { Sequence } from "remotion";

export const Title = () => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();

  const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
    extrapolateRight: "clamp",
    extrapolateLeft: "clamp",
    easing: Easing.bezier(0.16, 1, 0.3, 1),
  });

  return <div style={{ opacity }}>Title</div>;
};

export const Subtitle = () => {
  return <div>Subtitle</div>;
};

const Main = () => {
  const {fps} = useVideoConfig();

  return (
    <AbsoluteFill>
      <Sequence>
        <Background />
      </Sequence>
      <Sequence from={1 * fps} durationInFrames={2 * fps} layout="none">
        <Title />
      </Sequence>
      <Sequence from={2 * fps} durationInFrames={2 * fps} layout="none">
        <Subtitle />
      </Sequence>
    </AbsoluteFill>
  );
}

動画の幅、高さ、fps、長さは src/Root.tsx で定義します。

import { Composition } from "remotion";
import { MyComposition } from "./MyComposition";

export const RemotionRoot = () => {
  return (
    <Composition
      id="MyComposition"
      component={MyComposition}
      durationInFrames={100}
      fps={30}
      width={1080}
      height={1080}
    />
  );
};

メタデータは動的に計算することもできます。

import { Composition, CalculateMetadataFunction } from "remotion";
import { MyComposition, MyCompositionProps } from "./MyComposition";

const calculateMetadata: CalculateMetadataFunction<
  MyCompositionProps
> = async ({ props, abortSignal }) => {
  const data = await fetch(`https://api.example.com/video/${props.videoId}`, {
    signal: abortSignal,
  }).then((res) => res.json());

  return {
    durationInFrames: Math.ceil(data.duration * 30),
    props: {
      ...props,
      videoUrl: data.url,
    },
    width: 1080,
    height: 1080,
  };
};

export const RemotionRoot = () => {
  return (
    <Composition
      id="MyComposition"
      component={MyComposition}
      fps={30}
      width={1080}
      height={1080}
      defaultProps={{ videoId: "abc123" }}
      calculateMetadata={calculateMetadata}
    />
  );
};

プレビューの開始

Remotion Studioを起動して動画をプレビューします。

npx remotion studio

任意: 1フレームレンダリング確認

CLIで単一フレームをレンダリングして、レイアウト、色、タイミングを簡単に確認できます。 些細な編集や純粋なリファクタリング、Studioや以前のレンダリングで十分な確信がある場合はスキップしてください。

npx remotion still [composition-id] --scale=0.25 --frame=30

30fpsの場合、--frame=30 は1秒の位置を示します(--frame は0基準です)。

キャプション(字幕)

キャプションや字幕を扱う場合は、./rules/subtitles.md ファイルを読み込んで詳細を確認してください。

FFmpegの使用

動画のトリミングや無音検出など、一部の動画操作にはFFmpegを使用します。./rules/ffmpeg.md ファイルを読み込んで詳細を確認してください。

無音検出

動画や音声ファイルから無音部分を検出してトリミングする必要がある場合は、./rules/silence-detection.md ファイルを読み込んでください。

音声の可視化

音声を可視化(スペクトラムバー、波形、低音反応エフェクトなど)する必要がある場合は、./rules/audio-visualization.md ファイルを読み込んで詳細を確認してください。

効果音

効果音を使用する必要がある場合は、./rules/sfx.md ファイルを読み込んで詳細を確認してください。

3Dコンテンツ

Three.jsとReact Three Fiberを使用したRemotionの3Dコンテンツについては、rules/3d.md を参照してください。

高度な音声

トリミング、音量、速度、ピッチなどの高度な音声機能については、rules/audio.md を参照してください。

動的な長さ、サイズ、データ

コンポジションの長さ、サイズ、プロパティを動的に設定する方法については、rules/calculate-metadata.md を参照してください。

高度なコンポジション

スチル、フォルダ、デフォルトプロパティの定義方法、およびコンポジションのネスト方法については、rules/compositions.md を参照してください。

Google Fonts

Remotionでフォントを読み込む推奨方法です。Google Fontsの読み込み方法については、rules/google-fonts.md を参照してください。

ローカルフォント

ローカルフォントの読み込み方法については、rules/local-fonts.md を参照してください。

音声の長さを取得する

Mediabunnyを使用して音声ファイルの長さ(秒)を取得する方法については、rules/get-audio-duration.md を参照してください。

動画のサイズを取得する

Mediabunnyを使用して動画ファイルの幅と高さを取得する方法については、rules/get-video-dimensions.md を参照してください。

動画の長さを取得する

Mediabunnyを使用して動画ファイルの長さ(秒)を取得する方法については、rules/get-video-duration.md を参照してください。

GIF

Remotionのタイムラインに同期したGIFを表示する方法については、rules/gifs.md を参照してください。

高度な画像

画像のサイズ設定と配置、動的な画像パス、画像サイズの取得については、rules/images.md を参照してください。

ライトリーク

@remotion/light-leaks を使用したライトリークオーバーレイエフェクトについては、rules/light-leaks.md を参照してください。

Lottieアニメーション

RemotionにLottieアニメーションを埋め込む方法については、rules/lottie.md を参照してください。

キャンバス内のHTML

2DまたはWebGLエフェクトを適用するために、HTMLを <canvas> にレンダリングする必要がある場合は、rules/html-in-canvas.md を参照してください(<HtmlInCanvas> を使用)。

DOMノードの測定

RemotionでDOM要素のサイズを測定する方法については、rules/measuring-dom-nodes.md を参照してください。

テキストの測定

テキストのサイズ測定、コンテナへのテキストフィット、オーバーフローの確認については、rules/measuring-text.md を参照してください。

高度なシーケンス

遅延、トリミング、アイテムの長さ制限など、より高度なシーケンスパターンについては、rules/sequencing.md を参照してください。

TailwindCSS

RemotionでTailwindCSSを使用する方法については、rules/tailwind.md を参照してください。

テキストアニメーション

タイポグラフィとテキストアニメーションパターンについては、rules/text-animations.md を参照してください。

高度なタイミング

interpolate とベジェイージング、スプリングを使用した高度なタイミングについては、rules/timing.md を参照してください。

トランジション

シーントランジションパターンについては、rules/transitions.md を参照してください。

透明動画

透明度のある動画をレンダリングする方法については、rules/transparent-videos.md を参照してください。

トリミング

アニメーションの先頭や末尾をカットするトリミングパターンについては、rules/trimming.md を参照してください。

高度な動画

動画の埋め込みに関する高度な知識(トリミング、音量、速度、ループ、ピッチ)については、rules/videos.md を参照してください。

パラメータ化された動画

Zodスキーマを追加してコンポジションをパラメータ化可能にする方法については、rules/parameters.md を参照してください。

地図

簡易的な地図で少しのフライオーバーが必要な場合は、静的マップ画像の利用を検討してください。 複雑なアニメーションルートやフライオーバーを伴う地図の場合は、マップルールを読み込んでください: rules/maplibre.md

ナレーション

ElevenLabs TTSを使用してAI生成のナレーションをRemotionコンポジションに追加する方法については、rules/voiceover.md を参照してください。

Individual skills in this repo

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

muhammedadnank/Antigravity-Skills

Build a premium cinematic landing page with mouse-scrub video hero and brand-driven narrative-arc sections. Use whenever the user provides a hero video plus a product / subject / brand and wants a landing page, promo site, product showcase, marketing page, or storytelling site. Works for any language and any subject. The signature effect is mouse-driven video scrubbing \u2014 the hero video lives across the entire page as a fixed backdrop, and moving the mouse left-right scrubs the video timeline so the subject responds to the cursor. Below the hero, 4-5 fully-opaque sections each carry their own brand identity (color, typography emphasis, layout pattern) and walk the viewer through a narrative arc (e.g. longing -> joy -> nostalgia -> contemplation -> action). Do NOT use for parallax frame-scrub landings where the page itself doesn't scroll (use parallax-landing-page instead) or for video editing / captioning workflows (use video-edit).

muhammedadnank/Antigravity-Skills

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

muhammedadnank/Antigravity-Skills

Build a scroll-driven cinematic landing page from a short video. The user provides a 5–15 second video (often AI-generated); this skill extracts every frame at HD JPEG quality, then produces a single-hero HTML page where the user's scroll gesture scrubs the frames in place (the page itself never scrolls) and 5 dramatic text overlays crossfade in/out — Google Anton headlines, Caveat handwritten accents, locked body, virtual scroll. Use this skill whenever the user wants to "turn this video into a landing page", "make a scroll-scrub landing page", "build a parallax hero from this clip", "add a new landing page to the parasites showcase", "do the same as github/lion/hope for this new video", or any variant that pairs a short clip with dramatic scroll-triggered storytelling. Trigger even if the user only says "use my video for a landing page" — that is this skill.

muhammedadnank/Antigravity-Skills

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

muhammedadnank/Antigravity-Skills

Turn any video into a cinematic scroll-driven landing page — Apple-style hero where scrolling progresses the visible frame through the video. Use when the user provides a video file and asks for "a landing page from this video", "scroll-frame website", "Apple-style scroll site", "hero that scrubs the video", "like the GitHub Copilot landing", or any equivalent. Extracts N evenly-spaced frames via ffmpeg, builds a self-contained HTML page with a sticky hero + JS scroll listener that swaps the visible frame as you scroll, plus headline, sections and CTA below. For YUV.AI projects, applies the yuv-design-system skill in Neon mode (pink/cyan/white, default for YUV.AI web) — Decks (purple/yellow) is reserved for slides only. For generic / non-YUV.AI projects, picks an appropriate palette per the source video. Output is one folder with `index.html` and a `frames/` directory — drop on any static host.

関連スキル