Communitygithub.com

raiaksham377-bot/youtube-shorts-ai-editor

Gere arquivos de vídeo TSX 2D prontos para produção para VidTSX (baseado em Remotion) a partir de um plano, cena ou descrição de vídeo.

O que é youtube-shorts-ai-editor?

Esta habilidade permite que um agente de IA gere arquivos de composição Remotion (TSX) para o VidTSX a partir de descrições textuais de cenas ou vídeos. Diferente de gerar código React genérico, essa skill impõe regras rígidas para garantir que as renderizações sejam bem-sucedidas no VidTSX, que processa quadros individualmente sem um loop de eventos. Ela abrange animações 2D baseadas em quadros, com suporte a seis estilos visuais (minimalista, memphis, neo-brutalismo, vidro, neon e corporativo), três formatos de dimensão (horizontal, vertical, quadrado) e uma estrutura de arquivo obrigatória. Regras de correção essenciais incluem: usar apenas `useCurrentFrame()` e `interpolate()` para animações, nunca usar `useState`/`useEffect`/`setTimeout`, garantir faixas de entrada monotônicas para interpolate, usar `Easing.bezier()` sem wrapper, e importar `chroma-js` e `@remotion/paths` corretamente. A habilidade também exige que o agente verifique visualmente a renderização gerando e inspecionando pelo menos um quadro estático antes de considerar a cena concluída.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/raisaksham377-bot/youtube-shorts-ai-editor/tree/HEAD/.claude/skills/vidtsx-2d-generator

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Gerador de Vídeo 2D VidTSX

Gere arquivos de vídeo TSX 2D prontos para produção para VidTSX a partir de uma descrição de cena ou vídeo. Os arquivos são composições Remotion que o VidTSX renderiza quadro a quadro, portanto a correção é mais importante que a criatividade: uma única faixa não monotônica em interpolate ou um useState perdido causará falha na renderização.

Esta habilidade cobre gráficos em movimento 2D. Trabalhos 3D (@remotion/three / React Three Fiber) estão fora de escopo.

Como usar esta habilidade

  1. Cena única clara → gere o arquivo .tsx diretamente.
  2. Solicitação complexa, com múltiplas cenas ou visualmente ambígua → confirme a divisão das cenas ou a direção visual em uma mensagem curta primeiro, depois gere. Não pergunte demais; uma confirmação de uma linha é suficiente.
  3. Entregue como um arquivo .tsx real, não como código inline. Esses componentes TSX sempre excedem 20 linhas, e o usuário edita esses arquivos diretamente. Padrão: uma cena por arquivo (atômico, fácil de editar), a menos que o usuário peça um único entregável combinado.
  4. O arquivo contém apenas o código do componente — os comentários de seção estrutural abaixo são bem-vindos, mas sem cercas markdown, sem explicações em prosa dentro do arquivo.
  5. Renderize e veja antes de considerar finalizado — veja Verificar a renderização. Uma cena sobre a qual você apenas raciocinou não está pronta; um quadro estático (e, para revelações/rolagens, quadros em cada ponto-chave) é o critério.

Especificação de saída

Predefinições de dimensão

FormatoLarguraAlturaCaso de uso
horizontal19201080YouTube, apresentações
vertical10801920TikTok, Reels, Shorts
quadrado10801080Feed do Instagram

Padrões

  • Formato: horizontal (1920×1080)
  • Duração: 5 segundos
  • FPS: 30
  • Estilo: minimalista (veja references/style-presets.md)

Estrutura de arquivo obrigatória

Cada arquivo gerado segue este esqueleto. Os comentários de seção rotulados são intencionais — eles mantêm arquivos grandes navegáveis.

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

// =============================================================================
// CONFIGURAÇÃO DA COMPOSIÇÃO
// =============================================================================
export const compositionConfig = {
  id: 'NomeDoComponente', // PascalCase apenas — SEM hífens ou sublinhados
  durationInSeconds: 5,
  fps: 30,
  width: 1920,
  height: 1080,
};

// =============================================================================
// CONSTANTES DE ESTILO
// =============================================================================
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;

// =============================================================================
// DADOS PRÉ-GERADOS (calculados uma vez no nível do módulo, NÃO durante a renderização)
// =============================================================================
const seededRandom = (seed: number): number => {
  const x = Math.sin(seed * 9999) * 10000;
  return x - Math.floor(x);
};

