Skip to main content
ANY
SkillFree

Game AI: FSM, Behavior Trees & Pathfinding

/game-ai

NPC and enemy decision-making with state machines, behavior trees, steering and A* pathfinding, paired with your engine's navigation API.

GitHub stars
2,085
(repository stars as of 2026-10-21)
License
Apache-2.0
Last commit
2026/10/09
By
gamedev-skills

Part of

Awesome Gamedev Agent Skills

74 portable SKILL.md skills for Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE and Roblox, with a router.

Listed from the author's README. GameSkill has not run this end to end yet. Agent support and install steps are as documented by the author.

Install

Any agent (skills CLI)
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill game-ai

Installs only this skill. Add -a claude-code (puts it in .claude/skills/), -a codex or -a cursor (.agents/skills/) to choose the agent, and -g to install it for your user instead of the project.

Commands are copied from the project's README. Check the repository before running anything on your machine.

Install for a specific agent
Agents-aFolder
Claude Codeclaude-code.claude/skills/
Codexcodex.agents/skills/
Cursorcursor.agents/skills/
Gemini CLIgemini-cli.agents/skills/
GitHub Copilotgithub-copilot.agents/skills/
OpenCodeopencode.agents/skills/
Windsurfwindsurf.windsurf/skills/

Add -a <flag> to the command. These are project folders; add -g to install for your user account instead.

What you get

  • Worked steps: Finite state machine; Behavior tree tick; Steering: seek and arrive; A* heuristic must not overestimate
  • A pitfalls section with the mistakes to avoid
  • Bundled 2 reference docs the agent reads when needed

Good fit

  • Building enemy AI, an FSM or behavior tree, steering/flocking, or pathfinding

Try this prompt

Prompt
Make my enemies patrol, spot the player and chase them with A* pathfinding.

About this skill

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.

From the game-ai SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.

What's inside

  • Finite state machine (one state object, explicit transitions)
  • Behavior tree tick (composite nodes return a status)
  • Steering: seek and arrive (smooth, frame-rate independent)
  • A* heuristic must not overestimate (or paths stop being shortest)

FAQ

Works well with

Skills the author points to as related or as the better fit for neighbouring tasks.

More from Awesome Gamedev Agent Skills

See all 41

Similar skills