thedivergentai avatar

Godot Autoload Architecture

If you're building anything beyond a single-scene Godot project, you'll eventually need global state that survives scene changes. This covers the full spectrum of AutoLoad patterns, from basic singletons to thread-safe access and lazy loading. The real value is in the "NEVER" section, which catches the common traps like accessing AutoLoads in _init() or creating circular dependencies that hang your game at startup. Includes practical scripts for scene transitions, event buses, and debug consoles. The initialization order diagnostic alone will save you hours if you're running multiple singletons that depend on each other.

skills.sh installs
268
GitHub stars
464
last updated
Aug 21, 2026

Install

$ npx -y skills add thedivergentai/gd-agentic-skills --skill godot-autoload-architecture --agent claude-code

Installs into .claude/skills of the current project.

Files

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.

Sponsors

Details

Repository
github.com/thedivergentai/gd-agentic-skills
Categories
Code Review & Quality, AI & Agent Building, Game Development
First seen
Jun 3, 2026

More from thedivergentai/gd-agentic-skills

All 51
1ninestep avatardocx-formatninestep/docx-format-skilldocx format262skills.sh installs
2octagonai avatarsec-cash-flow-reviewoctagonai/skillsExtract and analyze cash flow trends and working capital changes from SEC filings using Octagon MCP. Use when researching operating cash flow, investing activit262skills.sh installs
3octagonai avatarearnings-competitive-reviewoctagonai/skillsAnalyze management's discussion of competitive landscape, market positioning, and strategic differentiation from earnings call transcripts.261skills.sh installs
4bobmatnyc avatarapi-security-reviewbobmatnyc/claude-mpm-skillsAPI security checklist for reviewing endpoints before deployment. Use when creating or modifying API routes to ensure proper authentication, authorization, and 257skills.sh installs
5yuque avataryuque-personal-style-extractyuque/yuque-pluginyuque personal style extract257skills.sh installs
6pproenca avatarbug-reviewpproenca/dot-skillsUse this skill when a user asks to review a pull request for bugs, wants AI code review focused on correctness issues, or runs /bug-review. Trigger on PR review256skills.sh installs