Skip to content

77 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic launched as Claude Skills), with a router that loads the right skill for your engine and task. Runs in Claude Code, Cursor, Kiro, Codex, Copilot, Gemini CLI and more.

fix(godot): correct change_scene_to_file timing and add scene_changed

Kiro Crewf7b9d49603ee
diff --git a/skills/godot/godot-nodes-scenes/SKILL.md b/skills/godot/godot-nodes-scenes/SKILL.md
index c84bcc6..db9f3b6 100644
--- a/skills/godot/godot-nodes-scenes/SKILL.md
+++ b/skills/godot/godot-nodes-scenes/SKILL.md
@@ -113,10 +113,13 @@ func go_to_level_2() -> void:
An autoload can't depend on the main scene existing yet.
- **`instance()` was renamed** to `instantiate()` in Godot 4. `preload` runs at parse
time (path must be constant); `load` runs at runtime (path can be a variable).
-- **`change_scene_to_file()` is deferred**, not immediate — Godot swaps and frees the old
- scene at the end of the current frame. Any code after the call still runs against the _old_
- tree, and `get_tree().current_scene` isn't the new scene until next frame. Don't read the new
- scene's nodes on the same line; do it from the new scene's `_ready()`.
+- **`change_scene_to_file()` is deferred, and the old scene leaves the tree at once.** The
+ outgoing scene is removed from the tree immediately (its `get_tree()` now returns `null`,
+ and `get_tree().current_scene` is `null`), then at the end of the frame it is freed and the
+ new scene is added. Code after the call must not touch `get_tree()` from the old scene. To
+ act on the new scene, do it from the new scene's `_ready()`, or from an autoload with
+ `await get_tree().scene_changed` (Godot 4.5+). `change_scene_to_node(node)` (4.5+) swaps
+ in a node you have already instanced and configured.
## References