script-components

Write TypeScript script classes for Creator Hub Script components attached to Decentraland entities.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/stom66/dcl-bowling --skill script-components-stom66
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: script-components
Source: https://github.com/stom66/dcl-bowling/tree/main/agent/skills/script-components
Command: npx skills add https://github.com/stom66/dcl-bowling --skill script-components-stom66

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing reusable scripted entities for Decentraland Creator Hub scenes requires following non-obvious rules about file placement, constructor signatures, execution priority, and parameter serialization, and mistakes silently break the Creator Hub UI or scene behavior. ## Core Features & Use Cases - Script Class Authoring: Defines the required class structure with src and entity constructor parameters, optional start() and update(dt) lifecycle methods, and typed configurable parameters exposed in the Creator Hub UI. - Execution Priority Guidance: Explains how the Script component priority field maps to engine system ordering so scripts can run before or after regular systems, including physics stepping use cases. - Actions and Inter-Script Communication: Covers @action JSDoc tags, ActionCallback parameters, and the ~sdk/script-utils helpers for calling methods on other script instances. - Use Case: A creator wants a reusable smart item like a treasure chest or clap meter that users can drop into any scene, configure in the Creator Hub UI, and wire to other items via actions. ## Quick Start Write a Creator Hub Script component class for a rotating entity with configurable speed and place it in assets/scripts following the required structure.

Frequently Asked Questions about script-components

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

FAQPage Schema
How do I write a Script component file for Decentraland Creator Hub?▼

Create a .ts file in assets/scripts exporting a single class whose constructor starts with public src: string and public entity: Entity, followed by typed parameters. Add optional start() and update(dt) methods for load-time and per-frame logic.

Where must Creator Hub script files be placed in a Decentraland scene?▼

Script files must live inside the assets folder, typically assets/scripts/, because the scene tsconfig only includes src/**/* and assets/**/*. Files in a root-level scripts folder are excluded from type checking and the build.

Why did my script parameters and actions disappear from the Creator Hub UI?▼

Using decorator syntax like @action() above a method breaks parsing because the Creator Hub parser has no decorators plugin, silently removing all params and actions. Use only the @action JSDoc tag inside a comment block.

How do I run a script update before regular systems in Decentraland?▼

Raise the Script component priority field above the default 0, for example 1000000, since engine systems run highest-priority-first. Priority 0 scripts run last each frame, after regular systems at priority 100000.

Can I pass child entities as Entity parameters to a Creator Hub script?▼

No, entity IDs are not stable across scenes, so child entities of a smart item should be found at runtime by iterating the hierarchy and matching the Name component with a substring like startsWith or includes.