Communitygithub.com

TerminalSkills/skills

Création programmatique de vidéos avec React en utilisant Remotion. À utiliser quand un utilisateur demande de créer des vidéos avec du code, générer des vidéos personnalisées, construire des visualisations de données animées, ajouter des sous-titres style TikTok, rendre des vidéos par programmation ou automatiser la production vidéo. Prend en charge le rendu en ligne de commande, AWS Lambda et le déploiement Google Cloud Run.

Qu'est-ce que skills ?

Remotion Video Toolkit permet de créer des vidéos programmatiquement en combinant React et Remotion. Il offre des templates vidéo réutilisables sous forme de composants React, que vous pouvez rendre en MP4/WebM via CLI ou sur le cloud (AWS Lambda, Google Cloud Run). L'outil est idéal pour automatiser la production de contenu pour les réseaux sociaux, créer des visualisations de données animées, des vidéos personnalisées à grande échelle, ou ajouter des sous-titres animés style TikTok. Il prend en charge des tâches comme la configuration d'un projet, la création de compositions, l'animation de données, le rendu par lots et le déploiement cloud. Les principes clés incluent l'utilisation de `useCurrentFrame()` et `interpolate()` pour les animations, le passage de propriétés pour le rendu par lots, et l'utilisation de `<Sequence>` pour organiser la chronologie. Les exemples concrets montrent comment générer des vidéos de bienvenue personnalisées, des tableaux de bord animés, ou du contenu social avec sous-titres.

Compatible avec✓Claude Code✓Codex CLI✓Cursor✓Gemini CLI
npx skills add https://github.com/TerminalSkills/skills/tree/HEAD/skills/remotion-video-toolkit

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Kit d'Outils Vidéo Remotion

Aperçu

Créez des vidéos programmatiquement en utilisant React et Remotion. Construisez des templates vidéo réutilisables en tant que composants React, rendez-les au format MP4/WebM via CLI ou infrastructure cloud, et générez des vidéos personnalisées à grande échelle. Idéal pour le contenu automatisé des réseaux sociaux, les visualisations de données animées et les pipelines de production vidéo dynamiques.

Instructions

Lorsqu'un utilisateur demande de créer une vidéo programmatique, déterminez la tâche :

Tâche A : Configurer un projet Remotion

# Créez un nouveau projet Remotion
npx create-video@latest my-video
cd my-video
npm start  # Ouvre le Studio Remotion à http://localhost:3000

Structure du projet :

my-video/
  src/
    Root.tsx          # Enregistrer toutes les compositions
    MyComposition.tsx # Votre composant vidéo
  remotion.config.ts  # Paramètres de rendu

Tâche B : Créer une composition vidéo

Chaque vidéo Remotion est un composant React qui utilise useCurrentFrame() et useVideoConfig() :

import { AbsoluteFill, useCurrentFrame, useVideoConfig, interpolate, spring } from "remotion";

interface MyVideoProps {
  title: string;
  subtitle: string;
  bgColor: string;
}

export const MyVideo: React.FC<MyVideoProps> = ({ title, subtitle, bgColor }) => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();

  // Animer le titre qui glisse vers l'intérieur
  const titleY = spring({ frame, fps, from: -100, to: 0, durationInFrames: 30 });

  // Fondu du sous-titre après 20 images
  const subtitleOpacity = interpolate(frame, [20, 40], [0, 1], {
    extrapolateRight: "clamp",
  });

  return (
    <AbsoluteFill style={{ backgroundColor: bgColor, justifyContent: "center", alignItems: "center" }}>
      <h1 style={{ fontSize: 80, color: "white", transform: `translateY(${titleY}px)` }}>
        {title}
      </h1>
      <p style={{ fontSize: 36, color: "rgba(255,255,255,0.8)", opacity: subtitleOpacity }}>
        {subtitle}
      </p>
    </AbsoluteFill>
  );
};

Enregistrez la composition dans Root.tsx :

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

export const RemotionRoot: React.FC = () => {
  return (
    <Composition
      id="MyVideo"
      component={MyVideo}
      durationInFrames={150}
      fps={30}
      width={1920}
      height={1080}
      defaultProps={{ title: "Hello World", subtitle: "Made with Remotion", bgColor: "#1a1a2e" }}
    />
  );
};

Tâche C : Ajouter des sous-titres animés style TikTok

import { AbsoluteFill, useCurrentFrame, Sequence } from "remotion";

interface CaptionWord {
  text: string;
  startFrame: number;
  durationInFrames: number;
}

const captions: CaptionWord[] = [
  { text: "This", startFrame: 0, durationInFrames: 15 },
  { text: "is", startFrame: 15, durationInFrames: 10 },
  { text: "amazing!", startFrame: 25, durationInFrames: 20 },
];

export const CaptionOverlay: React.FC = () => {
  const frame = useCurrentFrame();

  const activeWord = captions.find(
    (c) => frame >= c.startFrame && frame < c.startFrame + c.durationInFrames
  );

  return (
    <AbsoluteFill style={{ justifyContent: "flex-end", alignItems: "center", paddingBottom: 120 }}>
      {activeWord && (
        <div style={{
          fontSize: 64,
          fontWeight: "bold",
          color: "white",
          textShadow: "2px 2px 8px rgba(0,0,0,0.8)",
          backgroundColor: "rgba(0,0,0,0.5)",
          padding: "8px 24px",
          borderRadius: 12,
        }}>
          {activeWord.text}
        </div>
      )}
    </AbsoluteFill>
  );
};

