Unreal Engine 5 (UE 5.8) C++ gameplay code: UCLASS and UPROPERTY reflection, the Gameplay Framework, GC-safe pointers, Build.cs and command-line builds. Use for GENERATED_BODY, Live Coding, "unresolved external symbol" or UHT errors. Not for Blueprints (`unreal-blueprints`), Enhanced Input (`unreal-enhanced-input`) or packaging (`unreal-packaging`); engine source builds are out of scope.
Ships in gamedev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write UE5 gameplay C++ that compiles the first time, survives garbage collection and is testable from a terminal. Targets UE 5.8.
AActor, APawn, ACharacter, AGameModeBase,
UActorComponent), reflection macros, or a module's *.Build.cs.UObjects.When not to use: designer-facing visual logic → unreal-blueprints. Input assets and
bindings → unreal-enhanced-input. Behavior Trees and EQS → unreal-behavior-trees. Cooking
and packaging → unreal-packaging. Building Unreal Engine itself from source is not covered;
follow Epic's source-build instructions for the engine's GitHub repository.
EngineAssociation in the .uproject gives the engine version; the
Modules list and Source/<Module>/<Module>.Build.cs give module names and dependencies;
existing base classes in Source/ tell you what to extend. Match the existing API macro
(MYGAME_API) and folder layout (Public/, Private/).A actors, U other
UObjects and components, F structs, E enums, I interfaces). GENERATED_BODY() is
the first line in the body and #include "Name.generated.h" is the last include.UObject pointer GC-visible. Members that hold a UObject are
UPROPERTY() with TObjectPtr<T>; non-owning references are TWeakObjectPtr<T>. This is
the most common source of random crashes.CreateDefaultSubobject, attach with
SetupAttachment, and set RootComponent. Runtime components use NewObject plus
RegisterComponent.PublicDependencyModuleNames (or Private... when only the
.cpp files use them) whenever you include another module's headers, for example
EnhancedInput, AIModule, Niagara, UMG.// Pickup.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Pickup.generated.h" // last include
UCLASS()
class MYGAME_API APickup : public AActor
{
GENERATED_BODY()
public:
APickup();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup")
int32 ScoreValue = 10;
UFUNCTION(BlueprintCallable, Category = "Pickup")
void Collect();
protected:
UPROPERTY(VisibleAnywhere)
TObjectPtr<UStaticMeshComponent> Mesh; // UPROPERTY keeps it alive and visible to the editor
};
// Source/MyGame/Private/Tests/ScoreTests.cpp
#include "Misc/AutomationTest.h"
#if WITH_DEV_AUTOMATION_TESTS
IMPLEMENT_SIMPLE_AUTOMATION_TEST(FScoreAddsTest, "MyGame.Score.Adds",
EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter)
bool FScoreAddsTest::RunTest(const FString& Parameters)
{
FScoreBoard Board; // plain logic: no world needed
Board.Add(10);
TestEqual(TEXT("score after one add"), Board.Total(), 10);
return true; // failed Test* calls still mark the test failed
}
#endif
Keep testable rules in plain structs or functions so most tests need no world; use functional tests in a test map for behavior that needs actors.
Say which of these you ran and paste the relevant result lines; "it should compile" is not a check.
Engine/Build/BatchFiles/Build.bat <Project>Editor Win64 Development -Project="<abs path>.uproject" -WaitMutex
(Linux: Engine/Build/BatchFiles/Linux/Build.sh <Project>Editor Linux Development ...;
macOS: Engine/Build/BatchFiles/Mac/Build.sh <Project>Editor Mac Development ...). Fix
every error and every warning in files you touched.UnrealEditor-Cmd <Project>.uproject -ExecCmds="Automation RunTest MyGame;Quit" -unattended -nullrhi -nosplash -ReportExportPath="<dir>".
RunTest takes a full name, a dotted prefix, Test1+Test2, or Group:<name>. Read the
JSON report or the Test Completed lines in the log, and confirm the expected tests ran: a
wrong filter runs nothing and still looks clean.unreal-mcp skill connected to a running editor, its testing
toolset can discover and run automation tests and return detailed results.GENERATED_BODY() is missing, or the file was added while the editor ran and project
files weren't regenerated.Build.cs.
Find the header's path under Engine/Source/ or Engine/Plugins/ to get the module name.UObject* member without UPROPERTY,
or a container of them, so GC freed the object. IsValid() on a dangling raw pointer does
not save you.UPROPERTYs or functions rely on Object
Reinstancing, which is on by default but less reliable; pointers cached to reinstanced
objects go stale. If the editor or Blueprints misbehave afterwards, close the editor and do a
full build.CreateDefaultSubobject outside the constructor: asserts. At runtime use NewObject and
RegisterComponent, otherwise the component never ticks or renders.Super:: (BeginPlay, Tick, EndPlay,
GetLifetimeReplicatedProps) silently skip engine setup.references/components-and-gc.md when creating or attaching components at runtime,
choosing between TObjectPtr, TWeakObjectPtr, TStrongObjectPtr and FGCObject, adding
USTRUCT/UENUM data, or replicating a property with OnRep_.unreal-blueprints: exposing C++ to designers.unreal-enhanced-input: binding input in a C++ Pawn or Character.unreal-behavior-trees: AIControllers and custom BT nodes.unreal-packaging: cooking and shipping the build.Last verified: 2026-11-11.
.slnx solution support.What SKILL.md sets; muted values are Claude Code's defaults
/gamedev:unreal-cpp-gameplayfrom gamedev
npx claudepluginhub cirobarone78/games-skill --plugin gamedev80 skills in this plugin
/ai-behavior-trees-utility-aiEngine-neutral behavior tree and utility AI code for NPCs in any language: Blackboard, reactive composites, decorators and response-curve scoring. Use when an enemy keeps chasing after losing sight, restarts its action every frame or flip-flops between choices. Not for FSMs, steering or pathfinding (`game-ai`) or Unreal BT, EQS and StateTree (`unreal-behavior-trees`).
/audio-designEngine-neutral game audio technique: bus layout, volume sliders in decibels, loudness, ducking music under dialogue, adaptive music and SFX variation, with Godot, Unity and FMOD/Wwise mappings. Use when mixing a game, making music react to combat, fixing repetitive footsteps or beat sync, or a mix that clips or pumps. Not for the Godot audio API (`godot-audio`).
/