advanced-game-bootstrapper
Standardizes Unity game startup to ensure all global systems initialize in the correct order.
Install
mkdir -p .claude/skills/advanced-game-bootstrapper && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13786" && unzip -o skill.zip -d .claude/skills/advanced-game-bootstrapper && rm skill.zipInstalls to .claude/skills/advanced-game-bootstrapper
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Implements the Bootstrap Scene pattern. Guarantees deterministic initialization of global systems before gameplay starts.Key capabilities
- →Implement the Bootstrap Scene pattern in Unity
- →Guarantee deterministic initialization of global systems
- →Eliminate race conditions during game startup
- →Replace static singletons with proper architecture
- →Integrate loading screens during async initialization
- →Define initialization order for game managers
How it works
The skill implements a Bootstrap Scene pattern where a dedicated scene loads all game managers in a deterministic order before gameplay, using interfaces like IInitializable and a GameBootstrapper to orchestrate the sequence.
Inputs & outputs
When to use advanced-game-bootstrapper
- →Initialize game managers deterministically
- →Fix race conditions during scene loading
- →Set up a clean game architecture
About this skill
Advanced Game Bootstrapper
Overview
Eliminate "Singleton Hell" and race conditions during game startup. The game MUST start from a specialized Bootstrap scene that loads all Managers (Sound, Save, Network) in deterministic order before showing any UI or Gameplay.
When to Use
- Use when starting a new Unity project
- Use when experiencing race conditions between managers
- Use when "Manager X not ready" errors occur on scene load
- Use when replacing scattered static singletons with proper architecture
- Use when implementing async initialization (loading screens)
Architecture
┌─────────────────────────────────────────────────────────────┐
│ BUILD INDEX 0 │
│ BOOTSTRAP SCENE │
├─────────────────────────────────────────────────────────────┤
│ GameBootstrapper (DontDestroyOnLoad) │
│ ├── AudioManager (order: 0) │
│ ├── SaveManager (order: 5) │
│ ├── NetworkManager (order: 10) │
│ └── AnalyticsManager (order: 15) │
├─────────────────────────────────────────────────────────────┤
│ [Optional] Loading Screen UI │
└─────────────────────────────────────────────────────────────┘
↓
MAIN MENU SCENE
↓
GAMEPLAY SCENE
Components
| Component | Purpose |
|---|---|
IInitializable | Interface for async initialization with ordering |
IShutdownable | Interface for clean shutdown on quit |
GameBootstrapper | Orchestrates initialization sequence |
BaseManager | Abstract base for all global managers |
Procedure
- Create Bootstrap Scene: New scene, set as Build Index 0
- Generate Components: Create
IInitializable.cs,GameBootstrapper.cs,BaseManager.cs - Create Managers: Inherit from
BaseManagerfor each system - Configure Order: Set
InitializationOrder(0-10: core, 11-50: gameplay, 51+: UI) - Assign References: Drag managers to GameBootstrapper in inspector
Best Practices
- ✅ Always use
async/awaitfor initialization that may take time - ✅ Implement
IShutdownablefor managers that need cleanup - ✅ Use
InitializationOrderto enforce dependencies - ✅ Keep Bootstrap scene as lightweight as possible
- ✅ Show loading progress to users during initialization
- ❌ NEVER use
Awake/Startfor cross-manager dependencies - ❌ NEVER use static singletons (use DI or service locator instead)
- ❌ NEVER skip the bootstrap scene in builds
Testing Protocol
| Mode | Approach |
|---|---|
| Production | Always start from Bootstrap scene |
| Editor (Scene) | Create EditorBootstrap prefab with mocked managers |
| Unit Tests | Mock IInitializable implementations |
Few-Shot Examples
Example 1: Race Condition Fix
User: "The game crashes because AudioManager isn't ready when Player spawns."
Agent:
1. Implement Bootstrap Scene pattern
2. Create AudioManager : BaseManager with order 0
3. Create PlayerSpawner that only runs after bootstrap complete
4. AudioManager guaranteed ready before any gameplay
Example 2: Loading Screen Integration
User: "I want a loading bar while systems initialize."
Agent:
1. Add loading UI prefab to Bootstrap scene
2. Connect to GameBootstrapper._progressBar and _statusText
3. Progress updates automatically during initialization
Example 3: Network + Save Dependencies
User: "SaveManager needs NetworkManager to be ready first."
Agent:
1. NetworkManager.InitializationOrder = 5
2. SaveManager.InitializationOrder = 10
3. Bootstrapper initializes in order: Network → Save
TDD Contract
⚠️ Legacy Skill — Refactor Pending Este skill NO tiene tests automatizados aún. El siguiente boilerplate es un punto de partida.
// Escribe estos tests ANTES de implementar:
// Test 1: should [expected behavior] when [condition]
[Test]
public void AdvancedGameBootstrapper_Should{ExpectedBehavior}_When{Condition}()
{{
// Arrange
// TODO: Setup test fixtures
// Act
// TODO: Execute system under test
// Assert
Assert.Fail("Not implemented — write test first");
}}
// Test 2: should handle [edge case]
[Test]
public void AdvancedGameBootstrapper_ShouldHandle{EdgeCase}()
{{
// Arrange
// TODO: Setup edge case scenario
// Act
// TODO: Execute
// Assert
Assert.Fail("Not implemented");
}}
// Test 3: should throw when [invalid input]
[Test]
public void AdvancedGameBootstrapper_ShouldThrow_When{InvalidInput}()
{{
// Arrange
var invalidInput = default;
// Act & Assert
Assert.Throws<Exception>(() => {{ /* execute */ }});
}}
Pasos para completar el TDD:
- Descomenta los tests above
- Implementa la funcionalidad mínima para que compile
- Ejecuta los tests — deben fallar (RED)
- Implementa la funcionalidad real
- Verifica que los tests pasen (GREEN)
- Refactorea manteniendo los tests verdes
Nota: Este skill fue marcado como tdd_first: false durante la auditoría v2.0.1. La sección TDD fue agregada automáticamente pero requiere customización manual para reflejar el comportamiento real del skill.
Related Skills
@di-container-manager- For injecting bootstrapped managers@event-bus-system- For broadcasting initialization events@scriptableobject-architecture- For configuration data
Template Files
templates/IInitializable.cs.txt- Core interfacetemplates/GameBootstrapper.cs.txt- Main bootstrappertemplates/BaseManager.cs.txt- Manager base class
When not to use it
- →When working on quick bug fixes or minor single-scene changes
- →When the project does not require deterministic manager initialization
Limitations
- →The skill is specific to Unity game development.
- →It focuses on game startup and manager initialization.
- →It requires the Bootstrap scene to be set as Build Index 0.
How it compares
This skill provides a structured architectural pattern for game startup, ensuring all global systems are initialized predictably, which prevents common race conditions and 'Singleton Hell' often found in ad-hoc initialization approaches.
Compared to similar skills
advanced-game-bootstrapper side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| advanced-game-bootstrapper (this skill) | 0 | 5mo | Review | Intermediate |
| vercel-migration-deep-dive | 1 | 25d | Caution | Intermediate |
| backend-development-feature-development | 1 | 4mo | No flags | Advanced |
| full-stack-orchestration-full-stack-feature | 0 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by nlelouche
View all by nlelouche →You might also like
vercel-migration-deep-dive
jeremylongshore
Execute Vercel major re-architecture and migration strategies with strangler fig pattern. Use when migrating to or from Vercel, performing major version upgrades, or re-platforming existing integrations to Vercel. Trigger with phrases like "migrate vercel", "vercel migration", "switch to vercel", "vercel replatform", "vercel upgrade major".
backend-development-feature-development
sickn33
Orchestrate end-to-end backend feature development from requirements to deployment. Use when coordinating multi-phase feature delivery across teams and services.
full-stack-orchestration-full-stack-feature
sickn33
Use when working with full stack orchestration full stack feature
store-module-architecture
TencentBlueKing
Store 研发商店模块架构指南,涵盖插件/模板/镜像管理、版本发布、审核流程、商店市场、扩展点机制。当用户开发研发商店功能、发布插件、管理模板或实现扩展点时使用。
twelve-factor
chloebrett
12-Factor App patterns for deployable applications. Use when configuring environment variables, connecting to backing services, structuring application startup/shutdown, or handling graceful shutdown and process signals. Applies to any deployed application (services, APIs, frontends, workers). Serve
arch-packaging
kubuszok
Load the distribution packaging architecture for SGE games including JVM, browser, native, and Android targets