migrate-sdk6-to-sdk7
Installation
SKILL.md
Migrate a Decentraland SDK6 Scene to SDK7
This is a porting skill, not a scaffolding skill. It assumes an existing SDK6 project on disk. For a brand-new SDK7 scene, use [[create-scene]].
RULE: Verify it really is SDK6 before doing anything
Inspect these files in this order. ALL of the SDK6 signals must be present before treating the project as SDK6 — partial matches usually mean a half-migrated project that needs a different approach.
| Check | SDK6 signal | SDK7 signal |
|---|---|---|
package.json dependencies |
decentraland-ecs |
@dcl/sdk |
package.json scripts |
build-ecs, dcl start |
sdk-commands start, sdk-commands build |
scene.json |
No runtimeVersion, or ecs7 missing |
"runtimeVersion": "7" and/or "ecs7": true |
| Source code imports | No explicit @dcl/sdk/ecs import — symbols (Entity, Transform, Vector3, engine) are globals |
Most things imported from @dcl/sdk/ecs and @dcl/sdk/math |
| Source code patterns | new Entity(), entity.addComponent(...), @Component('name'), class X implements ISystem, OnPointerDown, GLTFShape, Input.instance |
engine.addEntity(), Transform.create(entity, ...), engine.defineComponent(...), pointerEventsSystem.onPointerDown, GltfContainer |
RULE: Do NOT change scene.json's main field
Keep the main value the SDK6 project already had (typically "bin/game.js"). The SDK7 default for new scenes is bin/index.js, but sdk-commands build writes the bundle to whatever path scene.json main names (verified: sdk-commands bundle.ts sets the output file from sceneJson.main) — so an existing bin/game.js keeps working with no changes. Do NOT rename it to bin/index.js unless the user explicitly asks.