Communitygithub.com

Hownameee/short-videos

Remotion 마크업을 대화형으로 구조화합니다.

short-videos란 무엇인가요?

이 스킬은 Remotion Studio가 구성 요소의 코드 구조를 인식하고 직접 편집 가능하게 만드는 규칙과 권장 사항을 정의합니다. 이를 통해 개발자는 클릭, 드래그 앤 드롭, 크기 조절, 회전, CSS 스타일, 키프레임 및 이징 값 편집과 같은 대화형 기능을 얻을 수 있습니다. `Interactive.withSchema({wrapInSequence: true})`를 사용하여 인스턴스별로 편집 가능한 소품을 가진 재사용 가능한 구성 요소를 만들고, `InteractivitySchema`로 노출할 속성을 제어할 수 있습니다. Studio는 각 JSX 노드를 독립적인 편집 대상으로 취급하므로, 각 편집 가능한 항목에 대해 별도의 JSX 노드를 작성해야 합니다. `interpolate()`를 인라인으로 사용하여 애니메이션을 적용하고, 모든 CSS를 인라인 객체로 유지하며, 요소에 설명적인 `name` 소품을 추가하는 것도 핵심 원칙입니다. 이 스킬은 Cursor, Codex, Claude Code 등 다양한 AI 에이전트 플랫폼에서 Remotion 프로젝트를 작업할 때 일관된 대화형 마크업 구조를 만드는 데 사용됩니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Hownameee/short-videos/tree/HEAD/.agent/skills/remotion-interactivity

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

미리보기

스킬 README에서

short-videos preview

문서

Remotion 마크업을 특정 방식으로 작성하면 Remotion Studio가 코드 구조를 인식하고 다음과 같이 대화형으로 만듭니다:

  • 항목을 클릭하여 선택 가능
  • 드래그 앤 드롭, 크기 조절 및 회전 가능
  • CSS 스타일 편집 가능
  • 키프레임 및 이징 값 편집 가능

마크업이 Studio가 대화형으로 만들기에 너무 복잡하면 값이 회색으로 표시됩니다.

자체 타임라인이 있는 대화형 구성 요소 선호

Interactive.withSchema({wrapInSequence: true})를 사용하여 인스턴스별로 편집 가능한 소품이 있어야 하는 사용자 정의 장면, 카드, 제목 및 기타 시각적 구성 요소를 만듭니다. InteractivitySchema에 의미 있는 콘텐츠 및 모양 컨트롤을 노출합니다. 장식적인 구현 세부 사항은 구성 요소 내부에 유지합니다.

구성 요소는 style을 받아 시각적 루트 하나에 전달해야 합니다. 변형, 자르기 또는 불투명도가 모든 레이어에 영향을 미쳐야 하는 경우 공유 루트를 유지합니다. 스타일을 레이아웃이나 애니메이션을 변경하지 않고 기존 요소로 이동할 수 있는 경우 중복된 내부 래퍼를 평탄화합니다.

import type React from 'react';
import {Interactive, type InteractivitySchema} from 'remotion';

type LowerThirdProps = {
  readonly children: string;
  readonly accentColor: string;
  readonly style?: React.CSSProperties;
};

const LowerThirdInner: React.FC<LowerThirdProps> = ({
  children,
  accentColor,
  style,
}) => {
  return (
    <Interactive.Div
      style={{
        position: 'absolute',
        left: 80,
        bottom: 80,
        display: 'flex',
        alignItems: 'center',
        gap: 20,
        backgroundColor: 'white',
        borderRadius: 16,
        padding: '20px 32px',
        color: 'black',
        fontFamily: 'Helvetica, Arial, sans-serif',
        fontSize: 48,
        fontWeight: 600,
        ...style,
      }}
    >
      <div
        style={{
          width: 8,
          alignSelf: 'stretch',
          borderRadius: 4,
          backgroundColor: accentColor,
        }}
      />
      {children}
    </Interactive.Div>
  );
};

const lowerThirdSchema = {
  children: {type: 'text-content', default: '', description: '텍스트'},
  accentColor: {
    type: 'color',
    default: '#0b84f3',
    description: '강조 색상',
  },
} as const satisfies InteractivitySchema;

export const LowerThird = Interactive.withSchema({
  Component: LowerThirdInner,
  componentName: '<LowerThird>',
  schema: lowerThirdSchema,
  wrapInSequence: true,
});

구성 요소 내부에 삽입된 style을 전달하는 것은 필수입니다. 구성 요소 호출 지점에서 편집 가능한 스타일을 인라인으로 유지합니다.

