Skip to main content
skill CX Codex

build-threejs-enemy-systems — Claude Code skill: how to install

Designs data-driven enemy archetypes and movesets for Three.js action games. Separates immutable character specs from dynamic runtime combat state.

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

What build-threejs-enemy-systems does

The skill structures Three.js action game enemy systems by separating static authored specs from runtime instances. Definitions store stable IDs, role tags, base stats, move lists, and reward tables. Live transforms, health, phase clocks, and cooldowns stay exclusively in runtime instances. Timers live only in runtime.

Presentation contracts are normalized strictly at the asset boundary. You define ground pivots, normalized scales, facing offsets, and attachment sockets before models touch gameplay logic. Scattering scale compensations across combat scripts will break hit registration. If a 3D model is missing, the workflow substitutes an honest placeholder that preserves height, colliders, and move timings.

Moves are authored as pure data containing startup telegraphs, active damage frames, armor rules, and recovery cooldowns. Deterministic fixtures validate edge cases like LOD transitions, interruptions, and hit deduplication on a single target.

What it helps with

  • separate immutable enemy definitions from dynamic runtime state
  • normalize model scales, pivots, and sockets at the asset boundary
  • configure data-driven movesets with startup and active damage windows
  • deploy honest visual fallbacks that preserve colliders and timing
  • test combat edge cases using deterministic scene fixtures

Example prompts for the agent

  • Define a Three.js melee enemy moveset schema with telegraph, active window, and recovery timing
  • Refactor our enemy archetype to split immutable authored data from runtime instance state
  • Set up a visual placeholder fallback that preserves collider bounds, sockets, and facing

How to install build-threejs-enemy-systems

1Skills CLI (Vercel)

npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a claude-code

2Manually: put the files in place

~/.claude/skills/build-threejs-enemy-systems/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/build-threejs-enemy-systems/

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

Questions about build-threejs-enemy-systems

How do I install build-threejs-enemy-systems in Claude Code?

Run npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a claude-code.

What does build-threejs-enemy-systems do?

It structures enemy systems for Three.js action games around data-driven definitions. This isolates AI selection, rendering, and combat resolution into separate consumers of a single contract.

How does the system handle missing 3D character models?

It relies on an honest placeholder fallback. The placeholder maintains identical pivot, height, colliders, sockets, and move timing while logging the missing asset once.

Source text

SKILL.md · MIT
---
name: build-threejs-enemy-systems
description: 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 playthrough validation.
---

# 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

- Put stable IDs, role/tags, base stats, presentation spec, move IDs, AI hints, feedback hook IDs, rewards, and variant data in immutable authored definitions.
- Put instance ID, transform, health/posture, target, current move and phase clock, cooldowns, statuses, pathing, visibility, and LOD state in runtime instances.
- Reference definitions by ID. Reject duplicate IDs, missing references, invalid ranges, or impossible timing during content validation.
- Never mutate authored definitions, store live timers in content, or duplicate the combat clock across AI, animation, and rendering.

## Normalize presentation contracts

Define these fields before integrating a model:

- source or factory ID, provenance, coordinate system, forward axis, and meters-per-unit;
- root pivot at ground contact, normalized scale, facing offset, and visual height;
- simple movement collider plus named hurtboxes, independent of render geometry;
- stable sockets for contact origins, weapons, projectiles, VFX, audio, UI markers, and targeting;
- rig and semantic clip map for idle, locomotion, moves, reactions, and death;
- LOD tiers with hysteresis, animation/update policy, and unchanged gameplay colliders.

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:

- stable ID, AI tags, eligibility range/angle/line-of-sight, weight, and state prerequisites;
- startup and telegraph, one or more active windows, recovery, cooldown, and minimum commitment;
- movement, facing, cancellation, armor, interrupt, stagger, and phase rules;
- contact shape/socket, damage, posture, knockback, status, and per-target hit limits;
- semantic animation, VFX, and audio hook IDs with cleanup rules.

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

- Create deterministic fixtures for spawn, each move phase, wrong range/direction, obstruction, interrupt, stagger, death/reset, missing-model fallback, LOD transitions, and multiple instances sharing one definition.
- Test content uniqueness and references, active-window boundaries, cooldown/recovery, per-target hit deduplication, lifecycle cleanup, and pause/frame-step behavior.
- Play a representative encounter in the repository-approved browser. Confirm telegraphs, contact, state, animation, VFX/audio, targetability, and rewards agree.
- Verify desktop and mobile camera distance, touch controls, reduced motion, console health, frame time, draw calls, memory stability, and crowded-scene LOD behavior. Report baseline failures separately.

© 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