
godot-autoload-architecture
Expert patterns for Godot AutoLoad (singleton) architecture including global state management, scene transitions, signal-based communication, dependency injection, autoload initialization order, and anti-patterns to avoid. Use for game managers, save systems, audio controllers, or cross-scene resources. Trigger keywords: AutoLoad, singleton, GameManager, SceneTransitioner, SaveManager, globalstate, autoloadorder, signalbus, dependencyinjection.
- Installs
- 452
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-autoload-architecture- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads godot-autoload-architecture automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Available Scripts
autoload_init_order_diag.gd
MANDATORY before trusting a multi-Autoload dependency graph — verifies boot sequence.
singleton_dependency_diagram.gd
MANDATORY with the mermaid/order diagram — maps who may call whom at boot.
global_event_bus.gd
MANDATORY before a cross-system Autoload bus (Achievements, UI, Save events).
safe_scene_switcher.gd
MANDATORY before Autoload-owned scene transitions (deferred free / root management).
service_locator.gd / service_registry.gd
MANDATORY before Engine.register_singleton DI for non-Node services.
persistent_data_holder.gd
Data that must survive change_scene_to_file() (inventory, settings).
static_state_manager.gd
static var global state when you do not need a SceneTree Node.
lazy_loaded_singleton.gd
On-demand instantiate instead of eager boot cost.
cross_autoload_comms.gd
Safe cross-singleton calls after both are ready.
thread_safe_global_access.gd
Mutex / call_deferred for background threads touching Autoload state.
autoload_reference_checker.gd / singleton_health_check_test.gd
Validate registration + defaults (debug / CI).
autoload_bootstrapper.gd / autoload_initializer.gd
Ordered init helpers when _ready is too early for heavy work.
debug_console_autoload.gd
PROCESS_MODE_ALWAYS CanvasLayer console.
global_game_state.gd / stateless_bus.gd
State holder vs pure event bus split.
NEVER Do in AutoLoad Architecture
- NEVER access AutoLoads in
_init()— AutoLoads are initialized sequentially. Accessing one in_init()may find a null reference. - NEVER modify a Singleton's size or children in
_ready()— If multiple Singletons refer to each other's trees during boot, it can cause layout/sorting errors. - NEVER store highly localized, scene-specific data in AutoLoads — This creates "God Objects" and introduces global side effects that are hard to debug.
- NEVER use
Parent.method()calls from an Autoload — Autoloads sit at the root. They are the ultimate "top". Use signals to talk to the active scene. - NEVER use an Autoload for pure data containers — If you don't need
_process()or signals, use astatic varin aclass_namescript instead. - NEVER create circular dependencies between Singletons — If A needs B and B needs A, Godot will hang during the splash screen.
- NEVER free an Autoload node manually — Removing a singleton from the root can leave dangling references that crash the engine.
- NEVER use AutoLoads for UI elements that aren't global — Popups that only exist in one level should be in that level, not a global singleton.
- NEVER assume
get_tree().current_sceneis accurate in_ready()— In Autoloads, the active scene might still be initializing. Access it viaget_tree().root.get_child(-1). - NEVER skip
process_modeconfiguration — If your global console or music manager needs to work while the game is paused, setprocess_mode = PROCESS_MODE_ALWAYS.
When to Use AutoLoads
Good: Game/Audio/Save managers, SceneTransitioner, global score/inventory, cross-scene EventBus.
Avoid: Scene-specific logic, temporary state, pure data (prefer static / Resource), over-architecting tiny projects.
Expert Architecture Patterns
1. Boot order & dependency diagram
MANDATORY: Read autoload_init_order_diag.gd and singleton_dependency_diagram.gd before drawing or trusting any Autoload order.
Autoloads initialize top → bottom in Project Settings. Upper singletons must not call lower ones in _ready(). Move dependents down the list.
graph TD
subgraph Autoloads [Project Settings order]
B[1. GlobalAudio] --> C[2. ServiceLocator]
C --> D[3. QuestManager]
end
D --> E[Current Scene]
E -->|Queries| C
2. Service locator (non-Node DI)
MANDATORY: service_locator.gd / service_registry.gd before
Engine.register_singleton.
Use for lightweight RefCounted services; unregister in _exit_tree to avoid dangling engine singletons.
3. Event bus vs state holder
MANDATORY: global_event_bus.gd for cross-system past-tense events. Keep mutable run state in persistent_data_holder.gd / global_game_state.gd — not on the bus.
4. Safe scene switching from Autoload
MANDATORY: safe_scene_switcher.gd — deferred free + root ownership. Pair with
godot-scene-managementfor threaded loads.
5. Health checks
MANDATORY in debug/CI: singleton_health_check_test.gd / autoload_reference_checker.gd —
assertpresence +Engine.has_singletonfor registered services.
Expert insights (WHY — keep in body)
- Boot order — WHY: Autoloads init top→bottom in Project Settings. Upper singletons must not call lower ones in
_ready()(autoload_init_order_diag.gd). - Service locator vs Node Autoload — WHY:
RefCountedservices avoid SceneTree overhead; register viaEngine.register_singletonand unregister in_exit_tree(service_locator.gd). - Event bus vs state — WHY: buses emit past-tense events; mutable run state belongs in persistent_data_holder.gd, not on the bus.
current_scenein_ready()— WHY: active scene may still be mounting; useget_tree().root.get_child(-1)or defer until scene ready.
Deep recipes (on demand)
| Topic | Reference / script |
|---|---|
| Service locator / boot diagram / health checks | expert-patterns.md |
| Beginner registration only | autoload-patterns.md |
Reference
Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
Official Documentation
- Singletons (AutoLoad) — How AutoLoads register under
/root, become global names, and why boot order matches Project Settings list order. - Autoloads versus regular nodes — Decision guide for when a global singleton is justified versus a scene-owned node or static helper.
- Scene organization — Keep scene-local data out of AutoLoads so managers do not become God Objects.
- Logic preferences — Prefer signals and ownership edges over reaching into Autoload trees for gameplay orchestration.
- Using SceneTree — Why
current_scenecan be unreliable during Autoload_ready()and how root children relate to the active scene. - Change scenes manually — Deferred free + root reparent patterns behind safe global scene switchers.
- Pausing games —
process_mode/PROCESS_MODE_ALWAYSfor consoles, music, and managers that must run whileget_tree().paused. - Overridable functions —
_initvs_readytiming so cross-Autoload access does not hit nulls during sequential boot. - Using signals — Emit/connect model for Autoload event buses that decouple scenes without hard node paths.
- Engine —
register_singleton/get_singletonfor lightweight service locators that are not SceneTree Nodes. - Thread-safe APIs — Which engine APIs need Mutex/
call_deferredwhen background threads touch global Autoload state. - Saving games — Persistence patterns for inventory/settings held in long-lived Autoload data holders.
Related Skills
Prerequisites
- godot-project-foundations — AutoLoad entries live in Project Settings /
project.godot; get registration and naming right before wiring managers. - godot-gdscript-mastery — Typed signals,
static var/class_name, and deferred calls are the language tools this skill’s patterns assume. - godot-signal-architecture — Event-bus and Signal-Up contracts for Autoload mediators without circular emit chains.
Complements
- godot-scene-management — Pair with safe scene switchers so transitions own loading/unload while AutoLoads keep cross-scene state.
- godot-save-load-systems — Serialize what persistent Autoload holders store; do not invent a second save path inside GameManager.
- godot-resource-data-patterns — Prefer Resources for shared config; reserve AutoLoads for lifecycle + signals, not duplicated data blobs.
- godot-composition — Component ownership alternative when a “manager Autoload” is really scene-scoped behavior in disguise.
- godot-audio-systems — Music/SFX pools are classic Autoload homes; use this skill for ownership and boot order around those managers.
- godot-state-machine-advanced — Global MENU/PLAYING/PAUSED FSMs belong here when the Autoload is only the owner, not the whole game logic dump.
- godot-debugging-profiling — Init-order diagnostics and singleton health checks escalate into debugger/profiler workflows when boot hangs.
Downstream / consumers
- godot-performance-optimization — Escalate when too many Node Autoloads, eager preloads, or per-frame manager work show up in profilers.
- godot-testing-patterns — GUT/CI health checks for registered singletons and reset of global state between tests.
- godot-multiplayer-networking — Global state Autoloads become authority/replication hazards; consume this skill’s DI patterns carefully online.
- godot-inventory-system — Typical consumer of persistent Autoload holders for inventory that must survive
change_scene_to_file().
Master
- godot-master — Library router and mirrored module entry; open when discovering which Domain Skill owns a cross-cutting singleton concern.
FAQ
What does the godot-autoload-architecture skill do?
Expert patterns for Godot AutoLoad (singleton) architecture including global state management, scene transitions, signal-based communication, dependency injection, autoload initialization order, and anti-patterns to avoid. Use for game managers, save systems, audio controllers, or cross-scene resources. Trigger keywords: AutoLoad, singleton, GameManager, SceneTransitioner, SaveManager, globalstate, autoloadorder, signalbus, dependencyinjection.
How do I install godot-autoload-architecture?
Run npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-autoload-architecture in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-autoload-architecture/ (personal) or .claude/skills/godot-autoload-architecture/ (project).
Which AI agents can use godot-autoload-architecture?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is godot-autoload-architecture safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains godot-autoload-architecture?
It is published by thedivergentai in thedivergentai/game-dev-agentic-skills. It has 452 recorded installs.
More from thedivergentai/game-dev-agentic-skills
godot-master
thedivergentai/game-dev-agentic-skills
Consolidated expert library for professional Godot 4.7+ game and application development. Orchestrates 92 Domain Skills through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms, (9) migrating from 4.6 to 4.7. Primary entry point for ALL Godot development tasks. Keywords: Godot 4.7, AreaLight3D, HDR, Asset Store, godot-master.
godot-shaders-basics
thedivergentai/game-dev-agentic-skills
Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.
godot-2d-animation
thedivergentai/game-dev-agentic-skills
Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animationfinished, animationlooped, framechanged, frameprogress, setframeandprogress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).
godot-ui-theming
thedivergentai/game-dev-agentic-skills
Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.
godot-gdscript-mastery
thedivergentai/game-dev-agentic-skills
Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: statictyping, signalarchitecture, uniquenodes, @onready, classname, signalupcalldown, Callable.bind, typedcollections, awaitsequence.
godot-particles
thedivergentai/game-dev-agentic-skills
Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emissionshape, colorramp, subemitter, oneshot.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.