Skip to main content
skill CX Codex

build-game-inventory — Claude Code skill: what it does, install

Build or repair game inventory flows for items, loot, equipment, drag and drop, saves, and progression without losing item state.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MengTo/Skills --skill build-game-inventory -a claude-code
Open on GitHub

What build-game-inventory does

The skill calls for one typed, serializable source of truth for items. It separates stable IDs, item definitions, ownership, stack limits, slot compatibility, effects, rarity, presentation data, and migration versions. The UI should look up definitions by ID instead of carrying copied stats and descriptions.

Pickup, equip, unequip, swapping, drag and drop, consuming, and selling follow a transaction flow. Validate ownership and the target first, calculate the next inventory and equipment state, then commit once or reject the change. Save only a valid committed state. Removing an item before its destination is confirmed is a defect this guidance is designed to prevent.

It also covers slot compatibility, quantities, tooltips, failure feedback, and keyboard or touch alternatives to drag-only controls. Test invalid targets, full inventories, duplicate pickups, equipment swaps, save/load, schema migration, resets, and repeated dispatch while conserving item identity.

What it helps with

  • define item schemas with stable IDs
  • validate pickup and stack rules
  • make equipment swaps atomic
  • add keyboard and touch inventory controls
  • test save migration without item loss

Example prompts for the agent

  • "Design an inventory with item stacks and equipment slots."
  • "Fix drag and drop so an item stays put when the target is invalid."
  • "Add tests for equipment swaps, save/load, and schema migration."

How to install build-game-inventory

1Skills CLI (Vercel)

npx skills add MengTo/Skills --skill build-game-inventory -a claude-code

2Manually: put the files in place

~/.claude/skills/build-game-inventory/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/build-game-inventory/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about build-game-inventory

How do I install build-game-inventory in Claude Code?

Run npx skills add MengTo/Skills --skill build-game-inventory -a claude-code. The skill file is placed at ~/.claude/skills/build-game-inventory/SKILL.md.

What does build-game-inventory do?

It guides work on game items, loot, inventories, equipment, tooltips, persistence, and progression. Its transfer model uses atomic transactions so invalid moves do not alter either side.

What should I test with this skill?

Test invalid destinations, full inventories, duplicate pickups, equipment swaps, save/load, schema migration, game resets, tooltip changes, and repeated dispatch. Item identity should be conserved except under explicit consumption or reward rules.

Source text

SKILL.md · MIT
---
name: build-game-inventory
description: 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.
---

# 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.

© MengTo · MIT · MengTo/Skills

Similar skills

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set148

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor