build-threejs-enemy-systems — скилл для Claude Code
Скилл помогает проектировать архетипы и мувсеты врагов для Three.js. Разделяет неизменяемые параметры персонажей и состояние боя в рантайме.
npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a claude-codeЧто делает build-threejs-enemy-systems
Скилл выстраивает архитектуру противников в экшен-играх на Three.js через разделение данных и рантайма. Неизменяемые параметры — теги, базовые характеристики и награды — остаются в статичных описаниях. Координаты, шкала здоровья, таймеры и кулдауны хранятся только в живых инстансах. Боевые часы нельзя дублировать между подсистемами.
Все визуальные контракты нормализуются строго на границе импорта модели. Разработчик заранее фиксирует пивот у земли, масштаб, смещение взгляда, физический коллайдер и сокеты под оружие. Попытка раскидать правки вращения или масштаба по коду геймплея приведёт к рассинхрону боевой системы. Если финальной модели нет, скилл подключает явный плейсхолдер с сохранением хитбоксов и таймингов.
Каждый приём описывается как отдельный блок данных с фазами подготовки, активного удара, восстановления и прерывания. Проверка всей системы выполняется через детерминированные тестовые сцены: спавн, смену уровней детализации LOD, сброс состояний и дедупликацию урона по одной цели.
Какие задачи решает
- отделить статичные параметры врагов от динамического состояния боя
- нормализовать масштаб, пивоты и сокеты моделей на границе импорта
- описать мувсеты как данные с фазами анимации и окнами урона
- настроить честные плейсхолдеры с сохранением хитбоксов и таймингов
- проверить боевые механики через детерминированные тестовые сцены
Примеры запросов агенту
- Создай спецификацию мувсета для ближнего боя в Three.js с фазами замаха, окнами урона и кулдауном
- Спроектируй схему архетипа противника с разделением неизменяемых данных и состояния рантайма
- Добавь плейсхолдер с правильным пивотом и сокетами для врага, пока модель не готова
Как установить build-threejs-enemy-systems
1Через Skills CLI (Vercel)
npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a claude-code2Вручную: положить файлы
~/.claude/skills/build-threejs-enemy-systems/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/build-threejs-enemy-systems/
1Через Skills CLI (Vercel)
npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a codex2Вручную: положить файлы
.agents/skills/build-threejs-enemy-systems/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a cursor2Вручную: положить файлы
.cursor/skills/build-threejs-enemy-systems/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install MengTo/Skills build-threejs-enemy-systems2Вручную: положить файлы
.github/skills/build-threejs-enemy-systems/SKILL.md1Через Skills CLI (Vercel)
npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a gemini-cli2Командой платформы
gemini skills install https://github.com/MengTo/Skills --path agent-skills/game-development/build-threejs-enemy-systemsВручную: положить файлы
.devin/skills/build-threejs-enemy-systems/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о build-threejs-enemy-systems
Как установить build-threejs-enemy-systems в Claude Code?
Выполните команду npx skills add MengTo/Skills --skill build-threejs-enemy-systems -a claude-code.
Для чего нужен скилл build-threejs-enemy-systems?
Он задаёт правила построения систем врагов в играх на Three.js. Все параметры атак, анимаций и характеристик выносятся в структуры данных, изолируя боевую систему от логики рендера.
Что делать, если финальная 3D-модель врага ещё не готова?
Скилл требует использовать честный плейсхолдер. Он сохраняет габариты, пивот у земли, сокеты, коллайдеры и тайминги ударов, выводя предупреждение в лог один раз.
Исходный текст
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