/godot-dev:godot-scene-flowfrom godot-dev
Provides patterns and reusable scripts for Godot game flow: autoload singletons, scene changes with loading screens, pause, save/load to user://, checkpoints, and object pools.
Ships in godot-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Autoloads hold what outlives a scene; everything else is loaded, changed and freed. Most flow bugs are one of three: code that runs in a scene that is already freed, a value read before the scene change finishes, or a save that comes back with different types than it left with.
| The situation | Read |
|---|---|
| What belongs in an autoload; GameState; an autoload a SceneTree script or a test cannot name | reference/autoloads.md |
"Go to the next level"; a loading screen with progress; current_scene is null after a change | reference/loading.md · resources/scene_loader.gd |
| Pause: something keeps moving behind the menu, or the menu itself froze; a timer that fires while paused | reference/loading.md → "Pause" |
Saving and loading; a save that comes back as floats; versions and migrations; where user:// is | reference/saving.md · resources/save_store.gd |
| Respawning at a checkpoint; pickups, sparks or shots spawned many times a second | reference/pools-checkpoints.md · resources/node_pool.gd |
| The pause menu, the loading screen's layout, the HUD that listens to GameState | godot-ui |
| Scene and resource text, ids, building a scene in code | godot-scene-files |
The [autoload] and run/main_scene lines of a new project | godot-new-project |
Typed GDScript, signals and await in general | godot-gdscript |
| Proving the change runs headless, the verdict | godot-verify |
Copy resources/ into the project (say res://flow/); none of the four depends on another or
on its own path, so any folder works.
| File | What it is | Register |
|---|---|---|
resources/game_state.gd | run state: route, parcels delivered, checkpoint; to_save() / from_save() / migrate_step(); signals parcels_changed, checkpoint_reached, run_reset | autoload GameState="*res://flow/game_state.gd" |
resources/scene_loader.gd | threaded scene change: change_scene(path), signals progress_changed, scene_ready, load_failed; runs while paused | an autoload under your own name, or a child of the root |
resources/save_store.gd | versioned JSON slots (atomic write, migrations, refusals) and Resource slots (cache-safe) | preload, no global name |
resources/node_pool.gd | acquire() / release() over a fixed set of instances | preload, no global name |
GameState is the courier-run example: rename its fields for the game, keep the shape (data and signals, a save version, one migration step per version).
change_scene_to_file / change_scene_to_packed
-> returns OK at once; current_scene is null from here
-> old scene leaves the tree (its _exit_tree), and is freed with every node and coroutine in it
-> new scene enters the tree, its _ready runs
-> SceneTree.scene_changed fires; current_scene is the new scene
scene_changed, never on N frames. current_scene is still null one frame after
the call.await anything afterwards: its coroutine is dropped when it is freed. Follow-up work belongs
in the new scene's _ready, in GameState, or in the loader's scene_ready.scene_loader.gd checks ResourceLoader.exists first and refuses with ERR_FILE_NOT_FOUND.get_tree().paused = true stops every node whose process_mode resolves to pausable, which by
inheritance is everything:
| Node | process_mode |
|---|---|
| gameplay: courier, sentries, gates | PROCESS_MODE_INHERIT (the default) |
| the pause menu and its children | PROCESS_MODE_WHEN_PAUSED |
| the scene loader, a music player that keeps playing | PROCESS_MODE_ALWAYS |
| a parked pool instance | PROCESS_MODE_DISABLED |
get_tree().create_timer(t) is not paused by default (process_always is true): gameplay
delays use create_timer(t, false).
user://, in a JSON envelope {"version", "saved_unix", "data"}; save_store.gd writes
a temp file and renames it over the slot, so a crash mid-write keeps the last save.to_save(), check and convert in from_save().GameState.SAVE_VERSION with every change of shape and add a step to migrate_step();
a save from a newer build is refused, never half-read..tres save runs any script embedded in it when loaded: only for files this game wrote.ResourceLoader.CACHE_MODE_IGNORE: the default returns the instance
still in memory, with the old values.checkpoint_marker = &"Ledge" survives; a Node
reference is a freed object one change later.paused, the level
owns its pool. A second copy of the parcel count in the HUD is the one that is wrong.GameState.deliver_parcel(1); GameState emits
parcels_changed and never calls into a scene.store.last_error; a missing save on
first launch is normal.scripts/scene_flow_check.py runs these resources in a real Godot, in temp projects outside the
repository, and deletes the temp user:// folder afterwards:
GODOT_BIN=/path/to/Godot python3 scripts/scene_flow_check.py --selftest
python3 scripts/scene_flow_check.py save-info path/to/slot1.json --expect-version 2
GODOT_BIN=/path/to/Godot python3 scripts/scene_flow_check.py user-dir path/to/project
The selftest changes scenes by file and through the loader, refuses a missing scene, changes
while paused (a default node stops, an ALWAYS node and a default create_timer run), respawns
at a checkpoint, reuses a pooled instance, then saves in one process and loads in a second: the
round trip with a random token, a version-1 migration, a too-new and a missing slot refused, a
Resource slot rewritten while held. A third run with the wrong token must fail. Exit 0 pass, 1 a
failed selftest, 2 a failed save-info, 3 no Godot or no sentinel (nothing verified).
The selftest runs on the desktop it is started on: run user-dir and a save round trip on
web, mobile, Linux and Windows targets themselves. A loading screen's look needs a window
(godot-play-harness).
| Not here | Go to |
|---|---|
| Menus, the pause screen, a progress bar's look | godot-ui |
Writing or reading .tscn and .tres text | godot-scene-files |
| Project settings, folders, the main scene | godot-new-project |
Typed GDScript, signals, await, warnings as errors | godot-gdscript |
| Unit tests of save logic | godot-testing |
| Booting straight into a moment of the game, journeys | godot-play-harness |
| Frame time of spawning with and without a pool | godot-profiling |
reference/autoloads.md (opens in a new tab)reference/loading.md (opens in a new tab)reference/pools-checkpoints.md (opens in a new tab)reference/saving.md (opens in a new tab)resources/game_state.gd (opens in a new tab)resources/node_pool.gd (opens in a new tab)resources/save_store.gd (opens in a new tab)resources/scene_loader.gd (opens in a new tab)scripts/scene_flow_check.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
godot, scene-management, save-system, object-pooling, game-flow
Other plugins' skills for the same job
28 skills in this plugin
/godot-2d-controllerMove a 2D character in Godot: CharacterBody2D jump, coyote time, jump buffer, slopes, one-way and moving platforms, top-down movement./godot-2d-renderingGodot 2D look: draw order, z_index and y-sort, CanvasLayer, 2D lights and shadows, canvas shaders, Parallax2D, pixel-perfect scaling./godot-2d-rigA layered 2D character into Godot: rig2d.json to Skeleton2D, Bone2D and weighted Polygon2D parts, cut-out animation, 2D IK./godot-2d-spritesSprite frames into Godot: frames.json to SpriteFrames, AnimatedSprite2D, sheet slicing, pivots, filtering and import for pixel art./godot-3d-controllerMove a 3D character in Godot: CharacterBody3D grounding, slopes and steps, third and first person, lane runner, click-to-move./godot-3d-modelsBring a glTF model into Godot: import settings, post-import script, materials, LODs, collision; audit it against a triangle and texture budget.npx claudepluginhub tipoli5890/game-studio --plugin godot-dev