Understand the modular skills architecture that provides specialized guidance and examples for different animation types.
The skills system is a modular architecture that enhances code generation quality by injecting specialized knowledge based on the user’s prompt. It consists of two types of skills: guidance skills (best practices and patterns) and example skills (complete working code).
Skill detection uses a specialized prompt to classify user requests:
export const SKILL_DETECTION_PROMPT = `Classify this motion graphics prompt into ALL applicable categories.A prompt can match multiple categories. Only include categories that are clearly relevant.Guidance categories (patterns and rules):- charts: data visualizations, graphs, histograms, bar charts, pie charts, progress bars, statistics, metrics- typography: kinetic text, typewriter effects, text animations, word carousels, animated titles, text-heavy content- social-media: Instagram stories, TikTok content, YouTube shorts, social media posts, reels, vertical video- messaging: chat interfaces, WhatsApp conversations, iMessage, chat bubbles, text messages, DMs, messenger- 3d: 3D objects, ThreeJS, spatial animations, rotating cubes, 3D scenes- transitions: scene changes, fades between clips, slide transitions, wipes, multiple scenes- sequencing: multiple elements appearing at different times, staggered animations, choreographed entrances- spring-physics: bouncy animations, organic motion, elastic effects, overshoot animationsCode examples (complete working references):- example-histogram: animated bar chart with spring animations and @remotion/shapes- example-progress-bar: loading bar animation from 0 to 100%- example-text-rotation: rotating words with fade/blur transitions- example-falling-spheres: 3D bouncing spheres with ThreeJS and physics simulation- example-animated-shapes: bouncing/rotating SVG shapes (circle, triangle, rect, star)- example-lottie: loading and displaying Lottie animations from URL- example-gold-price-chart: bar chart with Y-axis labels, monthly data, staggered animations- example-typewriter-highlight: typewriter effect with cursor blink, pause, and word highlight- example-word-carousel: rotating words with crossfade and blur transitionsReturn an array of matching category names. Return an empty array if none apply.`;
Guidance skills are markdown files containing best practices, common pitfalls, and code patterns. They’re imported at build time and injected into the system prompt.
From `src/skills/charts.md:8-35`### Markdown file structureEach guidance skill markdown file includes:- **Frontmatter**: Title, impact rating, and tags- **Sections**: Organized by specific patterns or problems- **Code comparisons**: "Incorrect" vs "Correct" examples- **Explanations**: Why one approach is preferred## Example skillsExample skills reference complete, working animations from the examples library. They're useful when the prompt closely matches a known pattern.### Available example skills```typescriptconst EXAMPLE_SKILLS = [ "example-histogram", "example-progress-bar", "example-text-rotation", "example-falling-spheres", "example-animated-shapes", "example-lottie", "example-gold-price-chart", "example-typewriter-highlight", "example-word-carousel",] as const;