π₯ Make videos programmatically with React
reduce amount of skills
Jonny Burger98ee15fe4868
diff --git a/packages/skills/skills/example-text-rotation/SKILL.md b/packages/skills/skills/example-text-rotation/SKILL.mddeleted file mode 100644index ed331ecc75..0000000000--- a/packages/skills/skills/example-text-rotation/SKILL.md+++ /dev/null@@ -1,21 +0,0 @@-----name: example-text-rotation-description: Complete working example of rotating words with dissolve and blur transition effects.-metadata:- category: Text- durationInFrames: 240- fps: 30------## Text Rotation Example--Rotating words with fade, scale, and blur transitions.--See the full implementation in [assets/example.tsx](assets/example.tsx).--### Key Features--- Cyclic word rotation with configurable timing-- Combined fade, scale, and blur effects-- Smooth transitions between words-- Easily customizable word list and timingdiff --git a/packages/skills/skills/example-typewriter-highlight/SKILL.md b/packages/skills/skills/example-typewriter-highlight/SKILL.mddeleted file mode 100644index 9afae13f79..0000000000--- a/packages/skills/skills/example-typewriter-highlight/SKILL.md+++ /dev/null@@ -1,23 +0,0 @@-----name: example-typewriter-highlight-description: Complete working example of a typewriter effect with blinking cursor, dramatic pause, and spring-animated word highlight.-metadata:- category: Text- durationInFrames: 180- fps: 30------## Typewriter with Highlight Example--Typewriter effect with blinking cursor, dramatic pause, spring-based highlight, and layer crossfade.--See the full implementation in [assets/example.tsx](assets/example.tsx).--### Key Features--- String slicing for proper typewriter effect-- Smooth blinking cursor using interpolate-- Dramatic pause between text sections-- Spring-animated highlight wipe effect-- Two-layer crossfade transition-- Configurable timing and colorsdiff --git a/packages/skills/skills/example-word-carousel/SKILL.md b/packages/skills/skills/example-word-carousel/SKILL.mddeleted file mode 100644index b24debda2d..0000000000--- a/packages/skills/skills/example-word-carousel/SKILL.md+++ /dev/null@@ -1,22 +0,0 @@-----name: example-word-carousel-description: Complete working example of rotating words with crossfade and blur transitions, using stable width container.-metadata:- category: Text- durationInFrames: 200- fps: 30------## Word Carousel Example--Rotating words with crossfade and blur transitions.--See the full implementation in [assets/example.tsx](assets/example.tsx).--### Key Features--- Stable width container using longest word-- Smooth crossfade between words-- Blur effect during transitions-- Configurable hold and flip durations-- Prefix text with rotating suffixdiff --git a/packages/skills/skills/text-animations/SKILL.md b/packages/skills/skills/text-animations/SKILL.mdnew file mode 100644index 0000000000..1a9fe4e566--- /dev/null+++ b/packages/skills/skills/text-animations/SKILL.md@@ -0,0 +1,103 @@+---+name: text-animations+description: Typography and text animation patterns for Remotion.+metadata:+ impact: HIGH+ tags: typography, text, typewriter, kinetic, animation+---++## Typewriter Effect - Use String Slicing++Always use string slicing for typewriter effects. Never use per-character opacity.++**Incorrect (per-character opacity - breaks cursor positioning):**++```tsx+{+ text.split('').map((char, i) => <span style={{opacity: i < typedCount ? 1 : 0}}>{char}</span>);+}+<span>|</span>;+```++**Correct (string slicing - cursor follows text):**++```tsx+const typedText = FULL_TEXT.slice(0, typedChars);++<span>{typedText}</span>+<span style={{ opacity: caretOpacity }}>β</span>+```++## Cursor Blink - Use Smooth Interpolation++Blinking cursors should fade smoothly, not flash on/off abruptly.++**Incorrect (abrupt blink):**++```tsx+const caretVisible = Math.floor(frame / 15) % 2 === 0;+<span style={{opacity: caretVisible ? 1 : 0}}>|</span>;+```++**Correct (smooth blink):**++```tsx+const CURSOR_BLINK_FRAMES = 16;+const caretOpacity = interpolate(frame % CURSOR_BLINK_FRAMES, [0, CURSOR_BLINK_FRAMES / 2, CURSOR_BLINK_FRAMES], [1, 0, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'});++<span style={{opacity: caretOpacity}}>β</span>;+```++## Word Carousel - Stable Width Container++Prevent layout shifts by using the longest word to set container width.++**Incorrect (width jumps between words):**++```tsx+<div style={{position: 'relative'}}>+ <span>{WORDS[currentIndex]}</span>+</div>+```++**Correct (stable width from longest word):**++```tsx+const longestWord = WORDS.reduce((a, b) => (a.length >= b.length ? a : b), WORDS[0]);++<div style={{position: 'relative'}}>+ <div style={{visibility: 'hidden'}}>{longestWord}</div>+ <div style={{position: 'absolute', left: 0, top: 0}}>{WORDS[currentIndex]}</div>+</div>;+```++## Text Highlight - Two Layer Crossfade++Use overlapping layers for smooth highlight transitions.++```tsx+const typedOpacity = interpolate(frame, [highlightStart - 8, highlightStart + 8], [1, 0], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'});+const finalOpacity = interpolate(frame, [highlightStart, highlightStart + 8], [0, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'});++{+ /* Typing layer */+}+<div style={{opacity: typedOpacity}}>{typedText}</div>;++{+ /* Final layer with highlight */+}+<div style={{position: 'absolute', inset: 0, opacity: finalOpacity}}>+ <span>{preText}</span>+ <span style={{backgroundColor: COLOR_HIGHLIGHT}}>{HIGHLIGHT_WORD}</span>+ <span>{postText}</span>+</div>;+```++## Complete Examples++For full working code examples, see:++- [Typewriter with Highlight](assets/typewriter-highlight.tsx) - Typewriter effect with cursor blink, pause, and word highlight+- [Word Carousel](assets/word-carousel.tsx) - Rotating words with crossfade and blur+- [Text Rotation](assets/text-rotation.tsx) - Rotating words with dissolve and blur effectsdiff --git a/packages/skills/skills/example-text-rotation/assets/example.tsx b/packages/skills/skills/text-animations/assets/text-rotation.tsxsimilarity index 100%rename from packages/skills/skills/example-text-rotation/assets/example.tsxrename to packages/skills/skills/text-animations/assets/text-rotation.tsxdiff --git a/packages/skills/skills/example-typewriter-highlight/assets/example.tsx b/packages/skills/skills/text-animations/assets/typewriter-highlight.tsxsimilarity index 100%rename from packages/skills/skills/example-typewriter-highlight/assets/example.tsxrename to packages/skills/skills/text-animations/assets/typewriter-highlight.tsxdiff --git a/packages/skills/skills/example-word-carousel/assets/example.tsx b/packages/skills/skills/text-animations/assets/word-carousel.tsxsimilarity index 100%rename from packages/skills/skills/example-word-carousel/assets/example.tsxrename to packages/skills/skills/text-animations/assets/word-carousel.tsxdiff --git a/packages/skills/skills/typography/SKILL.md b/packages/skills/skills/typography/SKILL.mddeleted file mode 100644index 637b265df6..0000000000--- a/packages/skills/skills/typography/SKILL.md+++ /dev/null@@ -1,126 +0,0 @@-----name: typography-description: Typography and text animation patterns for Remotion. Use when creating typewriter effects, kinetic text, word carousels, animated titles, or text-heavy content.-metadata:- impact: HIGH- tags: typography, text, typewriter, kinetic, animation------## Typewriter Effect - Use String Slicing--Always use string slicing for typewriter effects. Never use per-character opacity.--**Incorrect (per-character opacity - breaks cursor positioning):**--```tsx-{- text- .split("")- .map((char, i) => (- <span style={{ opacity: i < typedCount ? 1 : 0 }}>{char}</span>- ));-}-<span>|</span>;-```--**Correct (string slicing - cursor follows text):**--```tsx-const typedText = FULL_TEXT.slice(0, typedChars);--<span>{typedText}</span>-<span style={{ opacity: caretOpacity }}>β</span>-```--## Cursor Blink - Use Smooth Interpolation--Blinking cursors should fade smoothly, not flash on/off abruptly.--**Incorrect (abrupt blink):**--```tsx-const caretVisible = Math.floor(frame / 15) % 2 === 0;-<span style={{ opacity: caretVisible ? 1 : 0 }}>|</span>;-```--**Correct (smooth blink):**--```tsx-const CURSOR_BLINK_FRAMES = 16;-const caretOpacity = interpolate(- frame % CURSOR_BLINK_FRAMES,- [0, CURSOR_BLINK_FRAMES / 2, CURSOR_BLINK_FRAMES],- [1, 0, 1],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" },-);--<span style={{ opacity: caretOpacity }}>β</span>;-```--## Word Carousel - Stable Width Container--Prevent layout shifts by using the longest word to set container width.--**Incorrect (width jumps between words):**--```tsx-<div style={{ position: "relative" }}>- <span>{WORDS[currentIndex]}</span>-</div>-```--**Correct (stable width from longest word):**--```tsx-const longestWord = WORDS.reduce(- (a, b) => (a.length >= b.length ? a : b),- WORDS[0],-);--<div style={{ position: "relative" }}>- <div style={{ visibility: "hidden" }}>{longestWord}</div>- <div style={{ position: "absolute", left: 0, top: 0 }}>- {WORDS[currentIndex]}- </div>-</div>;-```--## Text Highlight - Two Layer Crossfade--Use overlapping layers for smooth highlight transitions.--```tsx-const typedOpacity = interpolate(- frame,- [highlightStart - 8, highlightStart + 8],- [1, 0],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" },-);-const finalOpacity = interpolate(- frame,- [highlightStart, highlightStart + 8],- [0, 1],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" },-);--{- /* Typing layer */-}-<div style={{ opacity: typedOpacity }}>{typedText}</div>;--{- /* Final layer with highlight */-}-<div style={{ position: "absolute", inset: 0, opacity: finalOpacity }}>- <span>{preText}</span>- <span style={{ backgroundColor: COLOR_HIGHLIGHT }}>{HIGHLIGHT_WORD}</span>- <span>{postText}</span>-</div>;-```--## Complete Examples--For full working code examples, see:-- [Typewriter with Highlight Example](../example-typewriter-highlight/SKILL.md) - Typewriter effect with cursor blink, pause, and word highlight-- [Word Carousel Example](../example-word-carousel/SKILL.md) - Rotating words with crossfade and blur-- [Text Rotation Example](../example-text-rotation/SKILL.md) - Rotating words with dissolve and blur effectsdiff --git a/packages/skills/src/Root.tsx b/packages/skills/src/Root.tsxindex 798e6655f5..df491e3700 100644--- a/packages/skills/src/Root.tsx+++ b/packages/skills/src/Root.tsx@@ -9,9 +9,9 @@ import {MyAnimation as ChatMessagesAnimation} from '../skills/example-chat-messaimport {MyAnimation as CounterAnimation} from '../skills/example-counter/assets/example';import {MyAnimation as FallingSpheresAnimation} from '../skills/3d/assets/falling-spheres';import {MyAnimation as StaggeredListAnimation} from '../skills/example-staggered-list/assets/example';-import {MyAnimation as TextRotationAnimation} from '../skills/example-text-rotation/assets/example';-import {MyAnimation as TypewriterHighlightAnimation} from '../skills/example-typewriter-highlight/assets/example';-import {MyAnimation as WordCarouselAnimation} from '../skills/example-word-carousel/assets/example';+import {MyAnimation as TextRotationAnimation} from '../skills/text-animations/assets/text-rotation';+import {MyAnimation as TypewriterHighlightAnimation} from '../skills/text-animations/assets/typewriter-highlight';+import {MyAnimation as WordCarouselAnimation} from '../skills/text-animations/assets/word-carousel';import {MyAnimation as LottieAnimation} from '../skills/lottie/assets/example';export const RemotionRoot = () => {