본문으로 건너뛰기
Skillpedia
모션 및 애니메이션33k · #9092

motion-canvas

하는 일

이 스킬은 AI 에이전트가 TypeScript 프레임워크인 Motion Canvas로 애니메이션 영상을 만들도록 안내합니다. 코드로 영상 애니메이션을 만들려는 개발자와 크리에이터를 위한 스킬입니다.

사용하는 경우

  • ✓올바른 설정으로 새 Motion Canvas 프로젝트를 처음부터 만들고 싶을 때.
  • ✓제너레이터 함수와 반응형 시그널로 애니메이션을 만들 때.
  • ✓기존 Motion Canvas 프로젝트에서 빌드나 가져오기 오류를 고쳐야 할 때.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/video/motion-canvas/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/video/motion-canvas/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“새 Motion Canvas 프로젝트를 설정하고, 간단한 애니메이션 타이틀 카드를 만들어 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 필요한 설정으로 프로젝트를 구성하고, 애니메이션이 있는 TypeScript 장면을 작성한 뒤, 실시간 미리보기로 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Motion Canvas - Production-Ready Video Creation with TypeScript

Complete production-ready skill for creating programmatic videos using Motion Canvas, including critical ESM/CommonJS workarounds, full configuration templates, and comprehensive troubleshooting.

⚠️ CRITICAL: ESM/CommonJS Interoperability Issue

IMPORTANT: The @motion-canvas/vite-plugin package is distributed as CommonJS, which causes import errors in modern ESM projects. The standard import motionCanvas from '@motion-canvas/vite-plugin' WILL NOT WORK.

You MUST use the createRequire workaround documented in the Setup section below.

When to use

Use this skill whenever you are dealing with Motion Canvas code to obtain domain-specific knowledge about:

  • Creating animated videos using TypeScript and generator functions
  • Building animations with signals and reactive values
  • Working with vector graphics and Canvas API
  • Synchronizing animations with voice-overs and audio
  • Using the real-time preview editor for instant feedback
  • Implementing procedural animations with flow control
  • Creating informative visualizations and diagrams
  • Animating text, shapes, and custom components
  • Setting up Motion Canvas projects from scratch with correct configuration
  • Troubleshooting common setup and build errors

Core Concepts

Motion Canvas allows you to create videos using:

  • Generator Functions: Describe animations using JavaScript generators with yield* syntax
  • Signals: Reactive values that automatically update dependent properties
  • Real-time Preview: Live editor with instant preview powered by Vite
  • TypeScript-First: Write animations in TypeScript with full IDE support
  • Canvas API: Leverage 2D Canvas for high-performance vector rendering
  • Audio Synchronization: Sync animations precisely with voice-overs

Complete Setup Guide

Step 1: Initialize Project

# Create project directory
mkdir my-motion-canvas-project
cd my-motion-canvas-project

# Initialize package.json
npm init -y

Step 2: Configure package.json for ESM

CRITICAL: Add "type": "module" to enable ESM imports.

{
  "name": "my-motion-canvas-project",
  "version": "1.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  }
}

Step 3: Install ALL Required Dependencies

CRITICAL: Must include @motion-canvas/ui - the plugin will fail without it.

npm install --save-dev @motion-canvas/core @motion-canvas/2d @motion-canvas/vite-plugin @motion-canvas/ui vite typescript

Step 4: Create Project Structure

my-motion-canvas-project/
├── package.json          # "type": "module" required
├── vite.config.js        # Use .js NOT .ts (see Step 5)
├── tsconfig.json         # TypeScript configuration
├── index.html            # HTML entry point
└── src/
    ├── project.ts        # Project configuration with scenes
    └── scenes/
        └── example.tsx   # Animation scene

Step 5: Create vite.config.js with ESM/CommonJS Workaround

CRITICAL: Use vite.config.js (NOT .ts) with the createRequire workaround.

File: vite.config.js

import {defineConfig} from 'vite';
import {createRequire} from 'module';

// WORKAROUND: @motion-canvas/vite-plugin is CommonJS, must use require
const require = createRequire(import.meta.url);
const motionCanvasModule = require('@motion-canvas/vite-plugin');
const motionCanvas = motionCanvasModule.default || motionCanvasModule;

export default defineConfig({
  plugins: [
    motionCanvas({
      project: './src/project.ts',
    }),
  ],
});

Why .js instead of .ts?

  • Vite config runs before TypeScript compilation
  • The createRequire workaround works reliably in plain JavaScript
  • Avoids additional type resolution complexity

Step 6: Create tsconfig.json

CRITICAL: Include esModuleInterop and allowSyntheticDefaultImports.

File: tsconfig.json

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ES2020",
    "lib": ["ES2020", "DOM"],
    "jsx": "react-jsx",
    "jsxImportSource": "@motion-canvas/2d/lib",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"]
}

Step 7: Create ind

자주 묻는 질문

알려진 설정 문제가 있나요?

네. 스킬은 최신 프로젝트에서 Vite 플러그인 가져오기가 실패할 수 있다고 경고하고 해결 방법을 제시합니다.

프로그래밍 기술이 필요한가요?

네. 영상은 TypeScript 코드로 만들어지며, 코드는 에이전트가 작성합니다.

음성 해설과 동기화할 수 있나요?

네. 스킬은 애니메이션과 오디오를 맞추는 방법을 다룹니다.

상세 정보

작성자의 원본 설명

Complete production-ready guide for Motion Canvas with ESM/CommonJS workarounds, full setup templates, and troubleshooting for programmatic video creation using TypeScript

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#9092
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