Build threejs enemy systems

From MengTo/Skills · View interactive version

Build threejs enemy systems is an AI agent skill from the GitHub repository MengTo/Skills. Build or refactor reusable, data-driven enemy archetype and moveset systems for Three.js action games. Use for enemy content schemas, model and rig conventions, combat move timing and contact contracts, runtime state boundaries, placeholder fallbacks, deterministic fixtures, or production playthroug

How to use this skill

Skill file

Build Three.js Enemy Systems

Make each enemy a portable authored definition consumed by shared runtime systems. Keep AI choice, combat resolution, rendering, and feedback as separate consumers of the same stable contract.

Separate content from runtime state

Normalize presentation contracts

Define these fields before integrating a model:

Normalize at the asset boundary. Do not scatter scale fixes, pivot offsets, raw clip names, or compensating rotations through gameplay code.

Define moves as data

For every move, define:

Let AI select only legal move IDs; let the combat system own timing and outcomes. Resolve damage from authoritative collision/contact events using stable action and target identifiers. Apply each contact once, then drive animation, VFX, audio, and UI from the resolved event.

Provide an honest fallback

When a production model is unavailable, use a deliberate placeholder that preserves footprint, height, pivot, collider, sockets, facing, move timing, and state readability. Log the fallback once and keep it visually unmistakable. Never silently substitute a mismatched asset or call placeholder visuals production-ready.

Add a new enemy

  1. Existing archetype and moves fit? Configure a new definition; do not add runtime branches.
  2. A new behavior is essential? Add the smallest reusable move, hook, or AI tag before adding a new subsystem.
  3. Model ready? Normalize it to the shared presentation contract; otherwise use the honest fallback.
  4. Content complete? Validate references, timing, contact, cooldown, recovery, interrupts, and feedback hooks.
  5. Proof ready? Add deterministic fixtures and automated tests, then run desktop and mobile playthroughs.

Prove the system

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.