game-ai

game-ai is a command for Claude Code from HermeticOrmus/LibreGameDev-Claude-Code. It costs 23 tokens per session (801 once invoked), scanned A, a copy of game-ai, MIT.

A command for designing, writing, diagnosing, and tuning game NPC behavior. It supports behavior trees, finite state machines, utility AI, and goal-oriented action planning (GOAP), which are different ways to choose what a character does.

In plain words
What is it for?
Use it to design NPC architectures, implement behavior systems, debug behavior, and work with navigation and perception.
Why use it?
It helps turn a behavior idea into a design or GDScript code, and helps investigate problems such as characters getting stuck or failing to change states.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the ai-game-behavior plugin — 1 skill, 1 command, 1 agent shipped together

Good fit Use it to design NPC architectures, implement behavior systems, debug behavior, and work with navigation and perception.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libregamedev-claude-code/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.

Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreGameDev-Claude-Code

Made for: Claude Code.

Or install ai-game-behavior, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 agent.

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/commands/hermeticormus/libregamedev-claude-code/game-ai/github.svg)](https://agentmods.dev/commands/hermeticormus/libregamedev-claude-code/game-ai)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libregamedev-claude-code/game-ai"><img src="https://agentmods.dev/badge/commands/hermeticormus/libregamedev-claude-code/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/commands/hermeticormus/libregamedev-claude-code/game-ai"><img src="https://agentmods.dev/badge/commands/hermeticormus/libregamedev-claude-code/game-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 801 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.
Origin 100% copy Near-identical to another mod 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.00023 $0.00801
Opus 5.5 $0.00009 $0.00320
Sonnet 5.5 $0.00005 $0.00160
Haiku 4.5 $0.00002 $0.00080

Measured 15d ago against content hash 3de4524d5b62, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 15d 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

This is a copy

100% identical to game-ai — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/ai-game-behavior/commands/game-ai.md · 96 lines

How it starts

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

/game-ai

AI behavior design and implementation for NPCs. Covers behavior trees, FSMs, utility AI, GOAP, navigation, and perception systems.

Trigger

/game-ai [action] [target]

Actions

design

Design an AI architecture for an NPC type. Outputs ASCII state diagram or BT structure + blackboard schema.

/game-ai design "patrol guard with alert states"
/game-ai design "boss enemy with phase transitions"
/game-ai design "companion follower with utility AI"

Output: Architecture recommendation with rationale, ASCII diagram, blackboard schema as typed GDScript Resource.

implement

Generate GDScript implementation for a specified AI system.

/game-ai implement bt "3-state patrol -> investigate -> attack"
/game-ai implement fsm "enemy with push-down automata for interrupts"
/game-ai implement utility "NPC action scorer with 4 considerations"
/game-ai implement goap "action set for combat agent"

Output: Full GDScript with typed variables, @export parameters, inline comments explaining pattern choices.

debug

Diagnose AI behavior problems from description or code.

/game-ai debug "NPC gets stuck between two waypoints"
/game-ai debug "enemy never transitions out of idle state"
/game-ai debug "pathfinding works but NPC stutters on arrival"

Output: Root cause analysis, specific code fix, prevention pattern.

tune

Tune consideration curves, BT tick rates, or FSM timeout values.

/game-ai tune "utility scores all feel equal, no clear winner"
/game-ai tune "BT too expensive, 200 NPCs at 60fps drops to 30fps"
/game-ai tune "patrol timeout too short, NPCs always re-alert"

Output: Parameter adjustments with reasoning, performance budget calculations.

Examples

Designing a stealth game guard:

/game-ai design "stealth guard: unaware -> suspicious -> alerted -> searching"

Produces: 4-state HFSM with push-down investigative substates, alert meter as utility consideration, vision cone + hearing radius sensor setup.

Read the full file on GitHub · 96 lines

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. 15d ago First seen · 96 lines · 23 tokens per session scan A 3de4524d5b62

Subscribe to this mod's changes

game-ai is a command published in the GitHub repository HermeticOrmus/LibreGameDev-Claude-Code (5 stars, last pushed 15d ago), licensed MIT. It adds 23 tokens to every session and 801 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to game-ai, differing in 0 lines, and is treated as a copy.

Related

Other commands, from other repositories

build-and-compilation

These commands drive the build/compile/test dev loop, plus build configuration: triggering Player builds and reading the resulting BuildReport, switching the active build target, enumerating targets, reading/writing EditorUserBuildSettings, and listing Build Profiles. Several commands are asynchronous: trigger the…

Alex-Rachel/TEngine · 0 tokens

animation

Author animation assets: AnimationClips (and their float curves), AnimatorControllers (parameters, layers, states, transitions), and Timeline assets. Create commands write under the authoring root and follow the shared confirm/dryrun convention.

Alex-Rachel/TEngine · 0 tokens

assets-and-files

Commands for creating, importing, moving, copying, renaming, deleting and finding project assets, plus folder and text-file operations. Every agent-supplied path is funnelled through the authoring-root sandbox (it rejects ../ and out-of-project writes); destructive or overwriting operations require confirm=true and…

Alex-Rachel/TEngine · 0 tokens

gameobjects-and-components

Commands for creating GameObjects, querying the scene hierarchy, mutating the core GameObject/Transform surface, and adding/removing components and editing their serialized properties. Scene mutations are wrapped in Unity's Undo system (so a multi-step action reverts as one collapsible step) and are blocked during…

Alex-Rachel/TEngine · 0 tokens

project-settings

Read and change a representative slice of Unity's project-wide settings (Audio, Graphics, Input, Physics, Player, Quality, Tags & Layers, Time). get commands read a group's current values into a ProjectSettingsResponse; set commands mutate them through the shared confirm/dryrun convention, so confirm=true is required…

Alex-Rachel/TEngine · 0 tokens

baking

Bake and clear precomputed scene data: lightmaps, NavMesh, and occlusion culling. Each bake runs asynchronously (returns immediately) — poll the matching bakestatus until completed. The clear commands are destructive and require confirm=true. The getsettings / setsettings pairs read and tune the bake parameters.

Alex-Rachel/TEngine · 0 tokens