Tâche D : Rendre les vidéos

# Rendu local via CLI
npx remotion render MyVideo out/video.mp4

# Rendu avec des propriétés personnalisées
npx remotion render MyVideo out/video.mp4 --props='{"title":"Custom Title"}'

# Rendu d'une image fixe (pour les vignettes)
 npx remotion still MyVideo out/thumbnail.png --frame=45

# Rendu avec un codec et une qualité spécifiques
npx remotion render MyVideo out/video.mp4 --codec=h264 --crf=18

Pour le rendu par lots à grande échelle :

# Rendu sur AWS Lambda
npx remotion lambda render MyVideo --props='{"title":"Video 1"}'

# Rendu sur Google Cloud Run
npx remotion cloudrun render MyVideo --props='{"title":"Video 1"}'

Tâche E : Visualisations de données animées

import { AbsoluteFill, useCurrentFrame, interpolate } from "remotion";

interface DataPoint { label: string; value: number; color: string; }

export const BarChart: React.FC<{ data: DataPoint[] }> = ({ data }) => {
  const frame = useCurrentFrame();
  const maxVal = Math.max(...data.map((d) => d.value));

  return (
    <AbsoluteFill style={{ padding: 80, justifyContent: "flex-end", backgroundColor: "#0f0f23" }}>
      <div style={{ display: "flex", alignItems: "flex-end", gap: 20, height: "70%" }}>
        {data.map((point, i) => {
          const height = interpolate(frame, [i * 10, i * 10 + 30], [0, (point.value / maxVal) * 100], {
            extrapolateLeft: "clamp",
            extrapolateRight: "clamp",
          });
          return (
            <div key={i} style={{ flex: 1, textAlign: "center" }}>
              <div style={{
                height: `${height}%`,
                backgroundColor: point.color,
                borderRadius: "8px 8px 0 0",
                transition: "height 0.3s",
              }} />
              <p style={{ color: "white", marginTop: 12, fontSize: 24 }}>{point.label}</p>
            </div>
          );
        })}
      </div>
    </AbsoluteFill>
  );
};

Exemples

Exemple 1 : Vidéo de bienvenue personnalisée

Demande de l'utilisateur : "Génère une vidéo de bienvenue pour chaque nouvel utilisateur avec son nom"

# Générer des vidéos à partir d'une liste JSON d'utilisateurs
for user in $(jq -r '.[] | @base64' users.json); do
  name=$(echo "$user" | base64 -d | jq -r '.name')
  npx remotion render WelcomeVideo "out/welcome_${name}.mp4" \
    --props="{\"userName\":\"${name}\"}"
done

Exemple 2 : Tableau de bord des ventes animé

Demande de l'utilisateur : "Crée une vidéo montrant nos indicateurs trimestriels qui s'animent"

Construisez une composition avec le composant BarChart et les données trimestrielles, rendez-la avec :

npx remotion render SalesDashboard out/q4_report.mp4 \
  --props='{"quarter":"Q4","revenue":1250000,"growth":12.5}'

Exemple 3 : Contenu pour les réseaux sociaux avec sous-titres

Demande de l'utilisateur : "Ajoute des sous-titres animés à une vidéo pour TikTok"

Combinez le CaptionOverlay avec une source OffthreadVideo :

import { OffthreadVideo } from "remotion";
<AbsoluteFill>
  <OffthreadVideo src="https://example.com/clip.mp4" />
  <CaptionOverlay />
</AbsoluteFill>

Directives

  • Utilisez useCurrentFrame() et interpolate() pour toutes les animations ; évitez les transitions CSS.
  • Gardez les compositions pures : passez toutes les données dynamiques en tant que props pour faciliter le rendu par lots.
  • Utilisez <Sequence> pour organiser les sections de votre chronologie vidéo.
  • Préférez <OffthreadVideo> à <Video> pour de meilleures performances avec les sources vidéo.
  • Réglez crf (Constant Rate Factor) entre 16 et 20 pour un bon rapport qualité/taille.
  • Pour le rendu Lambda, gardez les compositions en dessous de 120 secondes pour éviter les problèmes de délai.
  • Testez dans Remotion Studio avant de rendre pour détecter les problèmes de mise en page tôt.
  • Utilisez staticFile() pour référencer les actifs dans le dossier public/.

Individual skills in this repo

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

TerminalSkills/skills

>- Run GitHub Actions locally with act. Use when a user asks to test GitHub Actions workflows locally, debug CI pipelines without pushing, or run workflows offline.

TerminalSkills/skills

>- You are an expert in AG2 (formerly AutoGen), the open-source multi-agent conversation framework. You help developers build systems where multiple AI agents collaborate through structured conversations — with tool use, human-in-the-loop, code execution, group chat orchestration, and nested conversations — for complex tasks like software development, research, and data analysis.