스키마 필드 선택

스키마의 각 키는 Studio가 호출 지점에서 읽고 편집할 수 있는 소품입니다. 스키마에 없는 소품은 여전히 작동하지만 Studio에서 편집할 수 없습니다. 키는 style.color와 같은 점 표기법을 사용할 수 있습니다.

유형용도키프레임 가능
text-content텍스트(예: 제목)아니요
number숫자(선택적 min, max, step, integer)예
boolean켜기/끄기 스위치예(홀드)
colorCSS 색상 문자열예
enum각각 자체 중첩 스키마가 있는 variants 간의 선택선택(홀드)
array숫자, 색상, 열거형 등의 목록아니요
asset미디어 소스(선택적 assetType)아니요
font-familyCSS 글꼴 모음아니요
font-weight글꼴 두께예
translate, scale, rotation-css, rotation-degrees, transform-origin변형예
uv-coordinate요소의 정규화된 [x, y] 점예
svg-pathSVG 경로 데이터예
remotion-captionsCaption[] 데이터아니요
hidden컨트롤 밖에 유지되는 값—

모든 필드에는 default가 필요하며 description이 있어야 합니다. Studio는 이를 레이블로 표시합니다. 정적 컨트롤을 표시하려면 keyframable: false로 설정합니다.

콘텐츠 및 인스턴스별 모양(예: 텍스트 및 강조 색상)을 노출합니다. style.translate, style.scale, style.rotate, style.transformOrigin 및 style.opacity에 대한 필드를 추가하지 마십시오. wrapInSequence: true가 이미 추가합니다.

루트의 CSS 속성을 인스턴스별로 편집 가능하게 만들려면 기본 제공 스키마 조각을 펼칩니다:

const cardSchema = {
  ...Interactive.textSchema, // style.color, style.fontSize, style.fontWeight, ...
  ...Interactive.backgroundSchema, // style.backgroundColor
  ...Interactive.borderRadiusSchema, // style.borderRadius, ...
} as const satisfies InteractivitySchema;

추가로 사용 가능: Interactive.borderSchema 및 자막을 허용하는 구성 요소용 Interactive.captionsSchema. 모든 옵션은 InteractivitySchema를 참조하십시오.

재사용 가능한 구성 요소를 연결된 컴포지션으로 등록

자체 레이어 또는 애니메이션이 있는 중요한 장면 및 재사용 가능한 구성 요소를 독립형 컴포지션으로 등록합니다. Studio는 이것을 연결된 컴포지션이라고 부릅니다. 부모 비디오와 동일한 구성 요소 구현을 공유하면서 자체 타임라인에서 열 수 있습니다.

부모가 렌더링하는 동일한 내보낸 구성 요소 참조를 등록합니다. 위의 예에서는 component={LowerThird}를 사용하고 LowerThirdInner 또는 인라인 래퍼를 사용하지 마십시오. wrapInSequence: true를 사용하면 연결에 추가 <Sequence>가 필요하지 않습니다.

import {Composition} from 'remotion';
import {LowerThird} from './LowerThird';

export const RemotionRoot = () => (
  <Composition
    id="LowerThird"
    component={LowerThird}
    width={1280}
    height={720}
    fps={30}
    durationInFrames={30}
    defaultProps={{
      children: '홍길동, 제품 디자이너',
      accentColor: '#0b84f3',
    }}
  />
);

고유 ID, 대표적인 인라인 기본값 및 구성 요소 미리 보기에 적합한 크기, fps 및 기간을 선택합니다. 등록 기본값은 부모 인스턴스의 소품을 자동으로 복사하지 않습니다. 등록 및 추출 세부 사항은 연결된 컴포지션을 참조하십시오.

타이밍을 구성 요소에 직접 배치

이미 타이밍 소품을 허용하는 하나의 구성 요소 주위에 별도의 <Sequence>를 사용하지 마십시오. 기본 제공 대화형 구성 요소와 wrapInSequence: true로 만든 사용자 정의 구성 요소는 name, from, durationInFrames, trimBefore, playbackRate 및 premountFor를 직접 받을 수 있습니다.

<LowerThird
  name="하단 자막"
  from={30}
  durationInFrames={90}
  accentColor="#0b84f3"
>
  홍길동, 제품 디자이너
</LowerThird>

중복 시퀀스를 제거할 때는 그 타이밍과 이름을 자식으로 이동합니다. 기존 자식 타이밍을 유지하고 오프셋을 덮어쓰거나 이중으로 적용하지 마십시오. 구성 요소 내부의 useCurrentFrame() 호출은 로컬 프레임을 읽는 반면, 호출 지점의 스타일 표현식은 여전히 호출자의 프레임을 사용합니다. 애니메이션 스타일을 이동할 때 이 구분을 유지합니다.

