本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)7.2k · #13355

build-game-inventory

できること

このスキルは、ゲームのアイテムと装備のシステムを作る作業をエージェントに案内します。拾得、装備、入れ替えが、アイテムを失ったり複製したりせずに毎回動く必要がある、ゲーム開発者向けです。

使う場面

  • ✓ゲームに、アイテム、戦利品、スタック、装備スロットが必要なとき。
  • ✓ドラッグ、入れ替え、装備でアイテムを決して失ってはならないとき。
  • ✓保存済みのゲームのインベントリデータを、バージョン間で安全に移行する必要があるとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-inventory/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“装備スロットとドラッグ&ドロップの入れ替えがあるインベントリを私のゲームに追加し、アイテムが失われないようにしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、型付きのアイテム一覧を一つ保ち、何かを変える前にすべての移動を確認し、各変更を一度だけ確定します。有効な結果を保存し、アイテムの消失、満杯のインベントリ、繰り返し操作を試験します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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.

よくある質問

許可されない移動の場合はどうなりますか?

両方の側を変えずに移動を拒否するとスキルで定められています。そのためアイテムは失われません。

アイテムを動かす方法はドラッグ&ドロップだけですか?

いいえ。スキルは、キーボードとタッチの代替操作も必要としています。

セーブはどう扱われますか?

保存されたインベントリデータにはバージョンが付き、古いセーブの移行も扱われます。

詳細

作者による元の説明

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

人気

GitHubのスター
7.2k
ランキング
#13355
ライセンス
MIT
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル