Agent skill

Godot Autoload Architecture

by thedivergentai in thedivergentai/GD-Agentic-Skills

Expert patterns for Godot AutoLoad (singleton) architecture including global state management, scene transitions, signal-based communication, dependency injection, autoload initialization order, and…

LGPL-3.0Auto-check passedGame Development

Install Godot Autoload Architecture

skills CLI
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-autoload-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thedivergentai/GD-Agentic-Skills godot-autoload-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/godot-autoload-architecture .claude/skills/godot-autoload-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
godot-autoload-architecture
GitHub stars
821
Token cost
~3.4k tokens
SKILL.md length
1,056 words
Files
22 (incl. scripts, references)
Skills in repo
98
Repo updated
First seen
Licence
LGPL-3.0

At a glance

Expert patterns for Godot AutoLoad (singleton) architecture including global state management, scene transitions, signal-based communication, dependency injection, autoload initialization order, and…

  • Works in 5 steps: Boot order & dependency diagram → Service locator (non-Node DI) → Event bus vs state holder → …
  • Audio controllers
  • SKILL.md covers Available Scripts, NEVER Do in AutoLoad…, When to Use AutoLoads and Expert Architecture Patterns, plus 3 more sections
  • Cross-scene resources

What it does

Godot Autoload Architecture is an agent skill from thedivergentai/GD-Agentic-Skills. 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.

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts and reference files (for example `references/autoload-patterns.md`, `references/expert-patterns.md` and `references/migration-notes.md`).

It sits in Game Development, covering Game development, State management and Design patterns. It works with Godot. The repository describes itself as: The official "Long-Term Memory" for Godot 4.7+ AI Agents. A high-density library of 99 expert skills and 27 genre blueprints, providing audited, strictly typed GDScript patterns… The licence is LGPL-3.0.

When your agent uses it

  • Audio controllers
  • Cross-scene resources
  • Keywords: AutoLoad
  • SceneTransitioner

Example prompts

  • “/godot-autoload-architecture”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Boot order & dependency diagram
  2. Service locator (non-Node DI)
  3. Event bus vs state holder
  4. Safe scene switching from Autoload
  5. Health checks

What it can do on your machine

Read from SKILL.md and the folder at commit 4c4d0ff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 15 files in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.godotengine.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Godot Autoload Architecture loads about 3.4k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 120 tokens; SKILL.md has 1,056 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from thedivergentai/GD-Agentic-Skills at commit 4c4d0ff, republished under its LGPL-3.0 licence (© thedivergentai). 1,056 words, ~3,402 tokens.

