Scaffold a new game entity type with a branded ID, Readonly shape, and deterministic ID generation
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Scaffold a new game entity type with a branded ID, Readonly shape, and deterministic ID generation
Scaffold Entity
Use when introducing a new game entity (e.g. Enemy, Item, Projectile).
Rules
All entity types are Readonly<{…}> — no mutable fields.
Every entity has a branded ID: Brand<string, "EntityNameId"> — never a plain string.
IDs are deterministically generated via the seeded PRNG stored in state — never Math.random(), never crypto.randomUUID().
IDs are never reused within a run; spawn order is tracked for deterministic tie-breaking.
Board actors use GridCell for gameplay position. Do not add actor xPos / yPos; pixel coordinates belong only to render commands and raw browser input events.
Composition over nesting: share sub-shapes via type aliases, not inheritance.
Steps
Declare the branded ID type in packages/game/lib/core/types.ts: