# godot-autoload-architecture

A skill about Godot AutoLoad architecture: boot order, event buses, a service locator and the mistakes to skip. Useful once a project has more than one singleton.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 443 installs · ★ 893
- Author: thedivergentai
- License: LGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-autoload-architecture/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-autoload-architecture

## What it does

The skill hands your agent a set of rules plus ready-made scripts for Godot singletons. Among them: `autoload_init_order_diag.gd` for checking boot sequence, `singleton_dependency_diagram.gd` for mapping who may call whom, `global_event_bus.gd` for cross-system events, and `safe_scene_switcher.gd` for scene changes owned by an AutoLoad. Non-Node services go through `service_locator.gd` and `service_registry.gd`, registered with `Engine.register_singleton`.

A large part of the text is a list of things not to do. AutoLoads boot top to bottom in Project Settings, so an upper singleton must not call a lower one from `_ready()`. Circular dependencies between singletons hang Godot on the splash screen. Touching another AutoLoad inside `_init()` is out too, because that neighbour may not exist yet.

Scripts cover data that has to survive `change_scene_to_file()` — inventory, settings — and lazy instantiation when eager boot cost hurts. For background threads that read or write global state there is `thread_safe_global_access.gd` with a mutex and `call_deferred`. Registration and default-value checks live in `autoload_reference_checker.gd` and `singleton_health_check_test.gd`; run those in debug and CI.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-autoload-architecture -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/godot-autoload-architecture/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/godot-autoload-architecture/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-autoload-architecture -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/godot-autoload-architecture/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-autoload-architecture -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-autoload-architecture/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install thedivergentai/Game-Dev-Agentic-Skills godot-autoload-architecture
```

2. **Manually: put the files in place**
- File: `.github/skills/godot-autoload-architecture/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-autoload-architecture -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/thedivergentai/Game-Dev-Agentic-Skills --path skills/godot-autoload-architecture
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/godot-autoload-architecture/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-autoload-architecture -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-autoload-architecture/SKILL.md

## When to use it
- lay out AutoLoad boot order without hitting a null in `_ready()`
- separate an event bus from mutable run state
- switch scenes from a singleton without dangling references
- register a non-Node service with `Engine.register_singleton` and drop it in `_exit_tree`
- keep inventory and settings alive across a scene change

## Example prompts
- Check the AutoLoad boot order in this project and flag any upper singleton that calls a lower one in `_ready()`
- Set up an event bus for achievements, UI and save events using `global_event_bus.gd`
- Move scene transitions into an AutoLoad with `safe_scene_switcher.gd` instead of freeing nodes by hand

## Similar
- [orbit-card](https://affpapa.org/en/nevibecode/skills/orbit-card.md) — skill · 10000 installs
- [cad](https://affpapa.org/en/nevibecode/skills/cad.md) — skill · 14000 installs
- [step-parts](https://affpapa.org/en/nevibecode/skills/step-parts.md) — skill · 11200 installs
- [sdf](https://affpapa.org/en/nevibecode/skills/sdf.md) — skill · 10500 installs
- [urdf](https://affpapa.org/en/nevibecode/skills/urdf.md) — skill · 10500 installs
- [hatch-pet](https://affpapa.org/en/nevibecode/skills/hatch-pet.md) — skill · 3300 installs

From the same set: [thedivergentai/game-dev-agentic-skills](https://affpapa.org/en/nevibecode/by/thedivergentai/game-dev-agentic-skills.md) — 61 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
