smithery/babybirdprd

director-rhai

Author Rhai scripts for the Director video engine. Use this when the user asks to create or edit video scripts, animations, or cinematic transitions.

Installation

$ npx skills add smithery/babybirdprd --skill director-rhai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/babybirdprd.

npx skills add smithery/babybirdprd

Browse all from smithery/babybirdprd

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,404 B
  • docs SUMMARY.md 170 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Director Rhai Skill

This skill enables the creation of high-performance video scripts using the Director engine's Rhai API. It leverages Skia for rendering and Taffy for layout.

Goal

To author valid, efficient, and visually rich Rhai scripts that the Director engine can execute to generate video frames or full exports.

Instructions

  1. Initialize the Director: Every script MUST start by creating a Movie object.

- let movie = new_director(1920, 1080, 30); (Width, Height, FPS)

  1. Add Scenes: Movies are composed of scenes.

- let scene = movie.add_scene(5.0); (Duration in seconds)

  1. Add Nodes: Scenes contain hierarchical nodes (Box, Text, Image, Video).

- let box = scene.addbox(#{ ... }); - let text = scene.addtext(#{ content: "Hello", ... });

  1. Layout: Use Flexbox or Grid properties in the props map (e.g., flexdirection, justifycontent, align_items, gap, padding).
  2. Animate: Nodes support animate, spring, and add_animator.

- node.animate("property", start, end, duration, "easing"[, delay]); - node.spring("property", start, end, #{ stiffness: 100, damping: 10 });

  1. Transitions: Add transitions between scenes.

- movie.addtransition(scene1, scene2, "fade", 1.0, "easein_out");

  1. Return the Movie: The script MUST return the movie object at the end.

- movie

Common Pitfalls

  • Argument Mismatch: Ensure animate has 5 or 6 arguments. Using too many or too few will cause a "Function not found" error at runtime.
  • Timing: Sequences are additive. Multiple animate calls on the same property will play back-to-back. Use the delay argument (6th parameter) to pause before starting an animation.

Constraints

  • Return Value: Always end the script with the movie object. Failure to do so will result in no output.
  • Asset Paths: Use relative paths for assets (e.g., assets/logo.png).
  • Performance: Favor spring for UI-like movements and backout/elasticout for premium-feeling entrances.

References

Consult resources/API_REFERENCE.md for a full list of functions and properties. See examples/ for reference implementation patterns.