studio-config-option-lifecycle

Classify Remotion Studio config options as startup-fixed or reloadable.

57.9k|4.4k|Updated Jun 23, 2020
One-click install
npx skills add https://github.com/remotion-dev/remotion --skill studio-config-option-lifecycle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: studio-config-option-lifecycle
Source: https://github.com/remotion-dev/remotion/tree/main/.agents/skills/studio-config-option-lifecycle
Command: npx skills add https://github.com/remotion-dev/remotion --skill studio-config-option-lifecycle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a new Remotion Studio config option without a clear reload lifecycle causes inconsistent behavior across the preview server, compiler, HTML bootstrap, public-folder watcher, and render queue. This Skill enforces a single classification per option so every consumer observes the same value at the right boundary.

Core Features & Use Cases

  • Lifecycle Classification: Assigns each Studio config option as startup-fixed or reloadable based on whether initialized resources must be recreated.
  • Wiring Patterns: Provides concrete patterns for passing resolved values or getters through startStudio(), startServer(), and StudioRenderJobFixedConfig.
  • Conflict Resolution: Detects mixed-lifecycle consumers and forces the stricter startup-fixed classification across all of them.
  • Use Case: When adding a new CLI flag consumed by the Studio preview server and render queue, use this Skill to decide whether the flag must be captured at startup or can be re-read on browser reload.

Quick Start

Use the studio-config-option-lifecycle skill to classify and wire a new Remotion Studio config option with explicit reload behavior.

Frequently Asked Questions about studio-config-option-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a Remotion Studio config option reloadable?

Pass a getter that retains CLI precedence through `startStudio()` and invoke it only at the intended reload boundary, such as generating Studio HTML after the `config-file-changed` browser reload. Every Studio consumer must be able to observe the new value without recreating initialized resources.

What is the difference between startup-fixed and reloadable Studio options?

Startup-fixed options require recreating a server, compiler, watcher, or directory mapping when the value changes, so they are resolved once in `packages/cli/src/studio.ts` before `startStudio()`. Reloadable options can be re-read at a deliberate request boundary without rebuilding initialized resources.

Can a single Studio config option be startup-fixed for one consumer and reloadable for another?

No. If any Studio consumer requires startup-fixed behavior, the option must be startup-fixed for all consumers. Mixed lifecycle behavior is explicitly prohibited because already-created consumers cannot observe updated module state.

Why does my Studio config change not take effect after reload?

The consumer likely captured the value at startup and never re-read it. Verify whether the option is startup-fixed and ensure the new value is threaded through `StudioRenderJobFixedConfig` or a getter invoked at the reload boundary.

How do I reset a custom Studio config option on reload?

Add an explicit reset in `ConfigInternals.resetConfigOptions()` for custom module state. Options registered through `BrowserSafeApis.options` are reset automatically by `resetBrowserSafeConfigOptions()`, which runs before the changed config file executes.

When should I use `StudioRenderJobFixedConfig` instead of a getter?

Use `StudioRenderJobFixedConfig` for startup-fixed render settings captured at the Studio queue boundary. Do not call `option.getValue()` from the job processor because config state may have changed since Studio startup.