What problem does it solve?
Game inventory systems frequently lose or duplicate items during pickups, swaps, and saves because transfers are not atomic and item data is scattered across UI and runtime code. This Skill provides a structured playbook for building inventory, equipment, and persistence systems that conserve item identity across every operation.
Core Features & Use Cases
- Typed Item Contract: Defines stable IDs, item definitions, stack limits, equipment compatibility, rarity, and migration versions as a single serializable source of truth.
- Atomic Transfer Transactions: Implements pickup, equip, unequip, swap, drag-and-drop, consume, and sell as validate-compute-commit transactions that never remove an item before confirming a legal destination.
- Accessible Inventory UI: Covers slot compatibility, tooltips, quantity display, failure feedback, and keyboard/touch alternatives to drag-only interactions.
- Use Case: A player drags a sword onto an occupied equipment slot with a full inventory; the Skill's transaction model computes the full swap state, commits it atomically, and persists only after validation, so neither item is lost or duplicated.
Quick Start
Use the build-game-inventory skill to design an inventory and equipment system with atomic swaps, stack rules, and save migration for my game.