Skip to content
Skillpedia
Websites & UI (frontend)7.2k · #13369

tune-enemy-ai

What it does

This skill guides an AI agent in designing how enemies think and act in a 3D or web action game. It is for developers who want enemies that feel fair and are easy to test.

When to use it

  • ✓When enemies chase too long, attack unfairly or get stuck.
  • ✓When you are adding a boss with several phases and behaviors.
  • ✓When you want repeatable AI tests that check enemy choices.

Skill link

https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/tune-enemy-ai/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/tune-enemy-ai/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“My enemies keep getting stuck behind walls. Help me fix their chase and attack behavior.”

5 new skills a week. 1 minute to read.

How it works

The agent describes enemy behavior as named states, such as chase, reposition and attack. It sets clear rules for changing state, adds telegraphs before attacks and writes tests for each decision.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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.

FAQ

What is a behavior state machine?

It is a simple list of named states, like idle, chase or retreat, with clear rules for moving between them.

Does the skill test positions only?

No. It checks decisions and outcomes, not just where an enemy ends up.

Will enemies still be fair to the player?

The skill says attacks should be shown before they land, and enemies should not turn and hit instantly.

Details

Original description by 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.

repo: MengTo/Skills

Popularity

GitHub stars
7.2k
Ranking position
#13369
License
MIT
Updated
11/1/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills