Generated banner for Tune Enemy AI
Generated logo for Tune Enemy AI

Tune Enemy AI

Meng ToCommunityCreated by Meng To

  • Skill
  • Workflow
  • Design and creative
  • MIT
  • No issues found

From the author

Build, debug, balance, or test combat enemy AI for playable action games. Use for aggro, target selection, navigation, spacing, attack choices, telegraphs, retreats, boss behavior, behavior-state machines, and deterministic AI regression tests.
— the description by Meng To

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Tune Enemy AI provides a structured approach to developing combat artificial intelligence that is predictable for players and testable for developers. By emphasizing explicit state machines, the separation of perception from action, and rigorous testing of decision surfaces, this skill helps creators build enemy behaviors that are fair, readable, and robust. It covers the full lifecycle of AI development, from defining state transitions and movement logic to implementing regression tests for complex combat scenarios.

What it does

  • Defines state machine patterns for enemy behaviors like idle, pursue, attack, and retreat.
  • Promotes the separation of perception, intent, and motion to ensure consistent AI behavior.
  • Provides guidelines for creating fair combat experiences through telegraphing and movement constraints.
  • Outlines methods for building deterministic test fixtures to validate AI decision-making.
  • Encourages the use of authoritative collision and navigation data over visual assumptions.

When to use it

  • When designing new enemy archetypes that require distinct combat personalities.
  • When debugging erratic or unfair enemy behavior in an action game.
  • When setting up automated regression testing for complex boss encounters or combat states.
  • When balancing the difficulty of enemy spacing, attack frequency, and telegraphing.

Advantages

  • Improves player experience by making enemy intentions clear and readable.
  • Reduces bugs by enforcing explicit state transitions and exit conditions.
  • Ensures AI reliability through deterministic testing of decision logic.
  • Prevents common AI issues like instant turn-and-hit or perpetual chasing.

Usage examples

“How should I structure the state machine for a basic melee enemy?”
The agent provides a state machine model with defined states like idle, pursue, windup, attack, and recover, including specific prerequisites and cooldowns for each transition.
“How can I test if my boss AI handles player interruptions correctly?”
The agent guides you to create a deterministic test fixture that simulates an interrupt event during a boss phase and asserts that the AI transitions to the correct stagger state.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/mengto/tune-enemy-ai/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip tune-enemy-ai.zip -d .agents/skills

Documentation by Meng To

Tune Enemy AI

Make enemy choices legible, bounded, and reproducible.

Model decisions explicitly

Use a small state machine or utility layer with named states such as idle, investigate, pursue, reposition, windup, attack, recover, stagger, retreat, and defeated. State transitions must state their prerequisites, exit conditions, minimum dwell time, and cooldown effects.

Separate perception, intent, and motion

  1. Gather observable inputs: distance, line of sight, target state, occupancy, threat, health, and timers.

  2. Select one intention from constrained legal actions.

  3. Move and animate toward that intent without rewriting the decision mid-action.

Use authoritative collision and navigation results for movement success. Do not derive them from rendered pose or assumed path completion.

Preserve fair combat

Telegraph attacks before their active window. Prevent instant turn-and-hit behavior, perpetual chase, clipped attacks through blockers, and repeated recovery spam. Add spacing and commitment so the player can read and answer each enemy archetype.

Test the decision surface

Create deterministic fixtures for target acquisition, target loss, obstruction, path failure, close-range pressure, multiple enemies, retaliation, interrupt, stagger, boss phase, and reset. Assert transitions and outcomes, not only final positions. Run a real browser encounter after automated tests.

Files

SKILL.md

Tune Enemy AI

Make enemy choices legible, bounded, and reproducible.

Model decisions explicitly

Use a small state machine or utility layer with named states such as idle, investigate, pursue, reposition, windup, attack, recover, stagger, retreat, and defeated. State transitions must state their prerequisites, exit conditions, minimum dwell time, and cooldown effects.

Separate perception, intent, and motion

  1. Gather observable inputs: distance, line of sight, target state, occupancy, threat, health, and timers.

  2. Select one intention from constrained legal actions.

  3. Move and animate toward that intent without rewriting the decision mid-action.

Use authoritative collision and navigation results for movement success. Do not derive them from rendered pose or assumed path completion.

Preserve fair combat

Telegraph attacks before their active window. Prevent instant turn-and-hit behavior, perpetual chase, clipped attacks through blockers, and repeated recovery spam. Add spacing and commitment so the player can read and answer each enemy archetype.

Test the decision surface

Create deterministic fixtures for target acquisition, target loss, obstruction, path failure, close-range pressure, multiple enemies, retaliation, interrupt, stagger, boss phase, and reset. Assert transitions and outcomes, not only final positions. Run a real browser encounter after automated tests.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Meng To
Publisher
Meng To (Community)
Source
MengTo/Skills · agent-skills/game-development/tune-enemy-ai · commit 5ea1661
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Meng To.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tune-enemy-ai.zip