Download SKILL.mdSave it as .claude/skills/godot-autoload-architecture/SKILL.md (or your agent's skills folder). This skill also uses 21 other files; get the full folder from GitHub.
name
godot-autoload-architecture
description
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, global_state, autoload_order, signal_bus, dependency_injection.

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 a static var in a class_name script 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_scene is accurate in _ready() — In Autoloads, the active scene might still be initializing. Access it via get_tree().root.get_child(-1).
  • NEVER skip process_mode configuration — If your global console or music manager needs to work while the game is paused, set process_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.

mermaid
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-management for threaded loads.

5. Health checks

MANDATORY in debug/CI: singleton_health_check_test.gd / autoload_reference_checker.gd — assert presence + Engine.has_singleton for 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: RefCounted services avoid SceneTree overhead; register via Engine.register_singleton and 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_scene in _ready() — WHY: active scene may still be mounting; use get_tree().root.get_child(-1) or defer until scene ready.

Deep recipes (on demand)

TopicReference / script
Service locator / boot diagram / health checksexpert-patterns.md
Beginner registration onlyautoload-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.

Show full SKILL.md (425 more words)Show less
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_scene can 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_ALWAYS for consoles, music, and managers that must run while get_tree().paused.
  • Overridable functions — _init vs _ready timing 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_singleton for lightweight service locators that are not SceneTree Nodes.
  • Thread-safe APIs — Which engine APIs need Mutex/call_deferred when background threads touch global Autoload state.
  • Saving games — Persistence patterns for inventory/settings held in long-lived Autoload data holders.
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.

© thedivergentai, LGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 21 other files (scripts, references) in skills/godot-autoload-architecture of thedivergentai/GD-Agentic-Skills.

  • SKILL.md
  • references/autoload-patterns.md
  • references/expert-patterns.md
  • references/migration-notes.md
  • scripts/autoload_bootstrapper.gd
  • scripts/autoload_init_order_diag.gd
  • scripts/autoload_initializer.gd
  • scripts/autoload_reference_checker.gd
  • scripts/cross_autoload_comms.gd
  • scripts/debug_console_autoload.gd
  • scripts/global_event_bus.gd
  • scripts/global_game_state.gd
  • scripts/lazy_loaded_singleton.gd
  • scripts/persistent_data_holder.gd
  • scripts/safe_scene_switcher.gd
  • scripts/service_locator.gd
  • scripts/service_registry.gd
  • scripts/singleton_dependency_diagram.gd
  • scripts/singleton_health_check_test.gd
  • … and 3 more

Open the folder on GitHubat commit 4c4d0ff

Compare with similar skills

Godot Autoload Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Godot Autoload Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Godot Autoload Architecture this skillthedivergentai/GD-Agentic-Skills821—~3.4kAutomated safety check: PassLGPL-3.0
Dependency Injectionjame581/GodotPrompter805—~2.8kAutomated safety check: PassMIT
Component Systemjame581/GodotPrompter805—~3.3kAutomated safety check: PassMIT
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
Godot UI Integrationzimo-xiao-zheng/godot-ui-integration285—~1.5kAutomated safety check: PassMIT

Similar skills

  • Dependency Injection

    jame581/GodotPrompter

    A skill your agent uses when managing dependencies between systems — autoloads, service locators, @export injection, and scene injection patterns

    805 GitHub stars~2.8k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Component System

    jame581/GodotPrompter

    A skill your agent uses when building reusable node components — composition patterns, component communication, and interface design

    805 GitHub stars~3.3k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 4 days ago
    Game DevelopmentAuto-check passed
  • Godot UI Integration

    zimo-xiao-zheng/godot-ui-integration

    Build or revise Godot UI from an approved design, separated art, or a visual reference when scene structure, gameplay binding, and runtime visual verification all matter.

    285 GitHub stars~1.5k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot Wechat Minigame Adapter

    godothub/godot-minigame

    Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout.

    187 GitHub stars~1.5k tokensUpdated 25 days ago
    Game DevelopmentAuto-check passed

More from thedivergentai/GD-Agentic-Skills

All 98 skills in this repo
  • Godot 2D Animation

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs.

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot 3D World Building

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 3D level design using GridMap with MeshLibrary, CSG constructive solid geometry, occlusion, and runtime GridMap builders.

    821 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 2D To 3D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for migrating 2D games to 3D including node type conversions, camera systems (third-person, first-person, orbit), physics layer migration, sprite-to-model art pipeline, and control…

    821 GitHub stars~4.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 3D To 2D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for simplifying 3D games to 2D including dimension reduction strategies, 2.5D fake-depth, isometric ports, camera flattening, physics conversion, 3D-to-sprite art pipeline, and…

    821 GitHub stars~4.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Agent Vision

    thedivergentai/GD-Agentic-Skills

    Agentic eyes for Godot work: cross-platform screenshot CLI (asset/region/window/screen) to budgeted WebP, TEMP editor viewport bridge under .gdskills/, and Taste Receptor Atlas v2 (~237…

    821 GitHub stars~3.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Animation Tree Mastery

    thedivergentai/GD-Agentic-Skills

    Expert patterns for AnimationTree including StateMachine transitions, BlendSpace2D for directional movement, BlendTree for layered animations, root motion, transition conditions, advance…

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Godot Autoload Architecture

What does Godot Autoload Architecture do?

Expert patterns for Godot AutoLoad (singleton) architecture including global state management, scene transitions, signal-based communication, dependency injection, autoload initialization order, and…. Godot Autoload Architecture is an agent skill from thedivergentai/GD-Agentic-Skills. 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.

When should I use Godot Autoload Architecture?

Godot Autoload Architecture fits situations like: audio controllers; cross-scene resources; keywords: AutoLoad; sceneTransitioner.

How do I install Godot Autoload Architecture in Claude Code?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-autoload-architecture -a claude-code`. Or copy the skill folder (skills/godot-autoload-architecture in thedivergentai/GD-Agentic-Skills) into .claude/skills/godot-autoload-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Godot Autoload Architecture in Codex?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-autoload-architecture -a codex`. Or copy the skill folder (skills/godot-autoload-architecture in thedivergentai/GD-Agentic-Skills) into .agents/skills/godot-autoload-architecture in your project. Codex loads it when a task matches its description.

Can I use Godot Autoload Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-autoload-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/godot-autoload-architecture, .gemini/skills/godot-autoload-architecture, .github/skills/godot-autoload-architecture and .opencode/skills/godot-autoload-architecture in your project.

What does Godot Autoload Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Godot Autoload Architecture is instructions for the agent only.

Does Godot Autoload Architecture access the network?

SKILL.md names 1 domain. As links in the text: docs.godotengine.org. This is read from the text; nothing was executed.

Is Godot Autoload Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Godot Autoload Architecture use?

Godot Autoload Architecture is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Godot Autoload Architecture use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Godot Autoload Architecture?

Skills that share tags, products or a category with Godot Autoload Architecture: Dependency Injection (jame581/GodotPrompter, 805 stars), Component System (jame581/GodotPrompter, 805 stars), Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars) and 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Godot Autoload Architecture?

thedivergentai (a GitHub user) maintains it in thedivergentai/GD-Agentic-Skills, which has 821 GitHub stars. The repository holds 98 skills in this directory. The repository was last updated on September 9, 2026.

Source: thedivergentai/GD-Agentic-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.