unreal-behavior-trees

unreal-behavior-trees is a skill for Claude Code from gamedev-skills/awesome-gamedev-agent-skills. It costs 87 tokens per session (1,428 once invoked), scanned A, original, Apache-2.0.

A guide for building non-player character decision-making in Unreal Engine 5 with Behavior Trees and Blackboards. A Behavior Tree organizes decisions into branches, while a Blackboard stores the character's current information, such as a target or location.

In plain words
What is it for?
Use it to create and connect Behavior Tree and Blackboard assets, add conditions and periodic updates, write custom task or service nodes, and run the tree from an AIController.
Why use it?
It provides a consistent way to structure enemy and NPC behavior instead of putting all decisions into one large piece of game code.

Skill for Claude Code

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

Part of the unreal plugin — 6 skills shipped together , and of gamedev

Good fit Use it to create and connect Behavior Tree and Blackboard assets, add conditions and periodic updates, write custom task or service nodes, and run the tree from an AIController.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gamedev-skills/awesome-gamedev-agent-skills/unreal-behavior-trees
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 unreal-behavior-trees
Clone the repo
git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills

Made for: Claude Code.

Or install unreal, the plugin that ships this one along with the rest of its 6 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 unreal-behavior-trees

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/unreal-behavior-trees"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/unreal-behavior-trees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 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 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.00087 $0.01428
Opus 5 $0.00044 $0.00714
Sonnet 5 $0.00017 $0.00286
Haiku 4.5 $0.00009 $0.00143

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

Security

Grade A, and why

unreal-behavior-trees 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:

skills/unreal/unreal-behavior-trees/SKILL.md · 115 lines

How it starts

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

Unreal Behavior Trees

Author NPC decision-making in UE5 with Behavior Trees driven by a Blackboard: structure the tree with composites, gate branches with decorators, keep state current with services, and run it from an AIController. Targets UE 5.8.

When to use

  • Use when building enemy/NPC AI: creating a BT_/BB_ asset pair, structuring Selector/Sequence branches, adding decorators (conditions) and services (periodic updates), writing custom BTTask/BTService nodes, or wiring an AIController to run the tree.
  • Use when the project has Behavior Tree (BT_) and Blackboard (BB_) assets and an AAIController.

When not to use: the concept of AI (FSM vs BT vs steering, cross-engine) → game-ai. Pure navigation/pathing math is engine navmesh (BT's MoveTo uses it). Simple one-off logic may be cheaper as a small state machine than a full tree.

Core workflow

  1. Create the pair: a Blackboard (BB_) holds typed keys (the AI's memory: TargetActor, LastKnownLocation, bIsInvestigating); a Behavior Tree (BT_) references that Blackboard.
  2. Possess and run. An AAIController possesses the pawn and calls RunBehaviorTree(BT), which also initializes the referenced Blackboard.
  3. Structure with composites. Selector runs children left→right until one succeeds (priority/fallback: "attack, else chase, else patrol"). Sequence runs children until one fails (do-all: "move to cover → reload → peek"). Simple Parallel runs one main task alongside a secondary.
  4. Gate branches with Decorators that read Blackboard keys (e.g. "Has Target?" guards the combat branch). Set Observer Aborts so the tree re-evaluates when the key changes.
  5. Keep the Blackboard current with Services attached to a branch — they tick periodically (e.g. update TargetActor via a sight check) only while that branch is active.
  6. Do work in Tasks, which return Succeeded, Failed, or InProgress (latent tasks like MoveTo finish later).
  7. Verify with the Behavior Tree debugger during PIE — it highlights the running node and shows live Blackboard values, so you see exactly which branch executes.

Read the full file on GitHub · 115 lines

Files

What ships with it

1 file 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 · 115 lines · 87 tokens per session scan A 0c8ca83b7edb

Subscribe to this mod's changes

unreal-behavior-trees 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 87 tokens to every session and 1,428 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.