@kolbo/kolbo-code-windows-x64-baseline 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/bin/kolbo.exe +0 -0
  2. package/package.json +14 -0
  3. package/skills/frontend-design/SKILL.md +42 -0
  4. package/skills/kolbo/SKILL.md +216 -0
  5. package/skills/remotion-best-practices/SKILL.md +61 -0
  6. package/skills/remotion-best-practices/rules/3d.md +86 -0
  7. package/skills/remotion-best-practices/rules/animations.md +27 -0
  8. package/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
  9. package/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
  10. package/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +103 -0
  11. package/skills/remotion-best-practices/rules/assets.md +78 -0
  12. package/skills/remotion-best-practices/rules/audio-visualization.md +198 -0
  13. package/skills/remotion-best-practices/rules/audio.md +169 -0
  14. package/skills/remotion-best-practices/rules/calculate-metadata.md +134 -0
  15. package/skills/remotion-best-practices/rules/can-decode.md +81 -0
  16. package/skills/remotion-best-practices/rules/charts.md +120 -0
  17. package/skills/remotion-best-practices/rules/compositions.md +154 -0
  18. package/skills/remotion-best-practices/rules/display-captions.md +184 -0
  19. package/skills/remotion-best-practices/rules/extract-frames.md +229 -0
  20. package/skills/remotion-best-practices/rules/ffmpeg.md +38 -0
  21. package/skills/remotion-best-practices/rules/fonts.md +152 -0
  22. package/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
  23. package/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
  24. package/skills/remotion-best-practices/rules/get-video-duration.md +60 -0
  25. package/skills/remotion-best-practices/rules/gifs.md +141 -0
  26. package/skills/remotion-best-practices/rules/images.md +134 -0
  27. package/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
  28. package/skills/remotion-best-practices/rules/light-leaks.md +73 -0
  29. package/skills/remotion-best-practices/rules/lottie.md +70 -0
  30. package/skills/remotion-best-practices/rules/maps.md +412 -0
  31. package/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
  32. package/skills/remotion-best-practices/rules/measuring-text.md +140 -0
  33. package/skills/remotion-best-practices/rules/parameters.md +109 -0
  34. package/skills/remotion-best-practices/rules/sequencing.md +118 -0
  35. package/skills/remotion-best-practices/rules/sfx.md +30 -0
  36. package/skills/remotion-best-practices/rules/subtitles.md +36 -0
  37. package/skills/remotion-best-practices/rules/tailwind.md +11 -0
  38. package/skills/remotion-best-practices/rules/text-animations.md +20 -0
  39. package/skills/remotion-best-practices/rules/timing.md +179 -0
  40. package/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
  41. package/skills/remotion-best-practices/rules/transitions.md +197 -0
  42. package/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
  43. package/skills/remotion-best-practices/rules/trimming.md +51 -0
  44. package/skills/remotion-best-practices/rules/videos.md +171 -0
  45. package/skills/remotion-best-practices/rules/voiceover.md +99 -0
  46. package/skills/video-production/SKILL.md +152 -0
  47. package/skills/youtube-clipper/SKILL.md +187 -0
