motion-canvas
Was er macht
Dieser Skill führt den KI-Agenten beim Erstellen animierter Videos mit Motion Canvas, einem TypeScript-Framework. Er richtet sich an Entwickler und Creator, die codebasierte Videoanimation wollen.
Wann du ihn nutzt
- ✓Wenn du ein neues Motion-Canvas-Projekt mit der richtigen Konfiguration von Grund auf einrichten willst.
- ✓Wenn du Animationen mit Generatorfunktionen und reaktiven Signalen baust.
- ✓Wenn du einen Build- oder Importfehler in einem bestehenden Motion-Canvas-Projekt behebst.
Link zum Skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/video/motion-canvas/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Kannst du ein neues Motion-Canvas-Projekt einrichten und eine einfache animierte Titelkarte erstellen?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent richtet das Projekt mit der nötigen Konfiguration ein, schreibt TypeScript-Szenen mit Animationen und prüft sie mit der Live-Vorschau.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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
createRequireworkaround 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
Häufige Fragen
Gibt es bekannte Einrichtungsprobleme?
Ja. Der Skill warnt, dass ein Vite-Plugin-Import in modernen Projekten fehlschlagen kann, und nennt eine Lösung.
Brauche ich Programmierkenntnisse?
Ja. Die Videos entstehen aus TypeScript-Code, den der Agent für dich schreibt.
Kann er Animationen mit Voice-overs synchronisieren?
Ja. Der Skill deckt die Synchronisierung von Animationen mit Audio ab.
Details
Originalbeschreibung des Autors
Complete production-ready guide for Motion Canvas with ESM/CommonJS workarounds, full setup templates, and troubleshooting for programmatic video creation using TypeScript
Beliebtheit
- GitHub-Sterne
- 33k
- Platz im Ranking
- #9092
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
owasp-security
33kBringt deinem Agenten OWASP-Sicherheitsrichtlinien für Web-Apps, APIs, mobile Apps, Container und KI-Agenten bei, damit er typische Schwachstellen erkennt und Korrekturen vorschlägt.
agent-management
33kLässt deinen Agenten KI-Agenten mit der AI-Maestro-Kommandozeile erstellen, auflisten, pausieren, aufwecken, umbenennen und löschen und so ihren Lebenszyklus verwalten.
agent-messaging
33kLässt deinen Agenten signierte Nachrichten zwischen KI-Agenten senden, empfangen und beantworten, über das Agent Messaging Protocol, überwiegend auf deinem eigenen Rechner.
docs-search
33kLässt deinen Agenten automatisch erzeugte Code-Dokumentation nach Funktionssignaturen, Klassendefinitionen und Kommentaren durchsuchen und so die echte API prüfen, bevor er Code ändert.
Ähnliche Skills
blender-motion-state-inspection
280kErmöglicht die Prüfung von Details in 3D-Animationen. Nützlich, um Posen, Bewegungen und die Ausrichtung von Figuren zu kontrollieren.
manim-video
280kErmöglicht deinem Agenten, animierte Erklärvideos zu erstellen. Mit Manim erzeugt er klare Graphen und Diagramme für technische Konzepte.
remotion-video-creation
280kBegleitet deinen Agenten beim Erstellen von Videos mit React und Remotion. Behandelt Best Practices für Animationen, Audio, Untertitel und visuelle Elemente.