tune-enemy-ai

Builds, debugs, and tests combat enemy AI behavior for action games.

5.7k|685|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/MengTo/Skills --skill tune-enemy-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tune-enemy-ai
Source: https://github.com/MengTo/Skills/tree/main/agent-skills/game-development/tune-enemy-ai
Command: npx skills add https://github.com/MengTo/Skills --skill tune-enemy-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enemy AI in action games often feels unfair or broken: enemies chase forever, attack through walls, or behave unpredictably. This Skill provides a structured playbook for designing legible, bounded, and reproducible enemy behavior with deterministic regression tests.

Core Features & Use Cases

  • Explicit Decision Modeling: Defines named behavior states (idle, pursue, windup, attack, stagger, retreat, boss phases) with prerequisites, exit conditions, dwell times, and cooldowns.
  • Perception-Intent-Motion Separation: Structures AI into observable inputs, constrained intent selection, and authoritative navigation-driven movement.
  • Fair Combat Guardrails: Enforces telegraphed attacks, spacing, and commitment so players can read and counter each enemy archetype.
  • Deterministic Testing: Covers fixtures for target acquisition, obstruction, path failure, stagger, boss phases, and reset, asserting transitions rather than final positions.
  • Use Case: A game developer notices enemies stunlock the player with repeated attacks. Use this Skill to add recovery cooldowns, telegraphs, and a regression test asserting the attack-to-recovery transition.

Quick Start

Use the tune-enemy-ai skill to review my enemy behavior state machine and add deterministic tests for target loss and stagger transitions.

Frequently Asked Questions about tune-enemy-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design enemy AI state machines for action games?

Define named states such as idle, investigate, pursue, windup, attack, recover, stagger, and retreat. Each transition must declare prerequisites, exit conditions, minimum dwell time, and cooldown effects so behavior stays legible and bounded.

How to test enemy AI behavior deterministically?

Create fixtures for target acquisition, target loss, obstruction, path failure, stagger, boss phases, and reset. Assert state transitions and outcomes rather than final positions, then validate with a real browser encounter after automated tests.

Why does my enemy AI feel unfair to players?

Unfair AI usually comes from instant turn-and-hit attacks, perpetual chasing, attacks clipping through blockers, or recovery spam. Add telegraphs before active windows, spacing, and commitment so players can read and answer each archetype.

Should enemy movement use rendered positions or navigation data?

Use authoritative collision and navigation results for movement success. Deriving movement from rendered pose or assumed path completion causes desyncs between decision logic and actual world state.

What is the perception-intent-motion pattern in game AI?

It separates AI into three stages: gather observable inputs like distance and line of sight, select one intention from constrained legal actions, then move and animate toward that intent without rewriting the decision mid-action.