package/bin/kolbo.exe ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@kolbo/kolbo-code-windows-x64-baseline",
3
+ "version": "1.0.3",
4
+ "os": [
5
+ "win32"
6
+ ],
7
+ "cpu": [
8
+ "x64"
9
+ ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/Zoharvan12/kolbo-code"
13
+ }
14
+ }
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: frontend-design
3
+ description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
8
+
9
+ The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
10
+
11
+ ## Design Thinking
12
+
13
+ Before coding, understand the context and commit to a BOLD aesthetic direction:
14
+ - **Purpose**: What problem does this interface solve? Who uses it?
15
+ - **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
16
+ - **Constraints**: Technical requirements (framework, performance, accessibility).
17
+ - **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
18
+
19
+ **CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
20
+
21
+ Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
22
+ - Production-grade and functional
23
+ - Visually striking and memorable
24
+ - Cohesive with a clear aesthetic point-of-view
25
+ - Meticulously refined in every detail
26
+
27
+ ## Frontend Aesthetics Guidelines
28
+
29
+ Focus on:
30
+ - **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
31
+ - **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
32
+ - **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
33
+ - **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
34
+ - **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
35
+
36
+ NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
37
+
38
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
39
+
40
+ **IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
41
+
42
+ Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: kolbo
3
+ description: Generate or analyze creative media through Kolbo AI. Load this skill whenever the user asks to create, edit, prompt, or analyze images, videos, music, speech, or sound effects — or to list available AI models / check credit balance. It contains the MCP tool workflow and the prompt-engineering rules for each media type.
4
+ ---
5
+
6
+ # Kolbo AI — Creative Generation & Analysis
7
+
8
+ You have direct access to the Kolbo AI creative platform via MCP tools (auto-configured by `kolbo auth login`). Use them to generate and deliver real content — do NOT just describe what you would create.
9
+
10
+ ## Available MCP Tools
11
+
12
+ | Tool | Description |
13
+ |------|-------------|
14
+ | `generate_image` | Create images from text prompts. Returns image URL(s). |
15
+ | `generate_video` | Create videos from text. Returns video URL. |
16
+ | `generate_video_from_image` | Animate a still image into video. Returns video URL. |
17
+ | `generate_music` | Create music from descriptions. Returns audio URL. |
18
+ | `generate_speech` | Convert text to speech. Returns audio URL. |
19
+ | `generate_sound` | Generate sound effects. Returns audio URL. |
20
+ | `list_models` | Browse available AI models filtered by type. |
21
+ | `check_credits` | Check remaining Kolbo credit balance. |
22
+ | `get_generation_status` | Poll status of an in-progress generation by ID. |
23
+
24
+ ## Core Workflow
25
+
26
+ 1. **Check credits** with `check_credits` at the start of any creative session (once is enough).
27
+ 2. **Discover models** with `list_models` using a `type` filter. **Always do this before calling a generation tool — never hardcode model identifiers.** Models are added, removed, and updated frequently.
28
+ 3. **Generate**: call the appropriate tool. Omit `model` to let Kolbo auto-select the best model (recommended default), or pass an `identifier` from `list_models` for explicit control. Models marked `recommended: true` are Kolbo's top picks for quality and speed.
29
+ 4. **Polling is internal** — the tool returns the final URL(s) when ready. If a video generation times out, call `get_generation_status` with the returned generation ID to retrieve the result.
30
+ 5. **Share the URL** — after a successful generation, hand the real URL back to the user. Never fabricate URLs.
31
+
32
+ ### Model Types (for `list_models`)
33
+
34
+ | Type | Use for |
35
+ |------|---------|
36
+ | `image` | Still-image generation |
37
+ | `video` | Text-to-video |
38
+ | `video_from_image` | Image-to-video animation |
39
+ | `music` | Music generation |
40
+ | `speech` | Text-to-speech |
41
+ | `sound` | Sound effects |
42
+
43
+ ### Cost Awareness
44
+
45
+ Creative generations bill against the user's Kolbo credit balance. Order of expense (rough):
46
+ - **Cheap & fast**: speech (~5-30s), sound effects (~5-30s), image (~10-30s)
47
+ - **Medium**: music (~30s-2min)
48
+ - **Expensive**: video (~1-5min, highest credit cost)
49
+
50
+ Rule of thumb: confirm intent before firing off a video generation unless the user was explicit. For images, just generate.
51
+
52
+ ---
53
+
54
+ ## Image Prompts
55
+
56
+ ### Rules
57
+ - **Clean prompts only.** No "Output:", "Tips:", "Notes:", "Resolution:", "Dimensions:", or any instructional/meta language inside the prompt. The prompt is what the model sees — anything not describing the image is noise.
58
+ - **Length**: focused 2-3 sentences beats a bloated paragraph. Only go longer when the concept genuinely needs it (complex scenes, multiple subjects, specific technical requirements). Match prompt length to complexity.
59
+ - **Order**: Subject → action/pose → environment → lighting → style.
60
+ - **Be specific about style** when it matters: "1970s film photography", "watercolor illustration on rough paper", "3D product render with studio softbox lighting" — not vague descriptors like "beautiful" or "high quality".
61
+ - **`enhance_prompt: true`** (default) will improve most prompts automatically. Turn it off only if the user's prompt is already fully engineered or they want literal wording.
62
+
63
+ ### Image Editing (image-to-image)
64
+ When the model can see the uploaded image, describe the **change**, not the unchanged parts.
65
+ - Good: "Turn the sky orange and add drifting clouds"
66
+ - Bad: "A mountain landscape with an orange sky and drifting clouds" (re-describes what's already in the image)
67
+
68
+ Simple edits deserve simple prompts. Only elaborate for genuinely complex, multi-step transformations.
69
+
70
+ ### Multi-Scene / Campaigns
71
+ For storyboards, campaigns, or character-consistent sequences, call `generate_image` once per scene with the same base style cues carried across prompts. Kolbo's web app has a dedicated Creative Director feature for this; in the CLI the workflow is sequential `generate_image` calls.
72
+
73
+ ---
74
+
75
+ ## Video Prompts
76
+
77
+ Video is the most expensive operation in the Kolbo catalog. Write prompts deliberately.
78
+
79
+ ### Core Rules
80
+ - **Order**: Subject → Action → Camera → Style → Constraints → Audio
81
+ - **Length**: 80-280 words. Shorter = random. Longer = the model forgets the start.
82
+ - **Always specify at least one camera movement per shot.** Even "static wide shot" is a valid explicit choice — just don't leave it unsaid.
83
+ - **Character consistency**: when a character appears across shots, begin the prompt with the literal phrase `same character throughout all shots` to prevent identity drift.
84
+ - **Max 3 shots per prompt.** More shots cause the model to drift.
85
+ - **Duration-aware timecodes**: if the user gives a duration, space timecodes to fit (`[0s] [3s]` for 5s total; `[0s] [3s] [6s]` for 10s total). If no duration is given, describe shots sequentially without hardcoded timecodes.
86
+
87
+ ### Image-to-Video
88
+ The model can see the starting frame. Describe **what happens**, not what the image looks like. Focus on motion, camera, and action — don't re-describe the subject or setting.
89
+ - Good: "Slow dolly-in on the subject. Her hair drifts in a light breeze. Soft particles float through the air. [6s]"
90
+ - Bad: "A woman with long brown hair standing in a forest, wearing a red dress, with golden sunlight..." (re-describes the image)
91
+
92
+ ### Camera Vocabulary
93
+
94
+ Pick what fits the mood. Every shot gets at least one.
95
+
96
+ | Movement | Use for |
97
+ |----------|---------|
98
+ | `slow dolly-in` | Building intensity, focus pull |
99
+ | `pull-back` / `dolly out` | Scale reveal, loneliness, context |
100
+ | `extreme low-angle` | Power, heroic framing |
101
+ | `overhead top-down` | Geometry, pattern, abstraction |
102
+ | `360° orbit` | Product showcase, bullet-time moments |
103
+ | `handheld natural lag` | Urgency, documentary, grit |
104
+ | `tracking shot` | Continuous follow of a subject |
105
+ | `crash zoom` | Shock, impact moment |
106
+ | `aerial pull-back` | Epic reveal, landscape scale |
107
+ | `static drift` | Contemplative, subtle, meditative |
108
+ | `crane up` / `crane down` | Grandeur, establishing, dismissal |
109
+ | `whip pan` | Sharp transition, high energy |
110
+
111
+ ### Physics Vocabulary (only name what matters for the scene)
112
+
113
+ - **Cloth**: `cloth inertia`, `fabric lags behind movement`
114
+ - **Water**: `water splashing with surface tension`, `droplets scattering`, `puddle mirror reflection`
115
+ - **Sand / dust**: `sand displacement`, `radial dust shockwave`
116
+ - **Hair**: `hair reacts to acceleration and wind`
117
+ - **Impact**: `skin distorting on impact`, `delayed follow-through`
118
+ - **Smoke**: `volumetric smoke curling and dissipating`
119
+
120
+ Don't stuff every category in every prompt — only name the physics that genuinely drives the shot.
121
+
122
+ ### Multi-Shot Format
123
+
124
+ When the user wants a sequence (trailer, story, showcase), write each shot as a brief 1-2 sentence entry on its own line inside the prompt:
125
+
126
+ ```
127
+ Shot 1: [action + camera movement]
128
+ Shot 2: [action + camera movement]
129
+ Shot 3: [action + camera movement]
130
+ ```
131
+
132
+ Think like a director. Describe what **happens**, not what things **look** like.
133
+
134
+ ### Mood Presets
135
+
136
+ Pick techniques that match the user's intent. A calm landscape and an action sequence need different tools.
137
+
138
+ - **Cinematic / dramatic**: slow dolly-in, anamorphic 2.39:1, shallow depth of field, volumetric light, subtle film grain
139
+ - **Product showcase**: 360° orbit, clean white or gradient backdrop, macro detail inserts, smooth tracking
140
+ - **Dreamy / ethereal**: slow crane up, soft diffused light, gentle particle drift, muted pastels, static drift moments
141
+ - **Action / intense**: crash zoom, handheld natural lag, extreme slow-motion at the peak beat, high contrast, fast cuts
142
+ - **Nature / landscape**: aerial pull-back, golden hour lighting, wind physics on foliage, wide establishing shots
143
+ - **Abstract / motion graphics**: overhead top-down, geometric patterns, bold color blocks, rhythmic cutting
144
+
145
+ ### Slow-Motion
146
+
147
+ Extreme slow-motion is a tool, not a freeze frame. Always describe the micro-movements that *continue* during the slow beat (hair drifting, droplets crawling, fabric rippling), and specify the snap-back to full speed when relevant.
148
+
149
+ Format: `extreme slow-motion [Xs] — [micro-movements in ultra slow-mo] — snap-back to full speed`
150
+
151
+ ---
152
+
153
+ ## Music Prompts
154
+
155
+ Describe **genre → mood → instrumentation → tempo → era**, in that order.
156
+
157
+ - `instrumental: true` excludes vocals.
158
+ - `lyrics` accepts actual lyric text the model should sing.
159
+ - `style` accepts short genre tags ("lo-fi hip hop", "orchestral cinematic", "80s synthwave").
160
+ - Good: "Upbeat 80s synthwave, analog synths, gated reverb drums, 120 BPM, driving bassline, no vocals"
161
+ - Bad: "A cool song" / "Something for a workout" (too vague)
162
+
163
+ ---
164
+
165
+ ## Speech (TTS)
166
+
167
+ - Call `list_models` with `type: speech` to get voice identifiers. Pass the `identifier` as `model` for a consistent voice.
168
+ - The voice **is** the model for speech — there is no separate voice parameter.
169
+ - For long text, split at natural sentence boundaries. Each generation has a character cap; chunk long-form content into multiple calls.
170
+ - For multilingual content, pick a voice that supports the target language from `list_models`.
171
+
172
+ ---
173
+
174
+ ## Sound Effects
175
+
176
+ - Describe the sound **literally and physically**. Avoid emotional framing.
177
+ - Good: "Heavy wooden door creaking open slowly, echoing in a stone hallway, followed by distant dripping water"
178
+ - Bad: "A scary sound" / "Creepy atmosphere" (the model can't render emotions directly — render the physical source)
179
+
180
+ ---
181
+
182
+ ## Image Analysis (when the user uploads images)
183
+
184
+ When the user shares an image and asks about it:
185
+
186
+ - **Analyze thoroughly**: describe composition, subjects, colors, lighting, style, text/signage, setting, mood, visible objects, and any embedded information (charts, diagrams, screenshots).
187
+ - **Reference specific regions** when helpful: "top-left corner", "in the foreground", "the figure on the right".
188
+ - **Extract text verbatim** when asked (OCR-style requests are fine).
189
+ - **Cannot identify real people.** Describe hair, clothing, pose, expression, and apparent role — but never name a specific individual, even a well-known public figure. If the user insists, decline and offer to describe instead.
190
+ - **Copyrighted content**: summarize and reference, don't reproduce verbatim large chunks.
191
+ - If the user wants an **edit** based on the analysis, hand off to `generate_video_from_image` (motion) or `generate_image` with an image-to-image model (visual edit) — see the Image Editing section above for prompt structure.
192
+
193
+ ---
194
+
195
+ ## Limitations & Safety
196
+
197
+ - **Real people**: never identify specific real individuals in photos, even public figures. Describe visible attributes only.
198
+ - **NSFW**: Kolbo enforces content safety at the model level. If a generation fails on safety grounds, rephrase the prompt rather than retrying identically.
199
+ - **Copyright**: style references are fine (e.g. "in the style of Studio Ghibli"); verbatim reproduction of copyrighted material is not.
200
+ - **No fabricated URLs**: only share URLs that actually came back from a tool call. Never guess a URL.
201
+
202
+ ---
203
+
204
+ ## Examples
205
+
206
+ Natural-language triggers that should prompt this skill + a tool call:
207
+
208
+ - "Generate an image of a neon-lit Tokyo street at night" → `list_models` (image) → `generate_image`
209
+ - "Create a 5-second cinematic video of ocean waves at sunset" → `list_models` (video) → `generate_video` with camera + mood guidance
210
+ - "Animate this product photo with a 360° orbit" → `list_models` (video_from_image) → `generate_video_from_image`
211
+ - "Make a lo-fi hip hop beat, instrumental, 85 BPM" → `list_models` (music) → `generate_music`
212
+ - "Say this in English with a natural female voice: Welcome to Kolbo" → `list_models` (speech) → `generate_speech`
213
+ - "Generate a door slam sound effect" → `list_models` (sound) → `generate_sound`
214
+ - "What video models are available?" → `list_models` (video)
215
+ - "How many credits do I have?" → `check_credits`
216
+ - "What's in this image?" (with upload) → describe per the Image Analysis section; no tool call needed unless the user asks to generate or edit
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: remotion-best-practices
3
+ description: Best practices for Remotion - Video creation in React
4
+ metadata:
5
+ tags: remotion, video, react, animation, composition
6
+ ---
7
+
8
+ ## When to use
9
+
10
+ Use this skills whenever you are dealing with Remotion code to obtain the domain-specific knowledge.
11
+
12
+ ## Captions
13
+
14
+ When dealing with captions or subtitles, load the [./rules/subtitles.md](./rules/subtitles.md) file for more information.
15
+
16
+ ## Using FFmpeg
17
+
18
+ For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the [./rules/ffmpeg.md](./rules/ffmpeg.md) file for more information.
19
+
20
+ ## Audio visualization
21
+
22
+ When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the [./rules/audio-visualization.md](./rules/audio-visualization.md) file for more information.
23
+
24
+ ## Sound effects
25
+
26
+ When needing to use sound effects, load the [./rules/sound-effects.md](./rules/sound-effects.md) file for more information.
27
+
28
+ ## How to use
29
+
30
+ Read individual rule files for detailed explanations and code examples:
31
+
32
+ - [rules/3d.md](rules/3d.md) - 3D content in Remotion using Three.js and React Three Fiber
33
+ - [rules/animations.md](rules/animations.md) - Fundamental animation skills for Remotion
34
+ - [rules/assets.md](rules/assets.md) - Importing images, videos, audio, and fonts into Remotion
35
+ - [rules/audio.md](rules/audio.md) - Using audio and sound in Remotion - importing, trimming, volume, speed, pitch
36
+ - [rules/calculate-metadata.md](rules/calculate-metadata.md) - Dynamically set composition duration, dimensions, and props
37
+ - [rules/can-decode.md](rules/can-decode.md) - Check if a video can be decoded by the browser using Mediabunny
38
+ - [rules/charts.md](rules/charts.md) - Chart and data visualization patterns for Remotion (bar, pie, line, stock charts)
39
+ - [rules/compositions.md](rules/compositions.md) - Defining compositions, stills, folders, default props and dynamic metadata
40
+ - [rules/extract-frames.md](rules/extract-frames.md) - Extract frames from videos at specific timestamps using Mediabunny
41
+ - [rules/fonts.md](rules/fonts.md) - Loading Google Fonts and local fonts in Remotion
42
+ - [rules/get-audio-duration.md](rules/get-audio-duration.md) - Getting the duration of an audio file in seconds with Mediabunny
43
+ - [rules/get-video-dimensions.md](rules/get-video-dimensions.md) - Getting the width and height of a video file with Mediabunny
44
+ - [rules/get-video-duration.md](rules/get-video-duration.md) - Getting the duration of a video file in seconds with Mediabunny
45
+ - [rules/gifs.md](rules/gifs.md) - Displaying GIFs synchronized with Remotion's timeline
46
+ - [rules/images.md](rules/images.md) - Embedding images in Remotion using the Img component
47
+ - [rules/light-leaks.md](rules/light-leaks.md) - Light leak overlay effects using @remotion/light-leaks
48
+ - [rules/lottie.md](rules/lottie.md) - Embedding Lottie animations in Remotion
49
+ - [rules/measuring-dom-nodes.md](rules/measuring-dom-nodes.md) - Measuring DOM element dimensions in Remotion
50
+ - [rules/measuring-text.md](rules/measuring-text.md) - Measuring text dimensions, fitting text to containers, and checking overflow
51
+ - [rules/sequencing.md](rules/sequencing.md) - Sequencing patterns for Remotion - delay, trim, limit duration of items
52
+ - [rules/tailwind.md](rules/tailwind.md) - Using TailwindCSS in Remotion
53
+ - [rules/text-animations.md](rules/text-animations.md) - Typography and text animation patterns for Remotion
54
+ - [rules/timing.md](rules/timing.md) - Interpolation curves in Remotion - linear, easing, spring animations
55
+ - [rules/transitions.md](rules/transitions.md) - Scene transition patterns for Remotion
56
+ - [rules/transparent-videos.md](rules/transparent-videos.md) - Rendering out a video with transparency
57
+ - [rules/trimming.md](rules/trimming.md) - Trimming patterns for Remotion - cut the beginning or end of animations
58
+ - [rules/videos.md](rules/videos.md) - Embedding videos in Remotion - trimming, volume, speed, looping, pitch
59
+ - [rules/parameters.md](rules/parameters.md) - Make a video parametrizable by adding a Zod schema
60
+ - [rules/maps.md](rules/maps.md) - Add a map using Mapbox and animate it
61
+ - [rules/voiceover.md](rules/voiceover.md) - Adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: 3d
3
+ description: 3D content in Remotion using Three.js and React Three Fiber.
4
+ metadata:
5
+ tags: 3d, three, threejs
6
+ ---
7
+
8
+ # Using Three.js and React Three Fiber in Remotion
9
+
10
+ Follow React Three Fiber and Three.js best practices.
11
+ Only the following Remotion-specific rules need to be followed:
12
+
13
+ ## Prerequisites
14
+
15
+ First, the `@remotion/three` package needs to be installed.
16
+ If it is not, use the following command:
17
+
18
+ ```bash
19
+ npx remotion add @remotion/three # If project uses npm
20
+ bunx remotion add @remotion/three # If project uses bun
21
+ yarn remotion add @remotion/three # If project uses yarn
22
+ pnpm exec remotion add @remotion/three # If project uses pnpm
23
+ ```
24
+
25
+ ## Using ThreeCanvas
26
+
27
+ You MUST wrap 3D content in `<ThreeCanvas>` and include proper lighting.
28
+ `<ThreeCanvas>` MUST have a `width` and `height` prop.
29
+
30
+ ```tsx
31
+ import { ThreeCanvas } from "@remotion/three";
32
+ import { useVideoConfig } from "remotion";
33
+
34
+ const { width, height } = useVideoConfig();
35
+
36
+ <ThreeCanvas width={width} height={height}>
37
+ <ambientLight intensity={0.4} />
38
+ <directionalLight position={[5, 5, 5]} intensity={0.8} />
39
+ <mesh>
40
+ <sphereGeometry args={[1, 32, 32]} />
41
+ <meshStandardMaterial color="red" />
42
+ </mesh>
43
+ </ThreeCanvas>;
44
+ ```
45
+
46
+ ## No animations not driven by `useCurrentFrame()`
47
+
48
+ Shaders, models etc MUST NOT animate by themselves.
49
+ No animations are allowed unless they are driven by `useCurrentFrame()`.
50
+ Otherwise, it will cause flickering during rendering.
51
+
52
+ Using `useFrame()` from `@react-three/fiber` is forbidden.
53
+
54
+ ## Animate using `useCurrentFrame()`
55
+
56
+ Use `useCurrentFrame()` to perform animations.
57
+
58
+ ```tsx
59
+ const frame = useCurrentFrame();
60
+ const rotationY = frame * 0.02;
61
+
62
+ <mesh rotation={[0, rotationY, 0]}>
63
+ <boxGeometry args={[2, 2, 2]} />
64
+ <meshStandardMaterial color="#4a9eff" />
65
+ </mesh>;
66
+ ```
67
+
68
+ ## Using `<Sequence>` inside `<ThreeCanvas>`
69
+
70
+ The `layout` prop of any `<Sequence>` inside a `<ThreeCanvas>` must be set to `none`.
71
+
72
+ ```tsx
73
+ import { Sequence } from "remotion";
74
+ import { ThreeCanvas } from "@remotion/three";
75
+
76
+ const { width, height } = useVideoConfig();
77
+
78
+ <ThreeCanvas width={width} height={height}>
79
+ <Sequence layout="none">
80
+ <mesh>
81
+ <boxGeometry args={[2, 2, 2]} />
82
+ <meshStandardMaterial color="#4a9eff" />
83
+ </mesh>
84
+ </Sequence>
85
+ </ThreeCanvas>;
86
+ ```
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: animations
3
+ description: Fundamental animation skills for Remotion
4
+ metadata:
5
+ tags: animations, transitions, frames, useCurrentFrame
6
+ ---
7
+
8
+ All animations MUST be driven by the `useCurrentFrame()` hook.
9
+ Write animations in seconds and multiply them by the `fps` value from `useVideoConfig()`.
10
+
11
+ ```tsx
12
+ import { useCurrentFrame } from "remotion";
13
+
14
+ export const FadeIn = () => {
15
+ const frame = useCurrentFrame();
16
+ const { fps } = useVideoConfig();
17
+
18
+ const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
19
+ extrapolateRight: "clamp",
20
+ });
21
+
22
+ return <div style={{ opacity }}>Hello World!</div>;
23
+ };
24
+ ```
25
+
26
+ CSS transitions or animations are FORBIDDEN - they will not render correctly.
27
+ Tailwind animation class names are FORBIDDEN - they will not render correctly.
@@ -0,0 +1,173 @@
1
+ import {loadFont} from '@remotion/google-fonts/Inter';
2
+ import {AbsoluteFill, spring, useCurrentFrame, useVideoConfig} from 'remotion';
3
+
4
+ const {fontFamily} = loadFont();
5
+
6
+ const COLOR_BAR = '#D4AF37';
7
+ const COLOR_TEXT = '#ffffff';
8
+ const COLOR_MUTED = '#888888';
9
+ const COLOR_BG = '#0a0a0a';
10
+ const COLOR_AXIS = '#333333';
11
+
12
+ // Ideal composition size: 1280x720
13
+
14
+ const Title: React.FC<{children: React.ReactNode}> = ({children}) => (
15
+ <div style={{textAlign: 'center', marginBottom: 40}}>
16
+ <div style={{color: COLOR_TEXT, fontSize: 48, fontWeight: 600}}>
17
+ {children}
18
+ </div>
19
+ </div>
20
+ );
21
+
22
+ const YAxis: React.FC<{steps: number[]; height: number}> = ({
23
+ steps,
24
+ height,
25
+ }) => (
26
+ <div
27
+ style={{
28
+ display: 'flex',
29
+ flexDirection: 'column',
30
+ justifyContent: 'space-between',
31
+ height,
32
+ paddingRight: 16,
33
+ }}
34
+ >
35
+ {steps
36
+ .slice()
37
+ .reverse()
38
+ .map((step) => (
39
+ <div
40
+ key={step}
41
+ style={{
42
+ color: COLOR_MUTED,
43
+ fontSize: 20,
44
+ textAlign: 'right',
45
+ }}
46
+ >
47
+ {step.toLocaleString()}
48
+ </div>
49
+ ))}
50
+ </div>
51
+ );
52
+
53
+ const Bar: React.FC<{
54
+ height: number;
55
+ progress: number;
56
+ }> = ({height, progress}) => (
57
+ <div
58
+ style={{
59
+ flex: 1,
60
+ display: 'flex',
61
+ flexDirection: 'column',
62
+ justifyContent: 'flex-end',
63
+ }}
64
+ >
65
+ <div
66
+ style={{
67
+ width: '100%',
68
+ height,
69
+ backgroundColor: COLOR_BAR,
70
+ borderRadius: '8px 8px 0 0',
71
+ opacity: progress,
72
+ }}
73
+ />
74
+ </div>
75
+ );
76
+
77
+ const XAxis: React.FC<{
78
+ children: React.ReactNode;
79
+ labels: string[];
80
+ height: number;
81
+ }> = ({children, labels, height}) => (
82
+ <div style={{flex: 1, display: 'flex', flexDirection: 'column'}}>
83
+ <div
84
+ style={{
85
+ display: 'flex',
86
+ alignItems: 'flex-end',
87
+ gap: 16,
88
+ height,
89
+ borderLeft: `2px solid ${COLOR_AXIS}`,
90
+ borderBottom: `2px solid ${COLOR_AXIS}`,
91
+ paddingLeft: 16,
92
+ }}
93
+ >
94
+ {children}
95
+ </div>
96
+ <div
97
+ style={{
98
+ display: 'flex',
99
+ gap: 16,
100
+ paddingLeft: 16,
101
+ marginTop: 12,
102
+ }}
103
+ >
104
+ {labels.map((label) => (
105
+ <div
106
+ key={label}
107
+ style={{
108
+ flex: 1,
109
+ textAlign: 'center',
110
+ color: COLOR_MUTED,
111
+ fontSize: 20,
112
+ }}
113
+ >
114
+ {label}
115
+ </div>
116
+ ))}
117
+ </div>
118
+ </div>
119
+ );
120
+
121
+ export const MyAnimation = () => {
122
+ const frame = useCurrentFrame();
123
+ const {fps, height} = useVideoConfig();
124
+
125
+ const data = [
126
+ {month: 'Jan', price: 2039},
127
+ {month: 'Mar', price: 2160},
128
+ {month: 'May', price: 2327},
129
+ {month: 'Jul', price: 2426},
130
+ {month: 'Sep', price: 2634},
131
+ {month: 'Nov', price: 2672},
132
+ ];
133
+
134
+ const minPrice = 2000;
135
+ const maxPrice = 2800;
136
+ const priceRange = maxPrice - minPrice;
137
+ const chartHeight = height - 280;
138
+ const yAxisSteps = [2000, 2400, 2800];
139
+
140
+ return (
141
+ <AbsoluteFill
142
+ style={{
143
+ backgroundColor: COLOR_BG,
144
+ padding: 60,
145
+ display: 'flex',
146
+ flexDirection: 'column',
147
+ fontFamily,
148
+ }}
149
+ >
150
+ <Title>Gold Price 2024</Title>
151
+
152
+ <div style={{display: 'flex', flex: 1}}>
153
+ <YAxis steps={yAxisSteps} height={chartHeight} />
154
+ <XAxis height={chartHeight} labels={data.map((d) => d.month)}>
155
+ {data.map((item, i) => {
156
+ const progress = spring({
157
+ frame: frame - i * 5 - 10,
158
+ fps,
159
+ config: {damping: 18, stiffness: 80},
160
+ });
161
+
162
+ const barHeight =
163
+ ((item.price - minPrice) / priceRange) * chartHeight * progress;
164
+
165
+ return (
166
+ <Bar key={item.month} height={barHeight} progress={progress} />
167
+ );
168
+ })}
169
+ </XAxis>
170
+ </div>
171
+ </AbsoluteFill>
172
+ );
173
+ };