game-ai

game-ai is a skill for Claude Code from gamedev-skills/awesome-gamedev-agent-skills. It costs 85 tokens per session (1,941 once invoked), scanned A, original, Apache-2.0.

An engine-independent approach to NPC and enemy behavior using state machines, behavior trees, steering, and pathfinding. NPCs are computer-controlled characters; pathfinding finds routes, while steering controls local movement.

In plain words
What is it for?
Use it to build patrol, chase, flee, guard, flocking, and path-to-player behavior, including grid or graph routing with A* and integration with navigation agents.
Why use it?
It helps separate decisions, movement, and routing so enemy behavior is easier to design and change. It also helps choose a suitable model for simple states, complex reactions, or smooth group movement.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the disciplines plugin — 15 skills shipped together , and of gamedev

Good fit Use it to build patrol, chase, flee, guard, flocking, and path-to-player behavior, including grid or graph routing with A* and integration with navigation agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gamedev-skills/awesome-gamedev-agent-skills/game-ai
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill game-ai
Clone the repo
git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills

Made for: Claude Code.

Or install disciplines, the plugin that ships this one along with the rest of its 15 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for game-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/game-ai/github.svg)](https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/game-ai)
Your own site
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/game-ai"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/game-ai/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for game-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/game-ai"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/game-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,941 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 9 Aug 2026
  • Snyk pass 9 Aug 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 24
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.01941
Opus 5 $0.00043 $0.00971
Sonnet 5 $0.00017 $0.00388
Haiku 4.5 $0.00009 $0.00194

Measured 12d ago against content hash ef23a6440743, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

game-ai scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • game-ai — 88% identical, 6 lines differ
skills/disciplines/game-ai/SKILL.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 obvious transitions → FSM. Many behaviors, priorities, interruption, reuse → behavior tree. Continuous "how strongly do I want each option" → utility scoring.
  2. Separate decision from motion. The decision layer outputs an intent (target position, action). Steering or pathfinding turns intent into motion.
  3. Path on the right graph. Grid tiles, waypoint graph, or a baked navmesh. Fewer nodes = faster A*. Prefer the engine's navmesh for 3D; A* on a grid for tile games.
  4. Steer along the path, not straight to the goal — follow the next waypoint, advancing when close, so agents round corners.
  5. Recompute paths sparingly. Pathfind on a timer or when the goal moves a tile, not every frame. Cache the path; only the waypoint index advances.
  6. Verify by observation. Watch the agent: does it reach the goal, get stuck on corners, oscillate between states? Draw the path and current state on screen while tuning.

Read the full file on GitHub · 174 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 174 lines · 85 tokens per session scan A ef23a6440743

Subscribe to this mod's changes

game-ai is a skill published in the GitHub repository gamedev-skills/awesome-gamedev-agent-skills (952 stars, last pushed 2d ago), licensed Apache-2.0. It adds 85 tokens to every session and 1,941 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.