ai-behavior-trees-utility-ai

ai-behavior-trees-utility-ai is a skill for Claude Code from gamedev-skills/awesome-gamedev-agent-skills. It costs 158 tokens per session (2,019 once invoked), scanned A, original, Apache-2.0.

Implementation guidance for two systems that control game characters or other agents: behavior trees and Utility AI. A behavior tree organizes decisions in ordered branches, while Utility AI scores available actions and chooses among them.

In plain words
What is it for?
Use it to build behavior-tree nodes such as sequences, selectors, parallel branches, and decorators. Use it to build Utility AI response curves, considerations, action evaluators, or a hybrid system for choosing attacks or targets.
Why use it?
It provides reusable structures for agents that need both fixed decision flow and choices based on changing priorities. It also explains how to combine the two approaches when one alone is not enough.

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 behavior-tree nodes such as sequences, selectors, parallel branches, and decorators. Use it to build Utility AI response curves, considerations, action evaluators, or a hybrid system for choosing attacks or targets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gamedev-skills/awesome-gamedev-agent-skills/ai-behavior-trees-utility-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 ai-behavior-trees-utility-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 ai-behavior-trees-utility-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/ai-behavior-trees-utility-ai/github.svg)](https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/ai-behavior-trees-utility-ai)
Your own site
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/ai-behavior-trees-utility-ai"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/ai-behavior-trees-utility-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 ai-behavior-trees-utility-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/ai-behavior-trees-utility-ai"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/ai-behavior-trees-utility-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 158 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,019 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 24 Aug 2026
  • Snyk pass 24 Aug 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00158 $0.02019
Opus 5 $0.00079 $0.01009
Sonnet 5 $0.00032 $0.00404
Haiku 4.5 $0.00016 $0.00202

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

Security

Grade A, and why

ai-behavior-trees-utility-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 13d 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.

skills/disciplines/ai-behavior-trees-utility-ai/SKILL.md · 166 lines

How it starts

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

Behavior Trees & Utility AI

Two complementary ways to structure NPC decision-making, plus how to combine them. A behavior tree (BT) expresses structured, prioritized, reactive logic as a tree that is "ticked" each step. Utility AI answers "how much do I want each option right now?" by scoring actions with normalized curves and picking the best. Ship believable agents by using a BT for structure and Utility AI where graded trade-offs matter.

This skill is the implementation companion to game-ai (which helps you choose between FSM / BT / steering / pathfinding). Read game-ai to pick a model; read this to build the runtime.

When to use

  • Use to build a reusable BT runtime: a Blackboard, Node base, action/condition leaves, Sequence/Selector/Parallel composites, and decorators (Inverter, Cooldown, Repeat).
  • Use to build a Utility AI decider: response curves, considerations, and an evaluator that scores and selects actions (max, softmax, or weighted-random for variety).
  • Use to build hybrid AI — a BT whose leaf delegates the "which attack / which target" choice to a utility evaluator.

When not to use: to choose between FSM, BT, steering, or pathfinding, and for A*/navmesh routing, use game-ai. For Unreal's asset-based BehaviorTree/Blackboard, BTTask/BTService and AIController, use unreal-behavior-trees. For the navmesh agent that moves the NPC, use unity-navmesh or the engine's navigation node.

Core workflow

  1. Pick the model. Structured, prioritized, interruptible behavior → BT. Continuous "score every option" decisions (targeting, needs, item choice) → Utility. Both → hybrid.
  2. Design the Blackboard first. One typed key/value store per agent is the shared memory that decouples nodes; leaves read/write it and never hold references to each other.
  3. Write leaves. Conditions return Success/Failure immediately; actions return Running across frames until they finish. Keep leaves small and side-effect-explicit.
  4. Compose. Selector = OR/fallback (first non-failure wins); Sequence = AND (stop at first non-success); Parallel for concurrent branches. Wrap with decorators for policy (invert, cooldown, repeat, force-success).
  5. For Utility: enumerate considerations, map each raw fact through a normalized 0..1 curve, combine (weighted product with compensation, or weighted sum), then select the max — add hysteresis so agents don't flip-flop on ties.
  6. Tick deliberately. Tick the tree/evaluator once per decision step (often slower than render). Preserve Running state between ticks; verify by drawing the active path and the per-action scores on screen while tuning.

Read the full file on GitHub · 166 lines

Files

What ships with it

4 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. 13d ago First seen · 166 lines · 158 tokens per session scan A 185960eddb16

Subscribe to this mod's changes

ai-behavior-trees-utility-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 158 tokens to every session and 2,019 once invoked, about $0.0008 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.