Communitygithub.com

raisaksham377-bot/youtube-shorts-ai-editor

ショット、シーン、または動画の説明から、VidTSX(Remotionベース)向けの本番対応2D TSXビデオファイルを生成します。ユーザーがVidTSX動画、2D TSXショット・シーン、アニメーションクリップ、タイトルカード、レンダリングモーショングラフィックを作成・生成したいとき、または「ショットを作って」「このシーンを構築して」「TSXを生成して」「これを動画にして」と依頼したときに使用します。

youtube-shorts-ai-editor とは?

このスキルは、VidTSX(Remotionベース)向けに本番対応の2D TSXビデオファイルを生成するためのものです。ユーザーがショット、シーン、または動画の説明を入力すると、スキルはその説明に基づいて適切なTSXコンポーネントファイルを出力します。出力されるファイルは、Remotionでフレームごとにレンダリングされるため、正確性が重視されます。例えば、`interpolate`の入力範囲が非単調だったり、`useState`が含まれていたりするとレンダリングがクラッシュするため、それらを避けるためのルールが厳格に定められています。このスキルは、水平・垂直・正方形の3つのディメンションプリセットと、ミニマリスト、メンフィス、ネオ・ブルータリズム、グラスモーフィズム、ネオン、コーポレートの6つのスタイルプリセットをサポートします。また、`chroma-js`や`@remotion/paths`の正しいインポート方法、フレームベースのアニメーションのみを使用する制約など、VidTSXで安定してレンダリングするためのハードルールも含まれています。このスキルは、Claude Code、Cursor、CodexなどのAIエージェント向けに設計されており、開発者が手軽に高品質な2Dモーショングラフィックを生成できるようにします。

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

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

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

ドキュメント

VidTSX 2D 動画ジェネレーター

ショットまたは動画の説明から、VidTSX向けの本番対応2D TSXビデオファイルを生成します。これらのファイルはVidTSXがフレームごとにレンダリングするRemotionコンポジションであるため、賢さよりも正確さが重要です。単一の非単調なinterpolate範囲や、紛れ込んだuseStateがあるだけでレンダリングがクラッシュします。

このスキルは2Dモーショングラフィックスを対象としています。3D作品(@remotion/three / React Three Fiber)は対象外です。

このスキルの使い方

  1. 明確な単一ショット → .tsxファイルを直接生成します。
  2. 複雑なマルチショット、または視覚的に曖昧なリクエスト → 最初にショットの内訳やビジュアルの方向性を短いメッセージで確認してから生成します。過剰に質問しないでください。1行の確認で十分です。
  3. インラインコードではなく、実際の.tsxファイルとして提供します。 これらのTSXコンポーネントは常に20行を超え、ユーザーはこれらのファイルを直接編集します。ユーザーが単一の結合された成果物を要求しない限り、デフォルトはファイルごとに1ショット(アトミックで編集しやすい)です。
  4. ファイルにはコンポーネントコードのみを含めます。以下の構造セクションのコメントは歓迎しますが、ファイル内にマークダウンのフェンスや説明文は入れないでください。
  5. レンダリングして、完了と判断する前に確認してください — レンダリングの確認を参照してください。推論しただけのショットは完了ではありません。静止画(および、リビールやスクロールの場合は各キューでのフレーム)が完了の基準です。

出力仕様

ディメンションプリセット

フォーマット幅高さ使用例
horizontal19201080YouTube、プレゼンテーション
vertical10801920TikTok、Reels、Shorts
square10801080Instagramフィード

デフォルト値

  • フォーマット: horizontal (1920×1080)
  • 長さ: 5秒
  • FPS: 30
  • スタイル: minimalist(references/style-presets.mdを参照)

必須ファイル構造

生成されるすべてのファイルは、このスケルトンに従います。セクションラベルのコメントは意図的なもので、大きなファイルのナビゲーションを容易にします。

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

// =============================================================================
// コンポジション設定
// =============================================================================
export const compositionConfig = {
  id: 'ComponentName', // パスカルケースのみ — ハイフンやアンダースコアは禁止
  durationInSeconds: 5,
  fps: 30,
  width: 1920,
  height: 1080,
};

// =============================================================================
// スタイル定数
// =============================================================================
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;

// =============================================================================
// 事前生成データ(レンダリング時ではなく、モジュールレベルで一度だけ計算)
// =============================================================================
const seededRandom = (seed: number): number => {
  const x = Math.sin(seed * 9999) * 10000;
  return x - Math.floor(x);
};

// =============================================================================
// メインコンポーネント
// =============================================================================
const ComponentName: React.FC = () => {
  const frame = useCurrentFrame();
  const { fps, durationInFrames, width, height } = useVideoConfig();

  return (
    <AbsoluteFill style={{ backgroundColor: COLORS.background }}>
      {/* コンテンツ */}
    </AbsoluteFill>
  );
};

export default ComponentName;

ComponentNameをショットを説明するパスカルケースの名前に置き換え、選択したスタイルプリセットからCOLORSブロックを設定し、リクエストに応じてwidth/height/durationInSeconds/fpsを設定します。


正確性のルール

これらはスタイル上の好みではなく、レンダリングを成功させるための条件です。VidTSX(Remotion経由)は、固定フレーム番号でコンポーネントを呼び出して各フレームをレンダリングします。イベントループ、フレーム間の永続性、壁掛け時計時間は存在しません。これらを前提とするものはすべて壊れます。

