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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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
- Gather observable inputs: distance, line of sight, target state, occupancy, threat, health, and timers.
- Select one intention from constrained legal actions.
- 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
Comments
- …
More skills from this repository
3d-cloth-material
7.2kHelps your agent build realistic woven fabric in Three.js, with thread weave, soft sheen, natural folds, hems and seams.
3d-falling-leaves
7.2kHelps your agent add realistic falling leaves to a 3D scene, with leaves that tumble, drift with the wind and recycle as the camera moves.
3d-four-seasons
7.2kHelps your agent add spring, summer, fall and winter looks to a 3D scene, changing foliage, light, sky and snow without rebuilding it.
3d-high-poly-models
7.2kHelps your agent build detailed 3D models with smooth shapes and believable edges, then prepare lighter versions that run well on the web.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.