<Sequence>는 여러 형제에 공유 타이밍을 제공하거나, useVideoConfig()의 크기를 재정의하거나, 타이밍을 처리하지 않는 구성 요소를 래핑할 때 유지합니다. 연속 레이아웃에는 <Series.Sequence>를, 전환에는 <TransitionSeries.Sequence>를 유지합니다. 직접 from 소품은 이러한 동작을 대체하지 않습니다.

모든 독립적으로 편집 가능한 항목에 고유한 JSX 노드 지정

Studio는 항목을 생성한 JSX 소스 노드를 편집합니다. 여러 런타임 항목이 동일한 JSX 노드에서 오면 하나의 소스 편집 대상을 공유합니다.

독립적으로 편집 가능해야 하는 모든 컴포지션 등록, 클립, 장면, 레이어 또는 시퀀스에 대해 별도의 JSX 노드를 작성하고 편집 가능한 소품을 해당 노드에 유지합니다. 이는 <Composition>, <Still>, 기본 제공 미디어 구성 요소, <Sequence>, <Series.Sequence>, <TransitionSeries.Sequence> 및 사용자 정의 구성 요소에 적용됩니다.

예를 들어 다음과 같이 편집 가능한 타임라인을 작성합니다:

<Series>
  <Series.Sequence name="소개" durationInFrames={90}>
    <Introduction />
  </Series.Sequence>
  <Series.Sequence name="데모" durationInFrames={150}>
    <Demo />
  </Series.Sequence>
</Series>

.map() 또는 다른 프로그래밍 방식 루프는 하나의 JSX 소스 노드에서 여러 런타임 항목을 만듭니다. 이는 시각화 막대나 입자와 같이 의도적으로 하나의 템플릿으로 제어되는 반복 출력에 적합합니다. 인스턴스에 독립적인 ID, 이름, 소품, 메타데이터, 타이밍, 순서 지정, 삭제 또는 Studio에서의 복제가 필요한 경우에는 적합하지 않습니다.

Interactive를 사용하여 HTML 요소를 대화형으로 만들기

모든 HTML 및 SVG 요소(<Img> 제외, 이미 대화형임) <div>는 Interactive를 사용하여 대화형으로 만들 수 있습니다:

<Interactive.Div
  name="인사말 카드"
  style={{fontSize: 80, padding: 24}}
>
  안녕하세요
</Interactive.Div>

이렇게 하면 Studio에서 스타일과 키프레임을 설정할 수 있습니다. 구성 요소에 요소가 많으면 타임라인이 지저분해질 수 있으므로 적절하게 사용하십시오.

인라인 텍스트 선호

텍스트가 고정되어 있고 한 번만 사용되는 경우 상수로 추출하지 말고 대화형 요소 내부에 직접 작성합니다.

// 👍 고정된 사본은 편집 가능한 상태로 유지됩니다
<Interactive.Div name="제목">
  Remotion 모범 사례
</Interactive.Div>

텍스트가 동적이거나 재사용되는 경우에만 소품이나 변수를 사용합니다.

대화형 요소에 설명적인 이름 지정

요소에 name 소품을 추가하여 쉽게 식별할 수 있도록 합니다. 계산된 이름은 피하고 하드코딩합니다.

<>
  <Interactive.Div name="히어로 제목" style={{fontSize: 80}}>
    출시일
  </Interactive.Div>
  <Img name="아바타" src="https://remotion.media/image.jpeg" />
  <Video name="배경" src="https://remotion.media/video.mp4" />
  <Interactive.Div name="제목">
    출시일
  </Interactive.Div>
</>

모든 CSS 스타일을 인라인으로 유지

가장 좋은 방법은 style에 일반 객체를 전달하는 것입니다. 상수 참조, 객체 펼침, 수학 연산은 피합니다.

<Interactive.Div
  style={{
    fontSize: 80,
    color: 'red',
  }}
>
  Hello World!
</Interactive.Div>
const baseStyle = useMemo(() => {
  return {
    fontSize: 12 // ❌ 인라인이 아닌 스타일은 지원되지 않습니다
  }
}, []);

<Interactive.Div
  style={{
    ...baseStyle, // ❌ 펼침은 지원되지 않습니다
    color: RED, // ❌ 상수 참조는 지원되지 않습니다
    scale: frame * 10 // ❌ 수학 연산은 지원되지 않습니다
  }}
