ai-behavior-trees-util…
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system…
Write Unreal Engine 5 C++ gameplay code: the UCLASS/UPROPERTY/UFUNCTION reflection macros, the Gameplay Framework (GameMode, Pawn, Character, PlayerController, Actor components), and the module Build.cs. Use when writing or debugging UE C++, deriving from AActor/ACharacter/
$ npx -y skills add gamedev-skills/awesome-gamedev-agent-skills --skill unreal-cpp-gameplay --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/unreal-cpp-gameplayContext preview
The summary Claude sees to decide when to auto-load this skill.
Write Unreal Engine 5 C++ gameplay code: the UCLASS/UPROPERTY/UFUNCTION reflection macros, the Gameplay Framework (GameMode, Pawn, Character, PlayerController, Actor components), and the module Build.cs. Use when writing or debugging UE C++, deriving from AActor/ACharacter/
name: unreal-cpp-gameplay description: > Write Unreal Engine 5 C++ gameplay code: the UCLASS/UPROPERTY/UFUNCTION reflection macros, the Gameplay Framework (GameMode, Pawn, Character, PlayerController, Actor components), and the module Build.cs. Use when writing or debugging UE C++, deriving from AActor/ACharacter/ AGameModeBase, exposing properties to the editor or Blueprints, or when the user mentions Unreal C++, UCLASS, GENERATED_BODY, GameMode, ACharacter, or .Build.cs.
Write correct UE5 gameplay C++: the reflection macros that connect C++ to the editor and Blueprints, the Gameplay Framework class roles, and module dependencies. Targets **UE 5.8**.
`UActorComponent`), exposing properties/functions with `UPROPERTY`/`UFUNCTION`, setting up a GameMode's default classes, or adding a module dependency in `*.Build.cs`.
**When *not* to use:** designer-facing visual logic → `unreal-blueprints`. Player input binding details → `unreal-enhanced-input`. AI logic → `unreal-behavior-trees`. This skill owns the C++ class/reflection foundation those build on.
1. **Name with the right prefix.** `A` = Actor-derived, `U` = `UObject`/component-derived, `F` = plain struct, `E` = enum, `I` = interface. The prefix must match the base class. 2. **Declare the class with reflection macros.** `UCLASS()` above the class, `GENERATED_BODY()` as the first line in the body, and `#include "ClassName.generated.h"` as the **last** include in the header. 3. **Expose data with `UPROPERTY`** (editor/Blueprint visibility *and* garbage-collection tracking) and behaviour with `UFUNCTION` (`BlueprintCallable`, etc.). 4. **Create components in the constructor** with `CreateDefaultSubobject<T>(TEXT("Name"))` and set the `RootComponent`. 5. **Know the framework roles:** `AGameModeBase` sets the rules + default classes; `APawn`/ `ACharacter` is the controllable body; `APlayerController` is the player's will; `UActorComponent` is reusable behaviour. 6. **Add module dependencies** to `*.Build.cs` (e.g. `EnhancedInput`) or unresolved-symbol link errors follow. 7. **Verify** by compiling (Live Coding `Ctrl+Alt+F11` for function bodies; full rebuild for header/UPROPERTY changes) and checking the class/properties appear in the editor.
// Pickup.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Pickup.generated.h" // MUST be the last include
UCLASS()
class MYGAME_API APickup : public AActor // MYGAME_API = your module's export macro
{
GENERATED_BODY()
public:
APickup();
// EditAnywhere = tweak per-instance & on the CDO; BlueprintReadWrite = BP get/set.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup")
int32 ScoreValue = 10;
// UPROPERTY on a UObject* pointer is what keeps it from being garbage-collected.
UPROPERTY(VisibleAnywhere)
TObjectPtr<UStaticMeshComponent> Mesh; // UE5: TObjectPtr instead of raw UStaticMeshComponent*
UFUNCTION(BlueprintCallable, Category = "Pickup")
void Collect();
protected:
virtual void BeginPlay() override;
};// Pickup.cpp
#include "Pickup.h"
#include "Components/StaticMeshComponent.h"
APickup::APickup()
{
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
RootComponent = Mesh; // the mesh is this actor's root
}
void APickup::BeginPlay() { Super::BeginPlay(); } // always call Super
void APickup::Collect() { Destroy(); }// MyGameMode.cpp — set in the constructor so the engine spawns your classes.
AMyGameMode::AMyGameMode()
{
DefaultPawnClass = AMyCharacter::StaticClass();
PlayerControllerClass = AMyPlayerController::StaticClass();
}// MyGame.Build.cs
PublicDependencyModuleNames.AddRange(new string[]
{
"Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput"
});"Expected an include". It must be the final include in the header.
thing inside the class body.
it out from under you. Track every UObject pointer with `UPROPERTY` (use `TObjectPtr` in UE5).
changes to `UCLASS`/`UPROPERTY`/headers need a full editor restart + rebuild.
prefix to the base type.
`PublicDependencyModuleNames`.
(`TObjectPtr`, `TArray<TObjectPtr<>>`, `AddToRoot`), and a replication primer, read `references/components-and-gc.md`.
(`https://dev.epicgames.com/documentation/en-us/unreal-engine/gameplay-framework-in-unreal-engine`).
<img src="docs/assets/banner.png" width="820" alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents.
Repo: gamedev-skills/awesome-gamedev-agent-skills
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system…
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX…
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…
Plan, generate, source, normalize, and validate cohesive visual game assets. Use for art direction, style bibles, sprites, tilesets, backgrounds, UI art,…
Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and…
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding — engine-neutral algorithms that pair…