/ue-cpp-foundations
Use when writing Unreal Engine C++ code involving UPROPERTY, UFUNCTION, UCLASS, TArray, TMap, delegates, FString, garbage collection, or smart pointers. Also use when the user asks about "UE C++", USTRUCT, UENUM, FName, FText, TObjectPtr, TWeakObjectPtr, UObject lifetime,
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-cpp-foundations --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/ue-cpp-foundations
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when writing Unreal Engine C++ code involving UPROPERTY, UFUNCTION, UCLASS, TArray, TMap, delegates, FString, garbage collection, or smart pointers. Also use when the user asks about "UE C++", USTRUCT, UENUM, FName, FText, TObjectPtr, TWeakObjectPtr, UObject lifetime,
SKILL.md
ue-cpp-foundations.SKILL.mdname: ue-cpp-foundations
description: Use when writing Unreal Engine C++ code involving UPROPERTY, UFUNCTION, UCLASS, TArray, TMap, delegates, FString, garbage collection, or smart pointers. Also use when the user asks about "UE C++", USTRUCT, UENUM, FName, FText, TObjectPtr, TWeakObjectPtr, UObject lifetime, UE_LOG, or UE subsystems. For module build configuration, see ue-module-build-system. For Actor/Component architecture, see ue-actor-component-architecture.
metadata:
version: 1.0.0
UE C++ Foundations
You are an expert in Unreal Engine's C++ extensions and property system.
Context
Read `.agents/ue-project-context.md` for engine version, coding conventions, and project-specific rules. Engine version matters: UE5 uses `TObjectPtr<>` where UE4 used raw `UObject*`, and `GENERATED_BODY()` replaces `GENERATED_USTRUCT_BODY()` in structs.
Before You Start
Ask which area the user needs help with if unclear:
- **Macros & Reflection** — UCLASS, UPROPERTY, UFUNCTION, USTRUCT, UENUM
- **Containers** — TArray, TMap, TSet, TOptional
- **Delegates** — static, dynamic, multicast, binding patterns
- **Strings** — FName, FString, FText conversion and formatting
- **Memory & GC** — TObjectPtr, TWeakObjectPtr, TSharedPtr, GC roots
- **Logging** — UE_LOG, log categories, verbosity
- **Subsystems** — GameInstance, World, LocalPlayer subsystems
---
UObject Macros & Reflection
All UE reflection macros require `GENERATED_BODY()` inside the class/struct and the corresponding `.generated.h` include.
UCLASS()
| Specifier | Effect | |-----------|--------| | `Blueprintable` | Blueprint subclassing allowed | | `BlueprintType` | Usable as Blueprint variable | | `Abstract` | Cannot be instantiated | | `NotBlueprintable` | Blocks Blueprint subclassing | | `Config=<Name>` | Loads UPROPERTY(Config) from `<Name>.ini` | | `Transient` | Not saved/serialized | | `Within=<OuterClass>` | Outer must be of given type |
UCLASS(Blueprintable, BlueprintType)
class MYGAME_API UMyDataObject : public UObject
{
GENERATED_BODY()
public:
UMyDataObject();
};Full specifier list: [references/property-specifiers.md](references/property-specifiers.md).
UPROPERTY()
UCLASS(Blueprintable)
class MYGAME_API AMyCharacter : public ACharacter
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Stats")
float MaxHealth = 100.f;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Stats")
float CurrentHealth;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Config")
int32 MaxLevel = 50;
UPROPERTY(ReplicatedUsing=OnRep_Health, Category="Replication")
float ReplicatedHealth;
UPROPERTY(Transient) // Not serialized; GC still tracks
TObjectPtr<UParticleSystemComponent> CachedFX;
UPROPERTY(SaveGame, BlueprintReadWrite, Category="Persistence")
int32 PlayerScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Stats",
meta=(ClampMin="0.0", ClampMax="1.0"))
float DamageMultiplier = 1.f;
UFUNCTION()
void OnRep_Health();
virtual void GetLifetimeReplicatedProps(
TArray<FLifetimeProperty>& OutLifetimeProps) const override;
};UFUNCTION()
UFUNCTION(BlueprintCallable, Category="Actions")
void PerformAttack(float Damage);
UFUNCTION(BlueprintPure, Category="Queries")
float GetHealthPercent() const;
UFUNCTION(BlueprintNativeEvent, Category="Events") // C++ provides _Implementation
void OnDamageTaken(float Amount);
virtual void OnDamageTaken_Implementation(float Amount);
UFUNCTION(BlueprintImplementableEvent, Category="Events") // Blueprint must implement
void OnLevelUp(int32 NewLevel);
UFUNCTION(Server, Reliable, WithValidation) // RPC: runs on server
void ServerFireWeapon(FVector Origin, FVector Direction);
void ServerFireWeapon_Implementation(FVector Origin, FVector Direction);
bool ServerFireWeapon_Validate(FVector Origin, FVector Direction);
UFUNCTION(Client, Reliable) // RPC: runs on owning client
void ClientShowDamageNumber(float Amount);
void ClientShowDamageNumber_Implementation(float Amount);
UFUNCTION(NetMulticast, Reliable) // RPC: runs on all
void MulticastPlayEffect(FVector Location);
void MulticastPlayEffect_Implementation(FVector Location);
UFUNCTION(Exec) // Console command (~ in-game)
void DebugResetStats(); // Works on PC, Pawn, HUD, GM, GI, CheatManager
USTRUCT() and UENUM()
// UE5: always GENERATED_BODY() — never GENERATED_USTRUCT_BODY()
USTRUCT(BlueprintType)
struct MYGAME_API FWeaponStats
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite) float BaseDamage = 10.f;
UPROPERTY(EditAnywhere, BlueprintReadWrite) float FireRate = 0.5f;
};
// DataTable row
USTRUCT(BlueprintType)
struct MYGAME_API FEnemyTableRow : public FTableRowBase
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite) FName EnemyID;
UPROPERTY(EditAnywhere, BlueprintReadWrite) TSoftClassPtr<AActor> SpawnClass;
};
UENUM(BlueprintType)
enum class EWeaponState : uint8
{
Idle UMETA(DisplayName="Idle"),
Firing UMETA(DisplayName="Firing"),
Reloading UMETA(DisplayName="Reloading"),
};---
UE Containers
See [references/container-patterns.md](references/container-patterns.md) for full API and performance guide.
TArray — Ordered Dynamic Array
TArray<FString> Names;
Names.Add(TEXT("Alpha"));
Names.Emplace(TEXT("Beta")); // Construct in-place (avoids copy)
Names.Reserve(100); // Pre-allocate
FString First = Names[0];
bool bHas = Names.Contains(TEXT("Alpha"));
int32 Idx = Names.Find(TEXT("Beta")); // INDEX_NONE if absent
FString* Ptr = Names.FindByPredicate([](const FString& S){ return S.StartsWith(TEXT("A")); });
Names.Sort([](const FString& A, const FString& B){ return A.Len() < B.LRead more
name: ue-cpp-foundations description: Use when writing Unreal Engine C++ code involving UPROPERTY, UFUNCTION, UCLASS, TArray, TMap, delegates, FString, garbage collection, or smart pointers. Also use when the user asks about "UE C++", USTRUCT, UENUM, FName, FText, TObjectPtr, TWeakObjectPtr, UObject lifetime, UE_LOG, or UE subsystems. For module build configuration, see ue-module-build-system. For Actor/Component architecture, see ue-actor-component-architecture. metadata: version: 1.0.0
UE C++ Foundations
You are an expert in Unreal Engine's C++ extensions and property system.
Context
Read `.agents/ue-project-context.md` for engine version, coding conventions, and project-specific rules. Engine version matters: UE5 uses `TObjectPtr<>` where UE4 used raw `UObject*`, and `GENERATED_BODY()` replaces `GENERATED_USTRUCT_BODY()` in structs.
Before You Start
Ask which area the user needs help with if unclear:
- **Macros & Reflection** — UCLASS, UPROPERTY, UFUNCTION, USTRUCT, UENUM
- **Containers** — TArray, TMap, TSet, TOptional
- **Delegates** — static, dynamic, multicast, binding patterns
- **Strings** — FName, FString, FText conversion and formatting
- **Memory & GC** — TObjectPtr, TWeakObjectPtr, TSharedPtr, GC roots
- **Logging** — UE_LOG, log categories, verbosity
- **Subsystems** — GameInstance, World, LocalPlayer subsystems
---
UObject Macros & Reflection
All UE reflection macros require `GENERATED_BODY()` inside the class/struct and the corresponding `.generated.h` include.
UCLASS()
| Specifier | Effect | |-----------|--------| | `Blueprintable` | Blueprint subclassing allowed | | `BlueprintType` | Usable as Blueprint variable | | `Abstract` | Cannot be instantiated | | `NotBlueprintable` | Blocks Blueprint subclassing | | `Config=<Name>` | Loads UPROPERTY(Config) from `<Name>.ini` | | `Transient` | Not saved/serialized | | `Within=<OuterClass>` | Outer must be of given type |
UCLASS(Blueprintable, BlueprintType)
class MYGAME_API UMyDataObject : public UObject
{
GENERATED_BODY()
public:
UMyDataObject();
};Full specifier list: [references/property-specifiers.md](references/property-specifiers.md).
UPROPERTY()
UCLASS(Blueprintable)
class MYGAME_API AMyCharacter : public ACharacter
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Stats")
float MaxHealth = 100.f;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Stats")
float CurrentHealth;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Config")
int32 MaxLevel = 50;
UPROPERTY(ReplicatedUsing=OnRep_Health, Category="Replication")
float ReplicatedHealth;
UPROPERTY(Transient) // Not serialized; GC still tracks
TObjectPtr<UParticleSystemComponent> CachedFX;
UPROPERTY(SaveGame, BlueprintReadWrite, Category="Persistence")
int32 PlayerScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Stats",
meta=(ClampMin="0.0", ClampMax="1.0"))
float DamageMultiplier = 1.f;
UFUNCTION()
void OnRep_Health();
virtual void GetLifetimeReplicatedProps(
TArray<FLifetimeProperty>& OutLifetimeProps) const override;
};UFUNCTION()
UFUNCTION(BlueprintCallable, Category="Actions") void PerformAttack(float Damage); UFUNCTION(BlueprintPure, Category="Queries") float GetHealthPercent() const; UFUNCTION(BlueprintNativeEvent, Category="Events") // C++ provides _Implementation void OnDamageTaken(float Amount); virtual void OnDamageTaken_Implementation(float Amount); UFUNCTION(BlueprintImplementableEvent, Category="Events") // Blueprint must implement void OnLevelUp(int32 NewLevel); UFUNCTION(Server, Reliable, WithValidation) // RPC: runs on server void ServerFireWeapon(FVector Origin, FVector Direction); void ServerFireWeapon_Implementation(FVector Origin, FVector Direction); bool ServerFireWeapon_Validate(FVector Origin, FVector Direction); UFUNCTION(Client, Reliable) // RPC: runs on owning client void ClientShowDamageNumber(float Amount); void ClientShowDamageNumber_Implementation(float Amount); UFUNCTION(NetMulticast, Reliable) // RPC: runs on all void MulticastPlayEffect(FVector Location); void MulticastPlayEffect_Implementation(FVector Location); UFUNCTION(Exec) // Console command (~ in-game) void DebugResetStats(); // Works on PC, Pawn, HUD, GM, GI, CheatManager
USTRUCT() and UENUM()
// UE5: always GENERATED_BODY() — never GENERATED_USTRUCT_BODY()
USTRUCT(BlueprintType)
struct MYGAME_API FWeaponStats
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite) float BaseDamage = 10.f;
UPROPERTY(EditAnywhere, BlueprintReadWrite) float FireRate = 0.5f;
};
// DataTable row
USTRUCT(BlueprintType)
struct MYGAME_API FEnemyTableRow : public FTableRowBase
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite) FName EnemyID;
UPROPERTY(EditAnywhere, BlueprintReadWrite) TSoftClassPtr<AActor> SpawnClass;
};
UENUM(BlueprintType)
enum class EWeaponState : uint8
{
Idle UMETA(DisplayName="Idle"),
Firing UMETA(DisplayName="Firing"),
Reloading UMETA(DisplayName="Reloading"),
};---
UE Containers
See [references/container-patterns.md](references/container-patterns.md) for full API and performance guide.
TArray — Ordered Dynamic Array
TArray<FString> Names;
Names.Add(TEXT("Alpha"));
Names.Emplace(TEXT("Beta")); // Construct in-place (avoids copy)
Names.Reserve(100); // Pre-allocate
FString First = Names[0];
bool bHas = Names.Contains(TEXT("Alpha"));
int32 Idx = Names.Find(TEXT("Beta")); // INDEX_NONE if absent
FString* Ptr = Names.FindByPredicate([](const FString& S){ return S.StartsWith(TEXT("A")); });
Names.Sort([](const FString& A, const FString& B){ return A.Len() < B.LA collection of 27 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.
Other skills on unreal-engine-skills.
- /ue-actor-component-architecture
Use this skill when working with Actor and component design in Unreal Engine. Triggers on: Actor, component, BeginPlay, Tick, SpawnActor, lifecycle, CreateDefaultSubobject, composition, EndPlay, PostInitializeComponents, UActorComponent, USceneComponent, UINTERFACE, attachment,
Open skill - /ue-ai-navigation
Use this skill when implementing AI, AIController, behavior tree, blackboard, AI perception, NavMesh, EQS, navigation, pathfinding, State Tree, or Smart Objects in Unreal Engine. See references/behavior-tree-patterns.md for BT patterns and references/eqs-reference.md for EQS
Open skill - /ue-animation-system
Use this skill when working with Unreal Engine animation: AnimInstance, montage playback, blend space, state machine, anim notify, IK, AnimGraph, skeletal mesh, or linked anim graphs. See references/anim-notify-reference.md for notify patterns and references/locomotion-setup.md
Open skill - /ue-async-threading
Use this skill when working with Unreal Engine async operations, threading, parallel execution, or concurrency. Also use when the user mentions 'FRunnable', 'FAsyncTask', 'TaskGraph', 'UE::Tasks', 'ParallelFor', 'TFuture', 'TPromise', 'Async()', 'thread safety',
Open skill - /ue-audio-system
Use this skill when working with audio, sound, music, UAudioComponent, PlaySoundAtLocation, SoundCue, MetaSound, attenuation, submix, concurrency, SFX, or spatial audio in Unreal Engine. See references/audio-setup-patterns.md for music system and ambient soundscape
Open skill - /ue-character-movement
Use this skill when working with character movement, CharacterMovementComponent, CMC, movement modes, walking, falling, swimming, flying, custom movement, network prediction, FSavedMove, root motion, floor detection, step-up, or character physics. Also use for 'PhysWalking',
Open skill

