Agent skill

Unreal Behavior Trees

by ukanwat in ukanwat/overtime

Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController.

Apache-2.0Auto-check passedGame Development

Install Unreal Behavior Trees

skills CLI
$ npx skills add ukanwat/overtime --skill unreal-behavior-trees -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ukanwat/overtime unreal-behavior-trees --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ukanwat/overtime.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/unreal-behavior-trees .claude/skills/unreal-behavior-trees && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unreal-behavior-trees
GitHub stars
387
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
545 words
Files
2 (incl. references)
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController.

  • Works in 3 steps: AIController that runs the tree (C++) → A priority tree (node structure) → Updating the Blackboard from code (e.g.…
  • Creating enemy/NPC AI
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Reaches dev.epicgames.com

What it does

Unreal Behavior Trees is an agent skill from ukanwat/overtime. Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController. Use when creating enemy/NPC AI, BT/BB assets, custom BTTask or BTService nodes, or when the user mentions Behavior Tree, Blackboard, AIController, BTTask, decorator, or service.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/custom-bttask.md`). Compatibility notes: Unreal Engine 5.4+ (AIModule; Behavior Tree + Blackboard; NavMesh for movement)

It sits in Game Development, covering Game development. It works with Unreal Engine. The repository describes itself as: Give a coding agent a brief, not a chat, and it works on its own across sessions. Includes an example run: an open-world city built in a real game engine with no human help. In… The licence is Apache-2.0.

When your agent uses it

  • Creating enemy/NPC AI
  • BTService nodes
  • The user mentions Behavior Tree

Example prompts

  • “/unreal-behavior-trees”

Requirements

  • Compatibility (from SKILL.md): Unreal Engine 5.4+ (AIModule; Behavior Tree + Blackboard; NavMesh for movement)

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. AIController that runs the tree (C++)
  2. A priority tree (node structure)
  3. Updating the Blackboard from code (e.g. on seeing the player)

What it can do on your machine

Read from SKILL.md and the folder at commit eac84e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are cpp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • dev.epicgames.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Unreal Engine 5.4+ (AIModule; Behavior Tree + Blackboard; NavMesh for movement)

    From compatibility in the SKILL.md frontmatter.

Context cost

Unreal Behavior Trees loads about 1.4k tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 94 tokens; SKILL.md has 545 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ukanwat/overtime at commit eac84e0, republished under its Apache-2.0 licence (© ukanwat). 545 words, ~1,449 tokens.

Download SKILL.mdSave it as .claude/skills/unreal-behavior-trees/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
unreal-behavior-trees
description
Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController. Use when creating enemy/NPC AI, BT_/BB_ assets, custom BTTask or BTService nodes, or when the user mentions Behavior Tree, Blackboard, AIController, BTTask, decorator, or service.
compatibility
Unreal Engine 5.4+ (AIModule; Behavior Tree + Blackboard; NavMesh for movement)
license
Apache-2.0
metadata.engine
unreal
metadata.category
unreal
metadata.difficulty
advanced

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.4+.

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.

Patterns

1. AIController that runs the tree (C++)
cpp
void AEnemyAIController::OnPossess(APawn* InPawn)
{
    Super::OnPossess(InPawn);
    if (BehaviorTree)                 // UPROPERTY(EditAnywhere) TObjectPtr<UBehaviorTree>
        RunBehaviorTree(BehaviorTree); // initializes & uses the Blackboard the BT references
}
Show full SKILL.md (231 more words)Show less
2. A priority tree (node structure)
text
ROOT
└── Selector (try combat, else investigate, else patrol)
    ├── Sequence            [Decorator: Blackboard 'TargetActor' Is Set, Observer Aborts: Both]
    │     ├── Task: MoveTo (TargetActor)          // latent: returns InProgress then Succeeded
    │     └── Task: Attack
    ├── Sequence            [Decorator: 'LastKnownLocation' Is Set]
    │     ├── Task: MoveTo (LastKnownLocation)
    │     └── Task: Wait (3s) + clear key
    └── Task: Patrol (BTTask_FindPatrolPoint -> MoveTo)

Observer Aborts: Both makes the combat branch interrupt patrol the instant TargetActor is set, and bail out when it's cleared — this is what makes the AI feel reactive.

3. Updating the Blackboard from code (e.g. on seeing the player)
cpp
void AEnemyAIController::SetTarget(AActor* Target)
{
    if (UBlackboardComponent* BB = GetBlackboardComponent())
        BB->SetValueAsObject(TEXT("TargetActor"), Target);   // key name must match the BB asset
}
// Clear with BB->ClearValue(TEXT("TargetActor")); to drop back to a lower-priority branch.

Pitfalls

  • AI never starts — the pawn isn't possessed (set the Pawn's Auto Possess AI to "Placed in World or Spawned" and assign the AIController), or RunBehaviorTree was never called.
  • MoveTo instantly fails — no NavMesh in the level (add a Nav Mesh Bounds Volume), or the target is off the navmesh.
  • Branch doesn't react to changes — the gating Decorator's Observer Aborts is set to None; set it to Self/Lower Priority/Both so the tree re-evaluates when the key changes.
  • A task hangs the tree — a custom task returned InProgress and never calls FinishLatentTask. Always complete latent tasks.
  • Blackboard key typos — SetValueAsObject("Taget", ...) silently does nothing; match the key name and type exactly, or use a cached FBlackboardKeySelector.
  • Sequence vs Selector confusion — Sequence = AND (stops on first failure); Selector = OR (stops on first success). Swapping them inverts the behaviour.

References

  • For a custom C++ UBTTaskNode (instant and latent ExecuteTask returning EBTNodeResult, with a FBlackboardKeySelector), read references/custom-bttask.md.
  • Primary docs: "Behavior Trees in Unreal Engine" (https://dev.epicgames.com/documentation/en-us/unreal-engine/behavior-trees-in-unreal-engine).
  • game-ai — engine-agnostic AI design (FSM, BT, steering, pathfinding choices).
  • unreal-cpp-gameplay — the AIController and pawn classes in C++.
  • fps-shooter / tower-defense — genres that compose enemy AI.

© ukanwat, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .claude/skills/unreal-behavior-trees of ukanwat/overtime.

  • SKILL.md
  • references/custom-bttask.md

Open the folder on GitHubat commit eac84e0

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in ukanwat/overtime, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Unreal Behavior Trees next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unreal Behavior Trees compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unreal Behavior Trees this skillukanwat/overtime3871 repos~1.4kAutomated safety check: PassApache-2.0
Unreal BridgeTornLux/UnrealBridge306—~8.4kAutomated safety check: NotesMIT
Unreal Blueprint Authoringflopperam/unreal-engine-mcp1.1k—~1.6kAutomated safety check: PassNone
UMG Material MCPwinyunq/UnrealMotionGraphicsMCP210—~913Automated safety check: PassMIT
Unreal Animation Bone Editorkevinpbuckley/VibeUE730—~1.3kAutomated safety check: PassMIT
Unreal Engine MCPEpicGames/unreal-engine-skills-for-claude-code-plugin338—~1.8kAutomated safety check: PassMIT

Similar skills

  • Unreal Bridge

    TornLux/UnrealBridge

    Execute Python scripts inside a running Unreal Engine 5.3+ editor via TCP bridge.

    306 GitHub stars~8.4k tokensUpdated 9 days ago
    Game DevelopmentAuto-check: notes
  • Unreal Blueprint Authoring

    flopperam/unreal-engine-mcp

    Walks an agent through creating and editing Unreal Engine Blueprints with the Flopperam MCP's bp_* tools, from inspection to commit and verification.

    1.1k GitHub stars~1.6k tokensUpdated 3 mo ago
    Game DevelopmentAuto-check passed
  • UMG Material MCP

    winyunq/UnrealMotionGraphicsMCP

    Creates, edits and compiles Unreal Engine 5.8 material assets as one HLSL Custom node through the UMG MCP bridge, instead of editing .uasset files directly.

    210 GitHub stars~913 tokensUpdated 2 mo ago
    Game DevelopmentAuto-check passed
  • Unreal Animation Bone Editor

    kevinpbuckley/VibeUE

    Previews, validates and bakes bone-rotation edits on Unreal Engine AnimSequences, enforcing a coordinate space and a constraint-checked preview-validate-bake loop.

    730 GitHub stars~1.3k tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed
  • Unreal Engine MCP

    EpicGames/unreal-engine-skills-for-claude-code-plugin

    Drives a live Unreal Editor through the unreal-mcp server: spawn actors, edit Blueprints, materials and sequences, change properties and trigger Live Coding.

    338 GitHub stars~1.8k tokensUpdated 24 days ago
    Game DevelopmentAuto-check passed
  • Unreal Scene Building

    flopperam/unreal-engine-mcp

    Guides scene and world building in Unreal Engine through the Flopperam MCP: placing actors, sculpting landscapes, scattering foliage, editing materials and verifying the level.

    1.1k GitHub stars~1.4k tokensUpdated 3 mo ago
    Game DevelopmentAuto-check passed

More from ukanwat/overtime

All 21 skills in this repo
  • Audio Design

    ukanwat/overtime

    Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX variation, and beat synchronization.

    387 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Camera Systems

    ukanwat/overtime

    Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person orbit with collision and first-person look; plus multi-target framing…

    387 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Dialogue Systems

    ukanwat/overtime

    Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and Yarn Spinner or a custom data-driven…

    387 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Game AI

    ukanwat/overtime

    Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API.

    387 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Game Feel

    ukanwat/overtime

    Add "juice" and game feel that makes actions satisfying — screen shake, hit-stop/freeze frames, tweened/eased motion, squash & stretch, knockback, and layered audio-visual feedback — as…

    387 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Game UI UX

    ukanwat/overtime

    Design and build game UI/UX — HUDs, menus, and overlays — that survive every screen: anchor- based responsive layout, resolution/aspect scaling and safe areas, keyboard/gamepad focus navigation, a…

    387 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Works with

Questions about Unreal Behavior Trees

What does Unreal Behavior Trees do?

Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController. Unreal Behavior Trees is an agent skill from ukanwat/overtime. Build NPC AI in Unreal Engine 5 with Behavior Trees and Blackboards: composites (Selector/Sequence), tasks, decorators, services, and running the tree from an AIController.

When should I use Unreal Behavior Trees?

Unreal Behavior Trees fits situations like: creating enemy/NPC AI; BTService nodes; the user mentions Behavior Tree.

How do I install Unreal Behavior Trees in Claude Code?

Run `npx skills add ukanwat/overtime --skill unreal-behavior-trees -a claude-code`. Or copy the skill folder (.claude/skills/unreal-behavior-trees in ukanwat/overtime) into .claude/skills/unreal-behavior-trees in your project. Claude Code loads it when a task matches its description.

How do I install Unreal Behavior Trees in Codex?

Run `npx skills add ukanwat/overtime --skill unreal-behavior-trees -a codex`. Or copy the skill folder (.claude/skills/unreal-behavior-trees in ukanwat/overtime) into .agents/skills/unreal-behavior-trees in your project. Codex loads it when a task matches its description.

Can I use Unreal Behavior Trees in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ukanwat/overtime --skill unreal-behavior-trees -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unreal-behavior-trees, .gemini/skills/unreal-behavior-trees, .github/skills/unreal-behavior-trees and .opencode/skills/unreal-behavior-trees in your project.

What does Unreal Behavior Trees need to run?

SKILL.md names no scripts, command-line tools or credentials: Unreal Behavior Trees is instructions for the agent only. Compatibility (from SKILL.md): Unreal Engine 5.4+ (AIModule; Behavior Tree + Blackboard; NavMesh for movement).

Does Unreal Behavior Trees access the network?

SKILL.md names 1 domain. In commands or code: dev.epicgames.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Unreal Behavior Trees safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unreal Behavior Trees use?

Unreal Behavior Trees is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unreal Behavior Trees use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 921 tokens, read only when the agent opens those files.

What are the alternatives to Unreal Behavior Trees?

Skills that share tags, products or a category with Unreal Behavior Trees: Unreal Bridge (TornLux/UnrealBridge, 306 stars), Unreal Blueprint Authoring (flopperam/unreal-engine-mcp, 1.1k stars), UMG Material MCP (winyunq/UnrealMotionGraphicsMCP, 210 stars) and Unreal Animation Bone Editor (kevinpbuckley/VibeUE, 730 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unreal Behavior Trees?

ukanwat (a GitHub user) maintains it in ukanwat/overtime, which has 387 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 8, 2026.

Source: ukanwat/overtime on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.