ue5-cpp-scaffold
Generate Unreal Engine 5 C++ class boilerplate following Epic coding standards. Creates Actors, Components, Subsystems, GameplayAbilities, AttributeSets, Widgets, and more with proper UPROPERTY/UFUNCTION macros, include hierarchy, and module API macros. Use whenever creating new UE5 C++ classes, scaffolding gameplay systems, generating header/source pairs, or setting up GAS classes. Also use when the user asks to "create a new Actor", "add a component", "scaffold a gameplay ability", or "make a UE5 class".
Best use case
ue5-cpp-scaffold is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate Unreal Engine 5 C++ class boilerplate following Epic coding standards. Creates Actors, Components, Subsystems, GameplayAbilities, AttributeSets, Widgets, and more with proper UPROPERTY/UFUNCTION macros, include hierarchy, and module API macros. Use whenever creating new UE5 C++ classes, scaffolding gameplay systems, generating header/source pairs, or setting up GAS classes. Also use when the user asks to "create a new Actor", "add a component", "scaffold a gameplay ability", or "make a UE5 class".
Teams using ue5-cpp-scaffold should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ue5-cpp-scaffold/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ue5-cpp-scaffold Compares
| Feature / Agent | ue5-cpp-scaffold | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate Unreal Engine 5 C++ class boilerplate following Epic coding standards. Creates Actors, Components, Subsystems, GameplayAbilities, AttributeSets, Widgets, and more with proper UPROPERTY/UFUNCTION macros, include hierarchy, and module API macros. Use whenever creating new UE5 C++ classes, scaffolding gameplay systems, generating header/source pairs, or setting up GAS classes. Also use when the user asks to "create a new Actor", "add a component", "scaffold a gameplay ability", or "make a UE5 class".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# UE5 C++ Scaffold Skill
Generates production-quality UE5 C++ header/source file pairs following Epic's coding standard. Handles all the boilerplate — macros, includes, forward declarations, and module API exports.
## How It Works
1. Ask the user what class type they need
2. Gather class name, parent class, and key properties/functions
3. Generate the .h and .cpp files with full boilerplate
4. Place files in the correct Source directory location
## Class Type Templates
### Actor
```cpp
// MyActor.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class MODULENAME_API AMyActor : public AActor
{
GENERATED_BODY()
public:
AMyActor();
protected:
virtual void BeginPlay() override;
virtual void Tick(float DeltaTime) override;
};
```
### Character
```cpp
// MyCharacter.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "AbilitySystemInterface.h"
#include "MyCharacter.generated.h"
class UAbilitySystemComponent;
class USpringArmComponent;
class UCameraComponent;
UCLASS()
class MODULENAME_API AMyCharacter : public ACharacter, public IAbilitySystemInterface
{
GENERATED_BODY()
public:
AMyCharacter();
virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override;
protected:
virtual void BeginPlay() override;
virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Camera")
TObjectPtr<USpringArmComponent> SpringArmComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Camera")
TObjectPtr<UCameraComponent> CameraComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Abilities")
TObjectPtr<UAbilitySystemComponent> AbilitySystemComponent;
};
```
### ActorComponent
```cpp
// MyComponent.h
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "MyComponent.generated.h"
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class MODULENAME_API UMyComponent : public UActorComponent
{
GENERATED_BODY()
public:
UMyComponent();
protected:
virtual void BeginPlay() override;
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
};
```
### SceneComponent
```cpp
// MySceneComponent.h
#pragma once
#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "MySceneComponent.generated.h"
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class MODULENAME_API UMySceneComponent : public USceneComponent
{
GENERATED_BODY()
public:
UMySceneComponent();
protected:
virtual void BeginPlay() override;
};
```
### GameplayAbility (GAS)
```cpp
// GA_MyAbility.h
#pragma once
#include "CoreMinimal.h"
#include "Abilities/GameplayAbility.h"
#include "GA_MyAbility.generated.h"
UCLASS()
class MODULENAME_API UGA_MyAbility : public UGameplayAbility
{
GENERATED_BODY()
public:
UGA_MyAbility();
virtual void ActivateAbility(const FGameplayAbilitySpecHandle Handle,
const FGameplayAbilityActorInfo* ActorInfo,
const FGameplayAbilityActivationInfo ActivationInfo,
const FGameplayEventData* TriggerEventData) override;
virtual void EndAbility(const FGameplayAbilitySpecHandle Handle,
const FGameplayAbilityActorInfo* ActorInfo,
const FGameplayAbilityActivationInfo ActivationInfo,
bool bReplicateEndAbility, bool bWasCancelled) override;
virtual bool CanActivateAbility(const FGameplayAbilitySpecHandle Handle,
const FGameplayAbilityActorInfo* ActorInfo,
const FGameplayTagContainer* SourceTags = nullptr,
const FGameplayTagContainer* TargetTags = nullptr,
OUT FGameplayTagContainer* OptionalRelevantTags = nullptr) const override;
protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Ability")
float CooldownDuration = 1.0f;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Ability")
float Cost = 10.0f;
};
```
### AttributeSet (GAS)
```cpp
// MyAttributeSet.h
#pragma once
#include "CoreMinimal.h"
#include "AttributeSet.h"
#include "AbilitySystemComponent.h"
#include "MyAttributeSet.generated.h"
#define ATTRIBUTE_ACCESSORS(ClassName, PropertyName) \
GAMEPLAYATTRIBUTE_PROPERTY_GETTER(ClassName, PropertyName) \
GAMEPLAYATTRIBUTE_VALUE_GETTER(PropertyName) \
GAMEPLAYATTRIBUTE_VALUE_SETTER(PropertyName) \
GAMEPLAYATTRIBUTE_VALUE_INITTER(PropertyName)
UCLASS()
class MODULENAME_API UMyAttributeSet : public UAttributeSet
{
GENERATED_BODY()
public:
UMyAttributeSet();
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
virtual void PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) override;
virtual void PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data) override;
UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_Health, Category = "Attributes")
FGameplayAttributeData Health;
ATTRIBUTE_ACCESSORS(UMyAttributeSet, Health)
UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_MaxHealth, Category = "Attributes")
FGameplayAttributeData MaxHealth;
ATTRIBUTE_ACCESSORS(UMyAttributeSet, MaxHealth)
UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_Mana, Category = "Attributes")
FGameplayAttributeData Mana;
ATTRIBUTE_ACCESSORS(UMyAttributeSet, Mana)
protected:
UFUNCTION()
virtual void OnRep_Health(const FGameplayAttributeData& OldHealth);
UFUNCTION()
virtual void OnRep_MaxHealth(const FGameplayAttributeData& OldMaxHealth);
UFUNCTION()
virtual void OnRep_Mana(const FGameplayAttributeData& OldMana);
};
```
### GameMode
```cpp
// MyGameMode.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "MyGameMode.generated.h"
UCLASS()
class MODULENAME_API AMyGameMode : public AGameModeBase
{
GENERATED_BODY()
public:
AMyGameMode();
virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage) override;
virtual APawn* SpawnDefaultPawnAtTransform_Implementation(AController* NewPlayer, const FTransform& SpawnTransform) override;
};
```
### PlayerController
```cpp
// MyPlayerController.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "MyPlayerController.generated.h"
class UInputMappingContext;
class UInputAction;
UCLASS()
class MODULENAME_API AMyPlayerController : public APlayerController
{
GENERATED_BODY()
public:
AMyPlayerController();
protected:
virtual void BeginPlay() override;
virtual void SetupInputComponent() override;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input")
TObjectPtr<UInputMappingContext> DefaultMappingContext;
};
```
### Subsystem
```cpp
// MyGameInstanceSubsystem.h
#pragma once
#include "CoreMinimal.h"
#include "Subsystems/GameInstanceSubsystem.h"
#include "MyGameInstanceSubsystem.generated.h"
UCLASS()
class MODULENAME_API UMyGameInstanceSubsystem : public UGameInstanceSubsystem
{
GENERATED_BODY()
public:
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
virtual void Deinitialize() override;
UFUNCTION(BlueprintCallable, Category = "MySubsystem")
void DoSomething();
};
```
### UObject (Data Asset)
```cpp
// MyDataAsset.h
#pragma once
#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "MyDataAsset.generated.h"
UCLASS(BlueprintType)
class MODULENAME_API UMyDataAsset : public UPrimaryDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
FName ItemName;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
TObjectPtr<UTexture2D> Icon;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
float BaseValue = 1.0f;
virtual FPrimaryAssetId GetPrimaryAssetId() const override;
};
```
### Interface
```cpp
// Interactable.h
#pragma once
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "Interactable.generated.h"
UINTERFACE(MinimalAPI, Blueprintable)
class UInteractable : public UInterface
{
GENERATED_BODY()
};
class MODULENAME_API IInteractable
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Interaction")
void Interact(AActor* Caller);
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Interaction")
FText GetInteractionText() const;
};
```
### AnimInstance (Animation Blueprint Base)
```cpp
// MyAnimInstance.h
#pragma once
#include "CoreMinimal.h"
#include "Animation/AnimInstance.h"
#include "MyAnimInstance.generated.h"
UCLASS()
class MODULENAME_API UMyAnimInstance : public UAnimInstance
{
GENERATED_BODY()
public:
virtual void NativeInitializeAnimation() override;
virtual void NativeUpdateAnimation(float DeltaSeconds) override;
protected:
UPROPERTY(BlueprintReadOnly, Category = "Movement")
float Speed = 0.0f;
UPROPERTY(BlueprintReadOnly, Category = "Movement")
float Direction = 0.0f;
UPROPERTY(BlueprintReadOnly, Category = "Movement")
bool bIsInAir = false;
UPROPERTY(BlueprintReadOnly, Category = "Movement")
bool bIsAccelerating = false;
};
```
```cpp
// MyAnimInstance.cpp
#include "MyAnimInstance.h"
#include "GameFramework/Character.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "KismetAnimationLibrary.h"
void UMyAnimInstance::NativeInitializeAnimation()
{
Super::NativeInitializeAnimation();
}
void UMyAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
{
Super::NativeUpdateAnimation(DeltaSeconds);
if (APawn* Pawn = TryGetPawnOwner())
{
FVector Velocity = Pawn->GetVelocity();
Speed = Velocity.Size2D();
Direction = UKismetAnimationLibrary::CalculateDirection(Velocity, Pawn->GetActorRotation());
if (ACharacter* Character = Cast<ACharacter>(Pawn))
{
bIsInAir = Character->GetCharacterMovement()->IsFalling();
bIsAccelerating = Character->GetCharacterMovement()->GetCurrentAcceleration().Size() > 0.0f;
}
}
}
```
### BlueprintFunctionLibrary (Static Utility Functions)
```cpp
// MyBlueprintFunctionLibrary.h
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"
UCLASS()
class MODULENAME_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Utilities", meta = (WorldContext = "WorldContextObject"))
static AActor* FindClosestActorOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, FVector Origin, float MaxDistance = 5000.0f);
UFUNCTION(BlueprintPure, Category = "Math")
static FVector GetRandomPointInRadius(FVector Origin, float Radius);
UFUNCTION(BlueprintCallable, Category = "Utilities")
static FString FormatTime(float TimeInSeconds);
};
```
## Generation Rules
1. **Replace `MODULENAME`** with the actual module name in uppercase (e.g., `MYPROJECT_API`)
2. **File placement**: Headers in `Source/[Module]/Public/[Category]/`, sources in `Source/[Module]/Private/[Category]/`
3. **Forward declarations** over includes in headers — include only in .cpp
4. **Use `TObjectPtr<>`** for all UObject pointer members
5. **Include `[ClassName].generated.h`** as the LAST include in every header
6. **Match .cpp includes**: Always include the matching header first, then engine headers
7. **Category organization**: Group properties and functions by Category for editor display
## Reference
For the full Epic C++ coding standard, see:
`dev.epicgames.com/documentation/en-us/unreal-engine/epic-cplusplus-coding-standard-for-unreal-engine`
For GAS documentation: `github.com/tranek/GASDocumentation`Related Skills
scaffolding-oracle-to-postgres-migration-test-project
Scaffolds an xUnit integration test project for validating Oracle-to-PostgreSQL database migration behavior in .NET solutions. Creates the test project, transaction-rollback base class, and seed data manager. Use when setting up test infrastructure before writing migration integration tests, or when a test project is needed for Oracle-to-PostgreSQL validation.
power-apps-code-app-scaffold
Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration
saas-scaffolder
Generates complete, production-ready SaaS project boilerplate including authentication, database schemas, billing integration, API routes, and a working dashboard using Next.js 14+ App Router, TypeScript, Tailwind CSS, shadcn/ui, Drizzle ORM, and Stripe. Use when the user wants to create a new SaaS app, start a subscription-based web project, scaffold a Next.js application, or mentions terms like starter template, boilerplate, new project, or wiring up auth and payments.
python-development-python-scaffold
You are a Python project architecture expert specializing in scaffolding production-ready Python applications. Generate complete project structures with modern tooling (uv, FastAPI, Django), type hint
javascript-typescript-typescript-scaffold
You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N
frontend-mobile-development-component-scaffold
You are a React component architecture expert specializing in scaffolding production-ready, accessible, and performant components. Generate complete component implementations with TypeScript, tests, s
project-scaffolding
IDE-grade project scaffolding wizard for creating new projects with comprehensive configuration. Supports 70+ project types: HTML/CSS websites, React, Next.js, Vue, Astro, Remix, React Native, Flutter, Expo, FastAPI, Django, Express, NestJS, Go/Gin, Rust/Axum, Spring Boot, Hono, Elysia, Chrome Extensions, VS Code Extensions, Tauri desktop apps, serverless functions, and more. Provides WebStorm/PyCharm-level project creation with interactive SDK selection, framework configuration, database setup, and DevOps tooling. Use when: creating a new project, setting up a framework application, initializing a codebase, scaffolding boilerplate, building extensions, creating mobile/desktop/web apps, setting up monorepos, or making static websites/landing pages.
test-scaffolding
Generate test file scaffolds from source analysis with language-appropriate templates.
project-scaffolder
Creates plan.md, task.md, persona.md, project-context.md, and CLAUDE.md for new self-learning resource projects. Use when: (1) /init command is invoked, (2) setting up a new tutorial/guide/documentation project, (3) structure-designer agent needs templates for learning resource structure design. Provides hierarchical Part/Chapter/Section templates with page allocation.
scaffolding-openai-agents
Builds AI agents using OpenAI Agents SDK with async/await patterns and multi-agent orchestration. Use when creating tutoring agents, building agent handoffs, implementing tool-calling agents, or orchestrating multiple specialists. Covers Agent class, Runner patterns, function tools, guardrails, and streaming responses. NOT when using raw OpenAI API without SDK or other agent frameworks like LangChain.
scaffolding-fastapi-dapr
Build production-grade FastAPI backends with SQLModel, Dapr integration, and JWT authentication. Use when building REST APIs with Neon PostgreSQL, implementing event-driven microservices with Dapr pub/sub, scheduling jobs, or creating CRUD endpoints with JWT/JWKS verification. NOT when building simple scripts or non-microservice architectures.
module-scaffolder
Scaffolds new feature modules in DevPrep AI following the 6-folder architecture with proper TypeScript interfaces, path aliases, and quality standards. Use when creating new domains like 'analytics', 'notifications', or any new feature module.