Agent skill · Backend & API

game-ai

Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API. Use when building enemy AI, an FSM or behavior tree, steering/flocking, or pathfinding, or when the user mentions state machine, behavior tree, blackboard, A*, navmesh, seek, or patrol/chase.

gamedev-skillsgithub.com/gamedev-skillsGitHub ↗
claude-codeclinecodexcursorcopilotwindsurfApache-2.0
Install
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill game-ai --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 8 KB
Bundled scripts: none
Requires: Engine-agnostic (algorithms). Concrete snippets in GDScript-like / Python pseudocode; pairs with unity-navmesh…
Path: skills/disciplines/game-ai/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 406
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Game AI: decisions, steering, and pathfinding Build believable NPC behavior from three separable layers: **decide** (what to do), **steer** (how to move there), and **path** (how to route around the map). Keep them decoupled — a behavior tree picks a target, the pathfinder produces waypoints, steering follows them. This skill teaches the engine-neutral algorithms; bind them to your engine via the related skills below. ## When to use - Use when implementing enemy/NPC logic: patrols, chase/flee, guard states, group movement, or "find a path to the player". - Use to choose between an **FSM** (few clear states), a **behavior tree** (many reactive behaviors with priorities), or **steering** (smooth local movement). - Use when integrating pathfinding: A* on a grid/graph, or driving an engine navmesh agent. **When *not* to use:** for the engine's concrete navmesh/agent API and baking, use `unity-navmesh`, `unreal-behavior-trees`, or Godot's `NavigationAgent2D/3D` (see that engine skill). For movement/collision feel, use `physics-tuning`. For spawning waves along lanes, see the `tower-defense` genre skill. ## Core workflow 1. **Pick the decision model by complexity.** 2–5 states with obv

What's inside
Steps it walks through
  1. When to use
  2. Core workflow
  3. Patterns
  4. 1. Finite state machine (one state object, explicit transitions)
  5. 2. Behavior tree tick (composite nodes return a status)
  6. 3. Steering: seek and arrive (smooth, frame-rate independent)
  7. 4. A heuristic must not overestimate (or paths stop being shortest)
  8. Pitfalls
  9. References
  10. Related skills
Ships with 2 files
  • references/behavior-trees.md
  • references/pathfinding.md
More from awesome-gamedev-agent-skills
All skills →
About this skill
What does the game-ai skill do?

Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API. Use when building enemy AI, an FSM or behavior tree, steering/flocking, or pathfinding, or when the user mentions state machine, behavior tree, blackboard, A*, navmesh, seek, or patrol/chase.

How do I install it?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill game-ai --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From gamedev-skills/awesome-gamedev-agent-skills, a repository with 406 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going