data-manager

Manage Phaser key-value state with DataManager events across GameObjects, scenes, and registry.

1|Updated May 3, 2026
One-click install
npx skills add https://github.com/WanderTheWeeb/papas_trauma --skill data-manager-wandertheweeb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-manager
Source: https://github.com/WanderTheWeeb/papas_trauma/tree/main/skills/data-manager
Command: npx skills add https://github.com/WanderTheWeeb/papas_trauma --skill data-manager-wandertheweeb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of keeping gameplay state and UI synced by providing event-driven key-value storage across GameObjects, Scenes, and the global registry.

Core Features & Use Cases

  • Per-GameObject data storage with events: attach custom key-value state to sprites and listen for setdata, changedata, changedata-{key}, and removedata.
  • Scene-level data via this.data: manage Scene-scoped state using Phaser.Data.DataManagerPlugin, with changes emitted on the Scene event bus.
  • Global cross-scene state via game.registry: share persistent data across the entire game lifetime and subscribe to registry change events.

Quick Start

Use the data-manager skill to store and react to a sprite's health changes by setting hp and listening for changedata-hp.

Frequently Asked Questions about data-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync Phaser game state with UI when values change?▼

To sync Phaser game state with UI, use event-driven key-value storage via the DataManager API. It emits events like `changedata-{key}` on `setdata` or `inc` operations, allowing reactive UI updates instantly when gameplay state changes.

What is the best way to share persistent state across multiple Phaser scenes?▼

The best way to share persistent state across Phaser scenes is using the global `game.registry`. It provides event-driven key-value storage for the entire game lifetime, emitting change events that cross-scene systems can subscribe to for reactive updates.

Can I attach custom state data directly to a Phaser GameObject and listen for changes?▼

Yes, you can attach custom key-value state to Phaser GameObjects using `setdata`. The GameObject emits `changedata`, `setdata`, and specific `changedata-{key}` events, enabling per-sprite state tracking and reactive updates.

How do I track gameplay state changes using Phaser Scene plugins?▼

Track gameplay state using the Scene-level `this.data` DataManagerPlugin in Phaser. It manages Scene-scoped key-value state and emits change events on the Scene event bus, ensuring local gameplay systems react to `set`, `inc`, `toggle`, and `remove` operations.

Why are my Phaser DataManager events not triggering UI updates correctly?▼

Phaser DataManager events may fail if emitter routing per owner is incorrect. You must correctly handle emitted events, including key-specific `changedata-{key}`, and ensure listeners are attached to the proper GameObject, Scene, or global registry event bus.