Skip to content
Skillpedia
Websites & UI (frontend)7.2k · #13355

build-game-inventory

What it does

This skill guides the agent through building the item and equipment system of a game. It is for game developers who need pickups, equipping and swaps to work every time without losing or duplicating items.

When to use it

  • ✓When a game needs items, loot, stacks or equipment slots.
  • ✓When dragging, swapping or equipping items must never lose an item.
  • ✓When saved games need inventory data migrated safely between versions.

Skill link

https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-inventory/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-inventory/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Add an inventory with equipment slots and drag-and-drop swaps to my game, and make sure no item gets lost.”

5 new skills a week. 1 minute to read.

How it works

The agent keeps one typed item list, checks every move before changing anything, and commits each change once. It saves the valid result and tests for lost items, full inventories and repeated actions.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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.

FAQ

What happens if a move is not allowed?

The skill says to reject the move without changing either side, so no item is lost.

Is drag-and-drop the only way to move items?

No. The skill requires keyboard and touch alternatives as well.

How are saves handled?

Saved inventory data is versioned, and the skill covers migrating older saves.

Details

Original description by 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.

repo: MengTo/Skills

Popularity

GitHub stars
7.2k
Ranking position
#13355
License
MIT
Updated
11/1/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills