data-manager

Manage Phaser 4 DataManager data across objects, scenes, and global registry.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/kehwar/pixi-square --skill data-manager-kehwar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-manager
Source: https://github.com/kehwar/pixi-square/tree/main/.agents/skills/data-manager
Command: npx skills add https://github.com/kehwar/pixi-square --skill data-manager-kehwar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Phaser game development often suffers from scattered, hard-to-track state across objects, scenes, and global state. This skill centralizes data management using Phaser 4 DataManager, enabling consistent storage, retrieval, and reactive updates.

Core Features & Use Cases

  • Centralized per-object, per-scene, and global data storage via DataManager.
  • Event-driven data changes with the ability to listen for changedata events and merge/remove data safely.
  • Real-world use: track player stats on sprites, level scores in the registry, and scene-specific state with reactive updates.

Quick Start

Create and manage data across objects, scenes, and the global registry using the DataManager API.

Frequently Asked Questions about data-manager

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

FAQPage Schema
How do I manage game state across objects, scenes, and the global registry in Phaser 4?

To manage Phaser game state, you can use the Phaser 4 DataManager to set, get, merge, and remove data across per-object, per-scene, and global scopes. It provides a unified API for consistent storage and reactive updates.

How do I listen for data changes on a Phaser game object?

You can listen for data changes on a Phaser game object using the DataManager's event routing, which fires changedata events. This allows your game to reactively respond when values are updated, merged, or removed from specific objects or scenes.

Can I merge and freeze data values in a Phaser scene?

Yes, you can merge and freeze data values in a Phaser scene. The DataManager API implements the full set of operations including merge to combine data, freeze to lock values, and reset to clear state within your game.

What is the best way to track player stats and scene-specific state in Phaser?

The best way to track player stats and scene-specific state in Phaser is centralizing data management with the DataManager. Store sprite stats per-object, level scores in the global registry, and handle scene state with event-driven reactive updates.

Does the Phaser 4 DataManager support persistence patterns for game data?

Yes, the Phaser 4 DataManager supports persistence patterns for game data. Alongside core operations like set, get, inc, toggle, and remove, it provides a values proxy and routing to help persist your game state effectively.