Behavior Trees & Utility AI
/ai-behavior-trees-utility-ai
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
- License
- Apache-2.0
- By
- By GameSkill
Part of
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
Tested by GameSkill
40/40 checks passed on .NET 8 (C#) (2026-10-28): trigger, a runnable example, a screenshot and self-check, one job per skill, and English + Chinese docs. Trigger checks match prompts against skill descriptions; they are not a live agent run.
Test reportWhat this skill does
When it triggers
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential, sigmoid, quadratic …
GameSkill's tested copy
GameSkill's tuned build of this skill: the skill files from commit 184b72be0288, plus our runnable example, test report, self-check list and Chinese guide, put through our skill process.
License: based on gamedev-skills/awesome-gamedev-agent-skills by gamedev-skills, under Apache-2.0. The ZIP keeps the license files (LICENSE, NOTICE) and lists everything GameSkill added in CHANGES.md.

Self-check
- 每个节点只返回 Success、Failure、Running 三种状态 / Every node returns only Success, Failure or Running
- 被打断的分支会调用 Reset,清掉计时和动画 / An aborted branch gets Reset, clearing timers and animations
- 冷却装饰器不在 Reset 时清零,避免反复进出分支时连击 / Cooldown is not cleared by Reset, so flickering branches can't spam attacks
- 效用分数都在 0 到 1,多个因素相乘后做补偿,0 仍是一票否决 / Utility scores stay in 0..1; products are compensated and a 0 still vetoes
- 选择加了惯性(hysteresis),分数接近时不来回切换 / Selection has hysteresis, so near-ties don't flip back and forth
Install
Tell your AI
Install the skill from https://gameskill.dev/skills/ai-behavior-trees-utility-ai/install.md
GameSkill's tested copy
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/ai-behavior-trees-utility-ai.zip -o /tmp/gameskill-ai-behavior-trees-utility-ai.zip
unzip -oq /tmp/gameskill-ai-behavior-trees-utility-ai.zip -d .claude/skills
rm /tmp/gameskill-ai-behavior-trees-utility-ai.zipWhat you get
- A pitfalls section with the mistakes to avoid
- Bundled 4 reference docs the agent reads when needed
Good fit
- Implementing a reusable behavior-tree or utility-based decision system
- Tuning enemy/NPC decisions beyond a simple FSM
Not for
- Choosing between FSM/BT/steering or for pathfinding: use Game AI: FSM, Behavior Trees & Pathfinding instead
Try this prompt
Build a reusable behavior tree with a blackboard for my enemy, then add utility scoring to choose its attacks.About this skill
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential, sigmoid, quadratic — considerations, and action evaluators), plus hybrid BT-drives-Utility agents. Use when implementing a reusable behavior-tree or utility-based decision system, or tuning enemy/NPC decisions beyond a simple FSM, or when the user mentions behavior tree, blackboard, decorator, selector, sequence, tick status, utility AI, response/scoring curve, or consideration. For choosing between FSM/BT/steering or for pathfinding, use game-ai; for Unreal's BehaviorTree/Blackboard assets, use unreal-behavior-trees.
From the ai-behavior-trees-utility-ai SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- Architecture at a glance
- Utility scoring in one snippet
FAQ
Roguelike Combat & Boss Kit
6 production combat engines extracted from Zhaoshi Wulin in JS/TS, Godot 4 (.gd) & Unity (.cs): Boss Half-HP Hard Lock (100-70 -> 45 HP, shield never heal), Defense-Graded Rage, Dual-Channel Deterministic Crit, Clutch 1-HP Curve, Stagger AI & Priority Relic Bus.
- EP28 Boss Phase Lock: one-shot gate, 45 HP hard clamp, Shield-only (0 heal) + moveset upgrade
- EP27 Graded Rage + EP26 Deterministic Crit (17x1.5=25, zero 5-miss dry streaks)
Based on gamedev-skills/awesome-gamedev-agent-skills by gamedev-skills (Apache-2.0). The author's LICENSE and NOTICE files ship in the ZIP; ATTRIBUTION.md and CHANGES.md list the source commit and what GameSkill added.
Works well with
Skills the author points to as related or as the better fit for neighbouring tasks.
Game AI: FSM, Behavior Trees & Pathfinding
NPC and enemy decision-making with state machines, behavior trees, steering and A* pathfinding, paired with your engine's navigation API.
Game Physics Tuning
Stable, good-feeling physics: fixed timestep with interpolation, mass and drag, CCD against tunneling, jitter fixes and collision layers.
Tower Defense
Build a tower defense: enemies pathing along lanes, wave spawning, towers that auto-target and fire, an economy, and lives.
FPS Shooter
Build a first-person shooter: move+mouse-look controller, hitscan or projectile shooting, weapons, health, and enemy AI.
More from Awesome Gamedev Agent Skills
See all 432D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Card Game
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.
Create Game Assets
Plan, generate, source, normalize, and validate cohesive visual game assets.
Similar skills
Agent Sprite Forge
Five agent skills that turn one approved character still into a game-ready sprite set: one image-to-video clip per action, then deterministic Python tools key, register, loop, retime, palette-lock and export it for Godot, Aseprite and the web. Also maps, tiles and code-drawn art.
earshot: ears for coding agents (judge, find, time-align and make game sound on CPU)
Let an agent hear: rank sound-effect candidates against a description, find the clean trim in a long recording, tell real recordings from code-synthesised sound, check that every hit lands on its picture cut, and render effects from a bank of 252 code-made sounds. Runs locally on CPU with two open audio models (~1.1 GB, downloaded once); no API key needed.
One Sentence to Game (prompt, iterate, check)
A GameSkill original for any model: a round-1 prompt that turns one sentence into a small finished browser game, a one-change-per-round loop with a creation log, a reusable spec template, and a headless checker that reports console errors, blank frames and dead controls as PASS or FAIL. It does not promise one-shot.
Playtest Report (Claude Code Game Studios)
Structured playtest report template, or turn existing playtest notes into structured feedback.