This skill gives an agent a working method for NPC decision code that ports to any engine. It covers a reusable behavior tree runtime (Blackboard, leaves, composites, decorators), a utility scorer built from response curves, and the hybrid where a tree branch hands a graded choice to utility.
Its focus is the lifecycle contract, who resets what and when, since that is where most behavior tree bugs sit: enemies that keep chasing after losing sight, restart an action every frame or flip-flop between choices.
What You Get
- A lifecycle contract for node status and Reset, with a Selector example that resumes a Running child
- A utility scoring pattern that maps each fact to 0..1 through a curve and keeps a zero as a veto
- A headless tick test shape that counts ticks and resets so lifecycle bugs show up as numbers
- A gotcha list covering guards that are never re-checked, cooldown bypass, Parallel restarts, softmax overflow and GC spikes
Common Use Cases
- Fixing an enemy that keeps chasing after the player is out of sight
- Building a reusable behavior tree runtime with Blackboard, composites and decorators
- Adding a utility decider that picks which attack or target to use
- Cutting AI cost for many agents with a decision cadence of 5 to 15 Hz and staggered ticks
What Makes It Unique
It is written around bugs, not around a library. It names the exact failure for each symptom, such as a memory Sequence that never rechecks its guard, and it tells the agent to extend an existing behavior tree plugin when the project has one. It hands FSMs, steering and pathfinding to game-ai and Unreal assets to unreal-behavior-trees.
Under The Hood
The skill is instructions and reference markdown only, with no scripts. The agent reads the SKILL.md and, when needed, four reference files in its references folder covering the tree core, utility system, worked examples and scaling pitfalls. It tells the agent to read the existing AI code in the project and to run the project’s own test runner for the tick test. It does not fetch web pages, call APIs or write files on its own.