build-game-inventory
यह क्या करती है
यह स्किल गेम की आइटम और उपकरण प्रणाली बनाने का मार्गदर्शन देती है। यह उन गेम डेवलपर्स के लिए है जिन्हें पिकअप, पहनना और बदलना हर बार बिना आइटम खोए या दोहराए काम करना चाहिए।
कब इस्तेमाल करें
- ✓जब गेम को आइटम, लूट, ढेर या उपकरण की जगहें चाहिए।
- ✓जब ड्रैग करना, बदलना या पहनना कभी भी कोई आइटम नहीं खोना चाहिए।
- ✓जब सेव किए गेम का इन्वेंटरी डेटा संस्करणों के बीच सुरक्षित रूप से ले जाना है।
Skill का लिंक
https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-inventory/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे गेम में उपकरण की जगहों और ड्रैग-एंड-ड्रॉप बदलाव वाली इन्वेंटरी जोड़िए, और पक्का कीजिए कि कोई आइटम न खोए।”
हर हफ़्ते 5 नई skills, 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:
- Validate source ownership and destination legality.
- Compute the entire next inventory/equipment state.
- Commit once or reject without changing either side.
- 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
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
3d-cloth-material
7.2kआपके एजेंट को Three.js में असली बुने हुए कपड़े जैसा दिखने वाला मटीरियल बनाने में मदद करती है, जिसमें धागों की बुनाई, हल्की चमक, प्राकृतिक सिलवटें, किनारे और सीवन हों।
3d-falling-leaves
7.2kआपके एजेंट को 3D दृश्य में असली लगने वाली गिरती पत्तियाँ जोड़ने देती है, जो लुढ़कती हैं, हवा के साथ बहती हैं और कैमरा हिलने पर दोबारा इस्तेमाल होती हैं।
3d-four-seasons
7.2kआपके एजेंट को 3D दृश्य में वसंत, गर्मी, शरद और सर्दी के रूप जोड़ने देती है, जिसमें हरियाली, रोशनी, आसमान और बर्फ़ बिना दृश्य दोबारा बनाए बदलते हैं।
3d-high-poly-models
7.2kआपके एजेंट को चिकने आकार और विश्वसनीय किनारों वाले विस्तृत 3D मॉडल बनाने देती है, और फिर वेब पर अच्छे चलने वाले हल्के संस्करण तैयार करती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।