TerminalSkills/skills

>- Generate short-form videos with AI — script writing, text-to-speech narration, stock footage selection, subtitle generation, and video assembly. Use when: creating TikTok/YouTube Shorts/Reels content, automating video production, building content pipelines.

TerminalSkills/skills

>- Animate 3D objects and characters in Blender with Python. Use when the user wants to keyframe properties, create armatures and rigs, set up IK/FK chains, animate shape keys for facial animation, edit F-Curves, use the NLA editor to blend actions, add drivers for expression-based animation, or script any animation workflow in Blender.

TerminalSkills/skills

>- Automate motion capture and tracking workflows in Blender with Python. Use when the user wants to import BVH or FBX mocap data, retarget motion to armatures, track camera or object motion from video, solve camera motion, clean up motion capture data, or script any tracking pipeline in Blender.

TerminalSkills/skills

>- You are an expert in Bolt.new by StackBlitz, the AI-powered full-stack development environment that runs entirely in the browser. You help developers go from idea to deployed app in minutes using natural language prompts — Bolt generates complete applications with frontend, backend, database, and deployment, all running in a WebContainer without local setup.

TerminalSkills/skills

>- Assists with using Bun as an all-in-one JavaScript/TypeScript runtime, package manager, bundler, and test runner. Use when building HTTP servers, managing packages, running tests, or migrating from Node.js. Trigger words: bun, bun serve, bun install, bun test, bun build, javascript runtime, bun runtime.

TerminalSkills/skills

>- Self-host customer support with Chatwoot. Use when a user asks to set up open-source customer support, add live chat without SaaS costs, build a multi-channel inbox, or deploy a free Intercom alternative.

TerminalSkills/skills

>- You are an expert in Chi, the lightweight, idiomatic Go HTTP router built on `net/http`. You help developers build composable HTTP services using Chi's middleware stack, route groups, URL parameters, sub-routers, and context-based request scoping — providing Express-like ergonomics while staying 100% compatible with Go's standard library.

TerminalSkills/skills

When the user wants to edit, review, or improve existing marketing copy. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' or 'copy sweep.' This skill provides a systematic approach to editing marketing copy through multiple focused passes.

TerminalSkills/skills

>- Add live chat and customer support with Crisp. Use when a user asks to add a chat widget, implement live customer support, set up a help desk, create a knowledge base, or add a chatbot to a website.

TerminalSkills/skills

>- Assists with building custom interactive data visualizations using D3.js. Use when creating charts, graphs, maps, force layouts, or hierarchical diagrams that require fine-grained control beyond what charting libraries provide. Trigger words: d3, data visualization, chart, svg, scales, force graph, treemap, choropleth.

TerminalSkills/skills

dbt (data build tool) transforms data in your warehouse using SQL SELECT statements. Learn project setup, models, tests, documentation, incremental materializations, and integration with data warehouses like PostgreSQL, BigQuery, and Snowflake.

TerminalSkills/skills

>- You are an expert in dlt, the open-source Python library for building data pipelines. You help developers load data from any API, file, or database into warehouses and lakes using simple Python decorators — with automatic schema inference, incremental loading, and built-in data contracts. dlt is the "requests library for data pipelines.

TerminalSkills/skills

Data Version Control for ML projects. Track large datasets and models alongside Git, build reproducible ML pipelines, and run experiments with metric comparison. Works with any storage backend including S3, GCS, Azure, and local filesystems.

TerminalSkills/skills

>- You are an expert in E2B, the cloud platform for running AI-generated code in secure sandboxes. You help developers give AI agents the ability to execute code, install packages, read/write files, and run long processes in isolated cloud environments — each sandbox is a lightweight VM that boots in ~150ms with full Linux, filesystem, and networking.

TerminalSkills/skills

>- Transcode, convert, edit, and process audio and video with FFmpeg. Use when a user asks to convert video formats (webm to mp4, mkv to mp4), extract audio from video, compress video files, trim or cut clips, concatenate videos, add subtitles, create thumbnails, apply filters, change resolution or bitrate, re-encode media, create GIFs from video, add watermarks, normalize audio, stream media, or build automated media processing pipelines.

TerminalSkills/skills

>- Create advanced animations with GSAP. Use when building complex timelines, scroll-driven animations, SVG morphing, text animations, or high-performance web animations beyond CSS capabilities.

TerminalSkills/skills

>- Generate deterministic MP4 videos from HTML, CSS, media, and seekable animations using HeyGen's HyperFrames framework. Use when someone asks to "render HTML to video", "make a video with HyperFrames", "create a programmatic video", "turn an animation into MP4", "build a launch/product video from HTML", "render GSAP/Lottie/Three.js to video", or set up an agent-driven video pipeline. Covers init/preview/render/add/lint/inspect commands, data-* timing attributes, animation adapters, and the component catalog.

TerminalSkills/skills

When the user wants to perform load testing, stress testing, or performance testing of APIs and websites using k6. Also use when the user mentions "k6," "load test," "performance test," "stress test," "spike test," "soak test," "thresholds," "virtual users," or "VUs." For browser-based testing, see selenium.

Skills associés