跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
视频与音频

vidtsx-2d-generator

Generate production-ready 2D TSX video files for VidTSX (Remotion-based) from a shot, scene, or video description. Use whenever the user wants to create or generate a VidTSX video, a 2D TSX shot or scene, an animated clip, title card, or rendered motion graphic — including when they describe a visual animation they want built, or say "make a shot", "build this scene", "generate the TSX", or "turn this into a video". Covers the mandatory file structure and composition config, dimension presets (horizontal/vertical/square), six style presets (minimalist, memphis, neo-brutalism, glassmorphism, neon, corporate), and the hard rules that keep renders from crashing, covering frame-based animation only (no useState/useEffect/setTimeout), strictly monotonic interpolate ranges, Easing.bezier not wrapper syntax, and the chroma-js and @remotion/paths import gotchas. Not for 3D/three.js compositions, general React work, or editing video files.

hassancs91 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add hassancs91/claude-youtube-editor --skill vidtsx-2d-generator

技能说明


name: vidtsx-2d-generator description: Generate production-ready 2D TSX video files for VidTSX (Remotion-based) from a shot, scene, or video description. Use whenever the user wants to create or generate a VidTSX video, a 2D TSX shot or scene, an animated clip, title card, or rendered motion graphic — including when they describe a visual animation they want built, or say "make a shot", "build this scene", "generate the TSX", or "turn this into a video". Covers the mandatory file structure and composition config, dimension presets (horizontal/vertical/square), six style presets (minimalist, memphis, neo-brutalism, glassmorphism, neon, corporate), and the hard rules that keep renders from crashing, covering frame-based animation only (no useState/useEffect/setTimeout), strictly monotonic interpolate ranges, Easing.bezier not wrapper syntax, and the chroma-js and @remotion/paths import gotchas. Not for 3D/three.js compositions, general React work, or editing video files.

VidTSX 2D Video Generator

Generate production-ready 2D TSX video files for VidTSX from a description of a shot or video. The files are Remotion compositions that VidTSX renders frame-by-frame, so correctness matters more than cleverness: a single non-monotonic interpolate range or a stray useState will crash the render.

This skill covers 2D motion graphics. 3D work (@remotion/three / React Three Fiber) is out of scope.

How to use this skill

  1. Clear single shot → generate the .tsx file directly.
  2. Complex, multi-shot, or visually ambiguous request → confirm the shot breakdown or visual direction in one short message first, then generate. Don't over-ask; a one-line confirmation is enough.
  3. Deliver as an actual .tsx file, not inline code. These TSX components always exceed 20 lines, and the user edits these files directly. Default to one shot per file (atomic, easy to edit) unless the user asks for a single combined deliverable.
  4. The file contains only the component code — the structural section comments below are welcome, but no markdown fences, no prose explanations inside the file.
  5. Render it and look before calling it done — see Verify the render. A shot you have only reasoned about is not finished; a still (and, for reveals/scrolls, frames at each cue) is the bar.

Output spec

Dimension presets

FormatWidthHeightUse case
horizontal19201080YouTube, presentations
vertical10801920TikTok, Reels, Shorts
square10801080Instagram feed

Defaults

  • Format: horizontal (1920×1080)
  • Duration: 5 seconds
  • FPS: 30
  • Style: minimalist (see references/style-presets.md)

Mandatory file structure

Every generated file follows this skeleton. The labeled section comments are intentional — they keep large files navigable.

import React from 'react';
import {
  useCurrentFrame,
  useVideoConfig,
  interpolate,
  Easing,
  AbsoluteFill,
  Sequence,
} from 'remotion';

// =============================================================================
// COMPOSITION CONFIG
// =============================================================================
export const compositionConfig = {
  id: 'ComponentName', // PascalCase only — NO hyphens or underscores
  durationInSeconds: 5,
  fps: 30,
  width: 1920,
  height: 1080,
};

// =============================================================================
// STYLE CONSTANTS
// =============================================================================
const COLORS = {
  primary: '#6366f1',
  secondary: '#8b5cf6',
  accent: '#06b6d4',
  background: '#0f0f23',
  text: '#ffffff',
} as const;

const TYPOGRAPHY = {
  fontFamily: 'Inter, system-ui, sans-serif',
} as const;

const EASINGS = {
  easeOut: Easing.bezier(0.33, 1, 0.68, 1),
  easeIn: Easing.bezier(0.32, 0, 0.67, 0),
  easeInOut: Easing.bezier(0.37, 0, 0.63, 1),
  overshoot: Easing.bezier(0.34, 1.56, 0.64, 1),
} as const;

// =============================================================================
// PRE-GENERATED DATA (computed once at module level, NOT during render)
// =============================================================================
const seededRandom = (seed: number): number => {
  const x = Math.sin(seed * 9999) * 10000;
  return x - Math.floor(x);
};

// =============================================================================
// MAIN COMPONENT
// =============================================================================
const ComponentName: React.FC = () => {
  const frame = useCurrentFrame();
  const { fps, durationInFrames, width, height } = useVideoConfig();

  return (
    <AbsoluteFill style={{ backgroundColor: COLORS.background }}>
      {/* Content */}
    </AbsoluteFill>
  );
};

export default ComponentName;

Swap ComponentName for a PascalCase name describing the shot, set the COLORS block from the chosen style preset, and set width/height/durationInSeconds/fps from the request.


Correctness rules

These are not stylistic preferences — they are what makes a render succeed. VidTSX (via Remotion) renders each frame by calling the component at a fixed frame number. There is no event loop, no persistence between frames, and no wall-clock time. Anything that assumes those things will break.

Animation is frame-based, always

  • Drive all motion from useCurrentFrame() + interpolate().
  • Never use useState, useEffect, setTimeout, setInterval, or CSS animations/transitions. They don't fit the frame-by-frame model and produce broken or non-deterministic output.
  • For anything random or procedural, use seededRandom (or an equivalent seeded function) so every render of a given frame is identical. Pre-generate particle/random arrays at module level
阅读完整来源 ↗