.claude/skills/bootstrapping/SKILL.md
Bootstrapping reference — phase-based application initialization with ordered async phases. Use when modifying startup sequence, adding initialization phases, or understanding app lifecycle.
npx skillsauth add punkfuncgames/tetris-clone bootstrappingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Location: Assets/Scripts/PunkFuncGames/GameTemplate/Runtime/Bootstrapping/ (remains in template shell)
Namespace: PunkFuncGames.GameTemplate.Runtime.Service.Bootstrapping
int Order — execution order (lower = earlier)string Name — for loggingbool IsEnabled — can disable phasesUniTask ExecuteAsync(CancellationToken ct)| Constant | Value | Purpose |
|----------|-------|---------|
| ApplicationConfig | 0 | Frame rate, VSync, cursor |
| PlatformInit | 50 | Steam initialization |
| ServiceInit | 100 | Asset, Audio, Save services |
| LocalizationInit | 150 | Language detection + loading |
| SaveData | 200 | Load save data, apply settings |
| Bindings | 300 | Reactive bindings (volume, pause) |
| AssetPreload | 400 | Preload addressable labels |
| SceneLoad | 500 | Load initial gameplay scene |
| Finalize | 1000 | Final cleanup |
ApplicationConfigPhase (Order 0) — GameSettings → target FPS, VSync, timeScale, cursor
PlatformInitPhase (Order 50) — ISteamService (optional) → Steam init
ServiceInitPhase (Order 100) — IAssetService, AudioService, ISaveService → sequential async init
LocalizationPhase (Order 150) — ILocalizationService (optional) → language init
SaveDataPhase (Order 200) — ISaveService, IVolumeService → load save, apply audio settings
BindingsPhase (Order 300, IDisposable) — Reactive bindings:
IAssetService → preload labeled assets with progress
SceneLoadPhase (Order 500) — ISceneService, IGameStateService → load MainMenu or stay in editor sceneDependencies: GameSettings, IEnumerable<IBootstrapPhase>, IGameStateService
InitializingOrder(ILogService logService)protected abstract UniTask OnExecuteAsync(CancellationToken ct)// Register phases (ILogService is auto-injected via DI)
builder.Register<ApplicationConfigPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
builder.Register<PlatformInitPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
builder.Register<ServiceInitPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
builder.Register<LocalizationPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
builder.Register<SaveDataPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
builder.Register<BindingsPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
builder.Register<AssetPreloadPhase>(Lifetime.Singleton)
.WithParameter("assetLabels", Array.Empty<string>())
.As<IBootstrapPhase>();
builder.Register<SceneLoadPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
// Register orchestrator
builder.RegisterEntryPoint<BootstrapOrchestrator>().As<IAsyncStartable>();
public sealed class MyCustomPhase : BootstrapPhaseBase
{
private readonly IMyService _service;
public override int Order => BootstrapOrder.Bindings + 10; // After bindings
public override string Name => "MyCustomInit";
public MyCustomPhase(ILogService logService, IMyService service) : base(logService)
{
_service = service;
}
protected override async UniTask OnExecuteAsync(CancellationToken ct)
{
await _service.InitializeAsync(ct);
}
}
// Register in ProjectLifetimeScope
builder.Register<MyCustomPhase>(Lifetime.Singleton).As<IBootstrapPhase>();
development
WalletModule reference — currency management with BigDouble support, reactive properties, caps, lifetime stats, and persistence. Use when working with currencies, wallets, or financial systems.
development
UnlockConditionModule reference — composable unlock conditions using ScriptableObjects with AND/OR/NOT logic, stat/currency/upgrade/prestige/gamestate/boolean checks, reactive service layer with progress tracking. Use when implementing unlock systems, gating, or progression requirements.
development
UndoModule reference — command pattern with undo/redo stacks, command merging, and reactive state. Use when implementing undo/redo, undoable actions, or command patterns.
tools
Unity UI Toolkit reference — UXML documents, USS styling, MVVM pattern (ViewModel + Presenter), custom VisualElements, responsive layout, animations, performance guidelines, and complete Figma-to-UI-Toolkit property mapping. Use when building or modifying UI with UI Toolkit, creating UXML/USS files, writing ViewModels or Presenters, designing screens/panels/components, or converting Figma designs to UI Toolkit.