>
  Hello World!
</Interactive.Div>

interpolate()를 사용하여 애니메이션 적용

변경되는 속성에 인라인 interpolate() 호출로 애니메이션을 작성합니다. 출력 범위, 이징, 외삽 및 output 속성은 하드코딩된 값을 사용해야 합니다.

입력 범위는 useVideoConfig()에서 직접 구조 분해된 durationInFrames, fps, width 및 height를 추가로 사용할 수 있습니다. durationInFrames와 같은 단일 식별자, 2 * fps 또는 fps * 2와 같은 숫자 곱셈, durationInFrames - 1과 같은 숫자 빼기가 지원됩니다.

const {fps, durationInFrames} = useVideoConfig();

// 👍 인라인 값은 표준화되고 키프레임화될 수 있습니다
<Interactive.Div
  name="제품 카드"
  style={{
    color: 'white',
    fontSize: 80,
    scale: interpolate(frame, [0, fps], [0, 1], {
      easing: Easing.spring({damping: 200}),
      output: 'perceptual-scale',
      extrapolateLeft: 'clamp',
      extrapolateRight: 'clamp'
    }),
    rotate: interpolate(frame, [0, 1 * fps], ['0deg', '20deg'], {
      easing: Easing.spring({damping: 200}),
      extrapolateLeft: 'clamp',
      extrapolateRight: 'clamp'
    }),
    translate: interpolate(
      frame,
      [durationInFrames - 30, durationInFrames],
      ['0px 0px', '0px 120px'],
      {
        easing: Easing.spring({damping: 200}),
        output: 'perceptual-scale',
        extrapolateLeft: 'clamp',
        extrapolateRight: 'clamp'
      }
    ),
  }}
/>
const translateY = interpolate(frame, [0, 30], [0, 120]); // ❌ 수학 연산은 마크업에 직접 있어야 합니다

<Interactive.Div
  name="제품 카드"
  style={{
    translate: translateY, // ❌ 인라인 interpolate() 호출만 지원됩니다
    rotate: interpolate(frame, [start, start + 10], [0, Math.PI]), // ❌ 임의 변수로 수학 연산을 사용할 수 없으며 상수를 사용할 수 없습니다
    scale: interpolate(anyVariable, [0, 30], [0, 1]) // ❌ `frame` 변수만 해석할 수 있습니다
  }}
/>

SVG 경로 유지

…

Individual skills in this repo

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

Hownameee/short-videos

Generate, revise or troubleshoot local Kokoro narration, pronunciation and scene word timing. Reuse verified unchanged clips; inspect the Python environment before setup changes. Exclude research, visuals, music composition and publishing.

Hownameee/short-videos

Router for all Remotion skills

Hownameee/short-videos

Transcribing, displaying and animating captions

Hownameee/short-videos

Remotion Map animation knowledge

Hownameee/short-videos

Content, animation and effects best practices

Hownameee/short-videos

Upgrade Remotion, and related packages

Hownameee/short-videos

>- Run Phase 1 of the shared short-video workflow: turn a raw topic or prompt into a sourced research pack and 2–4 distinct video directions, each with a defensible tension hook, promise, payoff, beats, visual approach, duration range, and risks. Use whenever the user asks for video ideas, angles, research, facts, hooks, topic analysis, or choices before scriptwriting. Stop for the user's direction choice and do not silently continue into script or production.

Hownameee/short-videos

Produce an approved short video or correct an existing video's background sound, emotion, captions, mix or export. Generate only changed narration, render and review a current preview, run technical and editorial QC, then export. Exclude script-only and general audio-advice requests.

Hownameee/short-videos

>- Run Phase 2 of the shared short-video workflow: convert an explicitly selected direction and its research into a reviewable beat sheet, narration, flexible scene timing, on-screen text, visual plan, captions, music and SFX cues, pronunciation notes, payoff, takeaway, and contextual CTA. Use whenever a user asks to write, revise, preview, or approve a short-video script. Stop for script approval and do not generate TTS or render video yet.

Hownameee/short-videos

>- Design and review a coherent visual system for short-form video before and during Remotion implementation. Use for video art direction, scene UI, typography, layout, color, diagrams, captions, motion, transitions, platform safe areas, or visual-quality review. Use Remotion skills separately for API, timeline, media, Studio, and rendering behavior; do not use this skill for narration-only or research-only work.

Hownameee/short-videos

Coordinate prompt-to-short-video discovery, scripting and production. Resume existing projects and route soundtrack or mix corrections directly to production. Preserve direction choice and script approval; exclude general audio advice.

관련 스킬