// =============================================================================
// COMPONENTE PRINCIPAL
// =============================================================================
const NomeDoComponente: React.FC = () => {
  const frame = useCurrentFrame();
  const { fps, durationInFrames, width, height } = useVideoConfig();

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

export default NomeDoComponente;

Substitua NomeDoComponente por um nome PascalCase descrevendo a cena, defina o bloco COLORS a partir da predefinição de estilo escolhida e defina width/height/durationInSeconds/fps de acordo com a solicitação.


Regras de correção

Estas não são preferências estilísticas — são o que faz uma renderização ter sucesso. O VidTSX (via Remotion) renderiza cada quadro chamando o componente em um número de quadro fixo. Não há loop de eventos, nem persistência entre quadros, nem tempo de relógio de parede. Qualquer coisa que assuma essas coisas quebrará.

A animação é baseada em quadros, sempre

  • Conduza todo o movimento a partir de useCurrentFrame() + interpolate().
  • Nunca use useState, useEffect, setTimeout, setInterval ou animações/transições CSS. Eles não se encaixam no modelo quadro a quadro e produzem saída quebrada ou não determinística.
  • Para qualquer coisa aleatória ou procedural, use seededRandom (ou uma função equivalente com semente) para que cada renderização de um determinado quadro seja idêntica. Pré-gerar arrays de partículas/aleatórios no nível do módulo, nunca dentro da função de renderização — recalcular por quadro causa cintilação.
  • Distribua as animações para que os elementos entrem em sequência, em vez de todos de uma vez. Fica melhor visualmente e é a aparência esperada.

interpolate — os intervalos de entrada devem ser estritamente crescentes

O intervalo de entrada do interpolate deve ser estritamente monotônico crescente. Valores duplicados ou decrescentes geram erro em tempo de execução.

// ✅ Correto
interpolate(frame, [0, 30, 60], [0, 1, 0]);

// ❌ Gera erro — intervalo de entrada decresce
interpolate(frame, [60, 30, 0], [0, 1, 0]);

Para inverter um mapeamento, inverta o intervalo de saída, nunca o intervalo de entrada:

// ✅ Correto — mapeia 0→100, 1→0
interpolate(value, [0, 1], [100, 0]);

// ❌ Errado
interpolate(value, [1, 0], [100, 0]);

Para temporização baseada em índice, certifique-se de que startFrame < endFrame e sempre use clamp:

const startFrame = index * 30;
const endFrame = startFrame + 30;
interpolate(frame, [startFrame, endFrame], [0, 1], {
  extrapolateLeft: 'clamp',
  extrapolateRight: 'clamp',
});

Sempre passe extrapolateLeft: 'clamp' e extrapolateRight: 'clamp' a menos que um valor ilimitado seja genuinamente desejado — sem eles, os valores ultrapassam seu intervalo antes/depois dos quadros-chave.

Easing — use Easing.bezier(), nunca sintaxe de wrapper

Formas wrapper como Easing.out(Easing.cubic) causam falha. Defina beziers nomeados uma vez (veja o bloco EASINGS no esqueleto) e faça referência a eles:

// ❌ Causa falha
Easing.out(Easing.cubic);
Easing.in(Easing.quad);

// ✅ Correto
interpolate(frame, [0, 30], [0, 1], {
  easing: EASINGS.easeOut,
  extrapolateRight: 'clamp',
});

chroma-js — apenas importação de namespace

// ✅ Correto
import * as chroma from 'chroma-js';
const color = chroma('#00bfff').brighten(0.5).hex();

// ❌ Errado — "chroma is not a function"
import chroma from 'chroma-js';

@remotion/paths — apenas as funções reais existem

Estes helpers não existem e nunca devem ser usados: makeCircle(), makeRect(), makeTriangle(), makeLine(), makePie(), makePolygon(), makeEllipse(), makeStar().

Apenas estas importações são válidas:

import { evolvePath, getLength, getPointAtLength, getTangentAtLength } from '@remotion/paths';

Escreva strings de caminho SVG manualmente e anime-as com evolvePath:

const circlePath = 'M 50 10 A 40 40 0 1 1 49.99 10 Z';
const rectPath = 'M 0 0 L 100 0 L 100 50 L 0 50 Z';
const linePath = 'M 0 0 L 100 100';

const { strokeDasharray, strokeDashoffset } = evolvePath(progress, rectPath);

ID da composição

compositionConfig.id é apenas PascalCase — sem hífens, sem sublinhados (ex.: ProductReveal, não product-reveal ou product_reveal).


Layout

Zonas seguras

  • Topo 10%: reservado para UI da plataforma.
  • Fundo 15%: reservado para legendas/botões.
  • Mantenha o conteúdo principal verticalmente entre 25%–75%.

Centralizador auxiliar

const centered: React.CSSProperties = {
  position: 'absolute',
  top: '50%',
  left: '50%',
  transform: 'translate(-50%, -50%)',
};

Tipografia

ElementoTamanhoPeso
Manchetes72–120px700–900
Subtítulos36–48px500–700
Corpo28–36px400–500

Sempre defina margin: 0 em elementos de texto — os padrões do navegador deslocam layouts do centro.


Predefinições de estilo

Quando o usuário nomear um estilo, carregue sua paleta e características de references/style-presets.md e insira o objeto COLORS no esqueleto. As seis predefinições são: minimalista (padrão), memphis, neo-brutalismo, vidro, neon/cyberpunk e corporativo. Se nenhum estilo for nomeado, use minimalista.


Verificar a renderização (não pule)

Uma cena não está pronta até que você tenha olhado para ela. Depois de escrever o .tsx, renderize pelo menos um quadro estático e abra-o — nunca entregue uma cena sobre a qual você apenas raciocinou. A renderização é bem-sucedida e os números parecem certos, mas o texto transborda seu cartão, uma imagem é cortada no corte errado, um elemento está fora da tela ou duas coisas se sobrepõem. Apenas uma captura de tela detecta esses problemas.

  • Renderize um quadro estático (ex.: node scripts/render-all.mjs --still --scale=1 <ShotId>) e Leia o PNG.
  • Para revelações baseadas em tempo (elementos entrando em um ponto-chave, rolagens, fases escalonadas), um único quadro estático em 60% da duração não é suficiente — renderize o clipe completo e extraia quadros em cada momento-chave (ffmpeg -ss <t> -i out/<id>.mp4 -frames:v 1 f.jpg), ou renderize quadros estáticos em vários deslocamentos. Verifique o estado em cada ponto-chave, não apenas um quadro.
  • Verifique especificamente: imagens cabem em seu espaço (nenhum conteúdo importante cortado; prefira objectFit: contain em um fundo correspondente para imagens reais heterogêneas), o texto não está cortado ou transbordando, nada está fora da área segura, e cada elemento animado está realmente visível quando deveria estar.
  • Se for composto sobre outra filmagem, também verifique um quadro da saída final cozida, não apenas a cena isolada.

Corrija o que a captura de tela revela, depois renderize novamente e olhe novamente. Trate "Eu renderizei e parece correto" — com o quadro mostrado — como o critério para concluído.


Saída final

Gere o arquivo .tsx completo e nada mais dentro dele — sem markdown ao redor, sem comentários antes ou depois do código no próprio arquivo. Uma breve nota de uma linha no chat ao entregar o arquivo é aceitável.

Individual skills in this repo

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

raisaksham377-bot/youtube-shorts-ai-editor

Makes this repo's videos look like YOUR channel instead of the house default — interviews you for palette, fonts, wordmark, motion energy, delivery specs and SFX taste, then rewrites brand.md + remotion/src/brand.ts + remotion/src/fonts.ts together and renders a proof card so you SEE it. Use whenever the user wants to set up or change their brand, rebrand the repo, "make it my colors/fonts", change the accent color, set their wordmark, adjust the motion feel, or asks why their videos look like someone else's. Run it once before the first video. Not for per-video art direction (that is /make-tsx) and not for thumbnails, which are deliberately louder than the brand (that is /packaging).

raisaksham377-bot/youtube-shorts-ai-editor

Build a split-frame vertical Short/Reel (1080x1920) from talking-head footage — real face cropped into the bottom half throughout, bespoke motion-graphic beats + word-by-word captions in the top half. Use when the user wants a "vertical short", "reel", "9:16 video", "split-frame" format, asks to keep their face on screen the whole time while graphics play above it, wants an in-context app/UI mockup moment (like clicking a button in a browser) without cutting away from their face, or hits caption-pill-covers-my-face / no-GPU-rendering / audio-duration-mismatch problems while building one. Covers the crop-offset technique for framing the face, the caption-pill safe zone, the top-half-only UI-mockup scene pattern, the full pipeline from raw footage to final SFX mix, and the environment gotchas (no NVIDIA GPU, AAC priming gap, comp-native transcode). Topic-agnostic — this is a layout/technique skill, not tied to any one video's content. Builds on /clean-cut, /make-tsx conventions, and /suggest-sfx; doesn't rep...

raisaksham377-bot/youtube-shorts-ai-editor

Voice/audio cleanup step of the AI Video Editor pipeline — diagnose a video's background noise, pick the right denoise method, and produce a cleaned master (voice isolated, levels preserved, video stream copied). Use when the user wants to "clean the audio / voice", "remove background noise", "denoise", "isolate voice", fix outdoor/room/water/hum/hiss noise, run ElevenLabs Voice Isolator or local RNNoise, A/B denoise methods, or produce a cleaned master for a video-N in this repo. Covers diagnosing the noise (spectrogram + levels), choosing eleven vs rnnoise by noise type, the sample A/B, tools/clean_voice.py, preserving levels (RMS-match, not LUFS), and rewiring the pipeline to the clean master. Not the SFX/music mix (that is /suggest-sfx + the final-mix step) and not the cut (that is /clean-cut).

raisaksham377-bot/youtube-shorts-ai-editor

Step 1 of the AI Video Editor pipeline — turn raw talking-head footage into a clean master cut. Use when the user wants to "clean cut", "cut the raw footage", "remove filler / dead air / bad takes", "tighten the pacing", produce cuts.json, run the cut editor, or render a cleaned preview/master for a video-N project in this repo. Covers audio extraction, AssemblyAI transcription, authoring cuts.json (keeps/cuts/fluff categorized), the cut policy (content-aggressive, pause-natural ~0.5s), QA + review docs, the local cut-editor UI, tight/natural previews, the final 4K60 render, and producing edited-transcript.json as the handoff to /make-tsx. Not for building TSX overlays (that is /make-tsx) or the raw TSX authoring rules (that is vidtsx-2d-generator).

raisaksham377-bot/youtube-shorts-ai-editor

Turn static SCREENSHOTS into a simulated screen recording (TSX) — a fake screencast with an animated cursor that eases to targets and clicks, a browser URL bar that updates per page, hard-cut navigations, in-page filter crossfades, smooth scroll, and a ken-burns zoom onto the payoff. Use when a beat needs to show a walkthrough of a web app / dashboard / settings page and you'd rather build it from screenshots than get (or ask for) a real screen recording — "fake a screen recording", "turn these screenshots into a screencast", "simulate clicking through the dashboard", "animate this UI walkthrough", "cursor moving through the app". Built on remotion/src/lib/screencast.tsx. This is a technique WITHIN step 2 (make-tsx): defer timeline/render/bake orchestration to make-tsx and raw crash-free TSX rules to vidtsx-2d-generator. Not for a single static page clone (use WebBrowserFrame directly) and not when the point is genuine proof of real speed/output (use a real recording).

raisaksham377-bot/youtube-shorts-ai-editor

Step 2 of the AI Video Editor pipeline — build the visual beats (Remotion TSX shots) over a project's master cut and bake a composited preview. Use when the user wants to add/edit overlays or full-screen animation segments, "make a shot / beat", implement an edit plan or a v2 update, retime a beat to the narration, re-render shots, or re-bake the video-N preview in this repo. Covers reading the plan + edited-transcript + brand + reusable kit, authoring shots library-first, syncing reveals to word times, updating timeline.json (cutaway vs overlay), rendering, verifying by screenshot, and baking with tools/bake.py. Defers raw TSX authoring rules to vidtsx-2d-generator and the cut itself to clean-cut.

raisaksham377-bot/youtube-shorts-ai-editor

Generates click-optimized YouTube packaging — 3 thumbnail bets under one fixed title, engineered for YouTube's built-in A/B/C thumbnail test, plus a value-forward description, then renders the thumbnails as real images. Use this whenever you want to package a long-form video or turn a video idea into titles and thumbnails. Triggers include how would you package this, title ideas for, thumbnail concept, package this video, A/B variations, and make this clickable. Calibrates to your channel's own CTR data if you have it. Long-form only, never Shorts. Not for non-YouTube copywriting.

raisaksham377-bot/youtube-shorts-ai-editor

Step 4 of the AI Video Editor pipeline — the SFX pass. Analyze a video's beats + narration and propose tasteful sound effects synced to them, drawing from (and growing) a shared, reusable SFX library, then render an SFX-mixed audition preview. Use when the user wants to "add SFX / sound effects", "suggest sfx", "score the transitions", "sound-design this beat", generate/source sound effects, build or extend the sfx library/catalog, author or audit a sfx-plan, or mix SFX over a video-N preview in this repo. Covers reading timeline + edited-transcript + brand §10, the library-first flow, generating misses with the ElevenLabs Sound Effects API, the per-video sfx-plan.json, the hard user-audit gate, and mixing with tools/mix_sfx.py (light voice ducking). Not the music bed (that is the final-mix step) and not the visual beats (that is /make-tsx).

Habilidades Relacionadas