アニメーションは常にフレームベース

  • すべての動きをuseCurrentFrame() + interpolate()で制御します。
  • useState、useEffect、setTimeout、setInterval、またはCSSアニメーション/トランジションを決して使用しないでください。これらはフレームごとのモデルに適合せず、壊れたり非決定的な出力を生成します。
  • ランダムまたは手続き的なものには、seededRandom(または同等のシード付き関数)を使用して、特定のフレームのレンダリングが常に同一になるようにします。パーティクル/ランダム配列はモジュールレベルで事前生成し、レンダリング関数内では決して生成しないでください。フレームごとに再計算するとちらつきが発生します。
  • アニメーションをずらして、要素が一度にではなく順番に入るようにします。その方が見栄えが良く、期待される見た目です。

interpolate — 入力範囲は厳密に増加させる必要があります

interpolateの入力範囲は厳密に単調増加である必要があります。重複する値や下降する値は実行時にエラーをスローします。

// ✅ 正しい
interpolate(frame, [0, 30, 60], [0, 1, 0]);

// ❌ エラー — 入力範囲が下降している
interpolate(frame, [60, 30, 0], [0, 1, 0]);

マッピングを反転するには、入力範囲ではなく出力範囲を反転します。

// ✅ 正しい — 0→100, 1→0 にマッピング
interpolate(value, [0, 1], [100, 0]);

// ❌ 間違い
interpolate(value, [1, 0], [100, 0]);

インデックスベースのタイミングでは、startFrame < endFrameを確認し、常にクランプします。

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

範囲外の値が本当に必要な場合を除き、常に extrapolateLeft: 'clamp' と extrapolateRight: 'clamp' を渡します。これらがないと、値はキーフレームの前後で範囲を超えてしまいます。

Easing — Easing.bezier() を使用し、ラッパー構文は使用しない

Easing.out(Easing.cubic) のようなラッパー形式はクラッシュします。名前付きベジェを一度定義し(スケルトンのEASINGSブロックを参照)、それを参照します。

// ❌ クラッシュ
Easing.out(Easing.cubic);
Easing.in(Easing.quad);

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

chroma-js — 名前空間インポートのみ

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

// ❌ 間違い — "chroma is not a function"
import chroma from 'chroma-js';

@remotion/paths — 実際の関数のみが存在します

以下のヘルパーは存在しません。絶対に使用しないでください。 makeCircle(), makeRect(), makeTriangle(), makeLine(), makePie(), makePolygon(), makeEllipse(), makeStar().

有効なインポートは以下のもののみです。

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

SVGパス文字列を手書きし、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

compositionConfig.id はパスカルケースのみです。ハイフンやアンダースコアは使用禁止です(例:ProductReveal、product-reveal や product_reveal ではありません)。


レイアウト

セーフゾーン

  • 上部10%: プラットフォームUI用に確保。
  • 下部15%: キャプション/ボタン用に確保。
  • 主要コンテンツは垂直方向に25%~75% の間に配置します。

中央揃えヘルパー

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

タイポグラフィ

要素サイズウェイト
見出し72–120px700–900
小見出し36–48px500–700
本文28–36px400–500

テキスト要素には常にmargin: 0を設定します。ブラウザのデフォルトはレイアウトを中央からずらします。


スタイルプリセット

ユーザーがスタイルを指定した場合、references/style-presets.md からそのパレットと特性をロードし、COLORSオブジェクトをスケルトンに挿入します。6つのプリセットは以下の通りです。minimalist(デフォルト)、memphis、neo-brutalism、glassmorphism、neon/cyberpunk、corporate。スタイルが指定されていない場合は、minimalistを使用します。


レンダリングの確認(スキップ禁止)

ショットは、実際に確認するまで完了ではありません。.tsxを作成したら、少なくとも1つの静止画をレンダリングして開きます。推論しただけのショットを絶対に引き渡さないでください。レンダリングが成功し、数値が正しく見えても、テキストがカードからはみ出していたり、画像が間違ったクロップで切り取られていたり、要素が画面外にあったり、2つのものが重なっていたりすることがあります。スクリーンショットだけがこれらを捉えることができます。

  • 静止画をレンダリングし(例:node scripts/render-all.mjs --still --scale=1 <ShotId>)、PNGを確認します。
  • 時間ベースのリビール(キューで要素が入る、スクロール、段階的なフェーズ)の場合、60%の長さの静止画1枚では不十分です。フルクリップをレンダリングし、各キーモーメントでフレームを取得します(ffmpeg -ss <t> -i out/<id>.mp4 -frames:v 1 f.jpg)、または複数のオフセットで静止画をレンダリングします。1つのフレームだけでなく、各キューでの状態を確認します。
  • 具体的に確認すること:画像がスロットに収まっているか(重要なコンテンツが切り取られていないか;異種の実際の画像には、一致する背景にobjectFit: containを優先)、テキストがクリップされていたりはみ出していないか、何もセーフエリア外になく、各アニメーション要素が本来表示されるべきときに実際に表示されているか。
  • 他の映像と合成されている場合は、分離したショットだけでなく、最終的な出力フレームからもスポットチェックを行います。

スクリーンショットで明らかになった問題を修正し、再レンダリングして再度確認します。「レンダリングして正しく見えた」(確認したフレームを示して)を完了の基準として扱います。


最終出力

完全な.tsxファイルを生成し、そのファイル内にはそれ以外何も含めないでください。ファイル自体にマークダウンの囲みや、コードの前後の解説文は入れないでください。ファイルを引き渡す際にチャットで短い1行のメモを添えることは問題ありません。

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).

関連スキル