Generated banner for Build Game Inventory
Generated logo for Build Game Inventory

Build Game Inventory

Meng ToCommunityCreated by Meng To

  • Skill
  • Workflow
  • Software development
  • MIT
  • No issues found

From the author

Build or repair game inventory, loot, equipment, tooltips, drag-and-drop, persistence, and progression systems. Use for item schemas, pickup flows, stack rules, equipment slots, atomic swaps, save migration, and no-loss regression testing.
— the description by Meng To

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a framework for building reliable game inventory systems by emphasizing atomic transactions and a single source of truth for item data. It guides developers through defining item contracts, implementing safe transfer logic for inventory actions, and ensuring UI accessibility. The approach focuses on preventing data loss and duplication by treating every inventory interaction as a validated transaction, ensuring that item identity and state remain consistent across pickups, swaps, and persistence cycles.

What it does

  • Defines item schemas with stable IDs and separated presentation data.
  • Implements inventory transfers as atomic transactions to prevent data loss.
  • Provides guidelines for building accessible, multi-input inventory UIs.
  • Outlines testing strategies for inventory boundaries and schema migrations.
  • Ensures consistent state management during equipment swaps and consumption.

When to use it

  • When designing the core architecture for a game's inventory and loot system.
  • When refactoring existing inventory code to fix bugs related to item duplication or loss.
  • When implementing save/load systems that require robust schema migration.
  • When building complex equipment slot and drag-and-drop mechanics.

Advantages

  • Reduces bugs related to item duplication and loss through atomic transaction logic.
  • Improves maintainability by separating item definitions from UI presentation.
  • Ensures data integrity during complex operations like swaps and migrations.
  • Promotes accessible UI design by supporting multiple interaction methods.

Usage examples

“How should I structure my item data for a new RPG inventory system?”
The skill advises using a single, serializable source of truth where items are referenced by stable IDs, keeping definitions, rarity, and presentation data separate from runtime UI logic.
“What is the best way to handle a drag-and-drop item swap?”
The skill recommends a four-step transaction process: validate ownership and legality, compute the full next state, commit the change, and persist only after successful validation.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/mengto/build-game-inventory/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip build-game-inventory.zip -d .agents/skills

Documentation by Meng To

Build Game Inventory

Use one typed, serializable item source of truth and make every transfer atomic.

Define the item contract

Model stable IDs, item definitions, ownership, stack limits, equipment compatibility, effects, rarity, presentation data, and migration version separately. Runtime UI must reference definitions by ID rather than duplicate stats or descriptions.

Implement transfers as transactions

For pickup, equip, unequip, swap, drag/drop, consume, and sell:

  1. Validate source ownership and destination legality.

  2. Compute the entire next inventory/equipment state.

  3. Commit once or reject without changing either side.

  4. Persist only after the committed state is valid.

Never remove an item before confirming a legal destination. Preserve item identity across a swap and prevent duplicate effect registration.

Build usable UI

Expose slot compatibility, equipped state, quantity, tooltip facts, and failure feedback. Support keyboard and touch alternatives to drag-only interactions. Keep focus behavior, dialogs, and tooltips accessible.

Test loss boundaries

Cover invalid destinations, full inventory, duplicate pickup, equip swap, mid-action swap, save/load, schema migration, reset/new game, tooltip updates, and repeated dispatch. Validate that total owned item identity is conserved except for explicit consumption or reward rules.

Files

SKILL.md

Build Game Inventory

Use one typed, serializable item source of truth and make every transfer atomic.

Define the item contract

Model stable IDs, item definitions, ownership, stack limits, equipment compatibility, effects, rarity, presentation data, and migration version separately. Runtime UI must reference definitions by ID rather than duplicate stats or descriptions.

Implement transfers as transactions

For pickup, equip, unequip, swap, drag/drop, consume, and sell:

  1. Validate source ownership and destination legality.

  2. Compute the entire next inventory/equipment state.

  3. Commit once or reject without changing either side.

  4. Persist only after the committed state is valid.

Never remove an item before confirming a legal destination. Preserve item identity across a swap and prevent duplicate effect registration.

Build usable UI

Expose slot compatibility, equipped state, quantity, tooltip facts, and failure feedback. Support keyboard and touch alternatives to drag-only interactions. Keep focus behavior, dialogs, and tooltips accessible.

Test loss boundaries

Cover invalid destinations, full inventory, duplicate pickup, equip swap, mid-action swap, save/load, schema migration, reset/new game, tooltip updates, and repeated dispatch. Validate that total owned item identity is conserved except for explicit consumption or reward rules.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Meng To
Publisher
Meng To (Community)
Source
MengTo/Skills · agent-skills/game-development/build-game-inventory · commit 5ea1661
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Meng To or Meng To.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download build-game-inventory.zip