ue-actor-component-arc…
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS queries or Smart Objects. Also use when the user mentions 'AAIController', 'UBTTaskNode', 'ExecuteTask', 'FinishLatentTask', 'UBlackboardComponent',
Claude Code
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation --agent claude-code
Codex
$ npx skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation -a codex -y
Cursor
$ npx skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation -a cursor -y
Gemini CLI
$ npx skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation -a gemini-cli -y
GitHub Copilot
$ npx skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation -a github-copilot -y
OpenCode
$ npx skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation -a opencode -y
Windsurf
$ npx skills add quodsoler/unreal-engine-skills --skill ue-ai-navigation -a windsurf -y
name: ue-ai-navigation description: "Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS queries or Smart Objects. Also use when the user mentions 'AAIController', 'UBTTaskNode', 'ExecuteTask', 'FinishLatentTask', 'UBlackboardComponent', 'FBlackboardKeySelector', 'UAIPerceptionComponent', 'FAIStimulus', 'UAISenseConfig_Sight', 'MoveTo', 'UNavigationSystemV1', 'ProjectPointToNavigation', 'UNavArea', 'ANavLinkProxy', 'UEnvQueryManager', 'FEnvQueryRequest', 'EQS', 'navmesh', 'USmartObjectSubsystem' or 'ZoneGraph'. For State Tree authoring, see ue-state-trees; for Mass crowds, see ue-mass-entity; for the movement component that executes paths, see ue-character-movement." metadata: version: "2.0.0" engine: "5.8"
Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".
Classic UE AI runs on a server-only `AAIController` that owns a brain component (`UBehaviorTreeComponent`), a `UBlackboardComponent`, a `UAIPerceptionComponent` and a `UPathFollowingComponent`. Behavior trees, perception and EQS live in the `AIModule`; navmesh generation and queries live in `NavigationSystem`; BT tasks that wrap gameplay tasks need `GameplayTasks`. Smart Objects (`SmartObjectsModule`, plugin `SmartObjects`), ZoneGraph (`ZoneGraph`, Experimental in 5.8), MassAI (Experimental in 5.8) and NavCorridor (Experimental in 5.8) are opt-in plugins. Add what you use to `PublicDependencyModuleNames` in your `.Build.cs`, e.g. `"AIModule", "NavigationSystem", "GameplayTasks"`.
Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.
Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.
| Request is about… | Go to | |---|---| | Possessing a pawn, running a tree, move requests, focus | [AI Controller](#ai-controller) | | Reading/writing AI knowledge, key selectors, observers | [Blackboard](#blackboard) | | Custom tasks, decorators, services, node memory | [Behavior Tree Nodes](#behavior-tree-nodes) | | Sight/hearing/damage senses, stimuli sources | [AI Perception](#ai-perception) | | Path queries, projection, random points, invokers | [Navigation and Pathfinding](#navigation-and-pathfinding) | | Area costs, query filters, jump/off-mesh links | [Nav Areas, Filters and Off-Mesh Links](#nav-areas-filters-and-off-mesh-links) | | Cover/flank/patrol point selection, custom contexts | [EQS Environment Query System](#eqs-environment-query-system) | | State Tree instead of a behavior tree | [State Tree for AI](#state-tree-for-ai) | | Interactable world objects, slot claiming | [Smart Objects](#smart-objects) | | Lane-based crowds, large agent counts | [ZoneGraph, MassAI and NavCorridor](#zonegraph-massai-and-navcorridor) |
// MyAIController.h
#pragma once
#include "CoreMinimal.h"
#include "AIController.h"
#include "Perception/AIPerceptionTypes.h"
#include "MyAIController.generated.h"
class UBehaviorTree;
UCLASS()
class MYGAME_API AMyAIController : public AAIController
{
GENERATED_BODY()
public:
AMyAIController();
protected:
UPROPERTY(EditDefaultsOnly, Category = "AI")
TObjectPtr<UBehaviorTree> BehaviorTreeAsset;
virtual void OnPossess(APawn* InPawn) override;
virtual void OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& Result) override;
UFUNCTION()
void HandleTargetPerceptionUpdated(AActor* Actor, FAIStimulus Stimulus);
};
// MyAIController.cpp
#include "MyAIController.h"
#include "BehaviorTree/BlackboardComponent.h"
#include "Navigation/PathFollowingComponent.h"
#include "Perception/AIPerceptionComponent.h"
AMyAIController::AMyAIController()
{
bStartAILogicOnPossess = true;
bStopAILogicOnUnposses = true;
}
void AMyAIController::OnPossess(APawn* InPawn)
{
Super::OnPossess(InPawn);
if (BehaviorTreeAsset)
{
RunBehaviorTree(BehaviorTreeAsset); // calls UseBlackboard internally
}
if (UAIPerceptionComponent* Perception = GetAIPerceptionComponent())
{
Perception->OnTargetPerceptionUpdated.AddDynamic(this, &AMyAIController::HandleTargetPerceptionUpdated);
}
}
void AMyAIController::OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& Result)
{
Super::OnMoveCompleted(RequestID, Result);
if (UBlackboardComponent* BB = GetBlackboardComponent()) { BB->SetValueAsBool(TEXT("ReachedGoal"), Result.Code == EPathFollowingResult::Success); }
}
void AMyAIController::HandleTargetPerceptionUpdated(AActor* Actor, FAIStimulus Stimulus)
{
UBlackboardComponent* BlackboardComp = GetBlackboardComponent();
if (BlackboardComp && Stimulus.WasSuccessfullySensed())
{
BlackboardComp->SetValueAsObject(TEXT("TargetActor"), Actor);
BlackboardComp->SetValueAsVector(TEXT("LastKnownLocation"), Stimulus.StimulusLocation);
}
}// AIController.h — signatures you will call
EPathFollowingRequestResult::Type MoveToActor(AActor* Goal, float AcceptanceRadius = -1, bool bStopOnOverlap = true,
bool bUsePathfinding = true, bool bCanStrafe = true,
TSubclassOf<UNavigationQueryFilter> FilterClass = {}, bool bAllowPartialPath = true);
EPathFollowingRequestResult::Type MoveToLocation(const FVector& Dest, float AcceptanceRadius = -1, bool bStopOnOverlap = true,
bool bUsePathfinding = true, bool bProjectDestinationToNavigation = false, bool bCanStrafe = true,
TSubclassOf<UNavigationQueryFilter> FilterClass = {}, bool bAllowPartialPath = true);
virtual FPathFollowingRequestResult MoveTo(const FAIMoveRequest& MoveRequest, FNavPathSharedPtr* OutPath = nullptr);
virtual void SetFocus(AActor* NewFocus, EAIFocusPriority::Type InPriority = EAIFocusPriority::Gameplay);
virtual void SetFocalPoint(FVector NewFocus, EAIFocusPA collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing or debugging Unreal Engine animation C++: AnimInstance subclasses, thread-safe update, FAnimInstanceProxy,…
Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers…
Use when playing, mixing or debugging sound in Unreal Engine — one-shot SFX, looping ambience, music, dialogue or procedural…
Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure,…
Use when writing or debugging UCharacterMovementComponent code: custom movement modes, floor detection, jumping, crouching, root…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…