Home › Unreal Engine (C++) › Unreal Engine C++ CLAUDE.md

Unreal Engine C++ CLAUDE.md

CLAUDE.md for Unreal Engine 5 C++ gameplay code: UPROPERTY rules, GC safety, and Blueprint exposure.

Claude Code (CLAUDE.md)Unreal Engine (C++)

How to use

Save this as CLAUDE.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

CLAUDE.mdDownload  
# CLAUDE.md — Unreal Engine 5 (C++)

## Build
- Build from the IDE or `Build.bat <Project>Editor Win64 Development <path>.uproject`. After adding a UCLASS/USTRUCT, regenerate project files if needed.
- Never edit files in `Intermediate/`, `Binaries/`, `Saved/`, or `*.generated.h`.

## Conventions
- Follow Epic's naming: `A` Actors, `U` UObjects/components, `F` structs, `E` enums, `I` interfaces, `b` prefix for bools.
- Any UObject pointer stored as a member must be a `UPROPERTY()` (use `TObjectPtr<>`) so the GC tracks it. Use `TWeakObjectPtr` for non-owning references.
- Expose tunables with `UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="...")`; keep logic in C++, content/tuning in Blueprints.
- Disable Tick (`PrimaryActorTick.bCanEverTick = false`) unless needed; prefer timers and events/delegates.
- Gameplay ability work uses GAS if the project already includes it.
- Multiplayer: mark replicated props with `Replicated`/`ReplicatedUsing` and implement `GetLifetimeReplicatedProps`; validate Server RPCs.
- Use `UE_LOG` with a project log category, and `check`/`ensure` for invariants.

## Don't
- Don't use raw `new`/`delete` for UObjects (use `NewObject`/`SpawnActor`). Don't hold UObject pointers in non-UPROPERTY containers.

Related rules

AWS CDK (TypeScript) CLAUDE.md

CLAUDE.md for AWS CDK v2 apps in TypeScript: constructs, least-privilege grants, snapshot tests, and safe deploys.

Claude Code (CLAUDE.md)AWS CDK

Bun runtime CLAUDE.md

CLAUDE.md for TypeScript projects on Bun 1.2+: bun test, Bun.serve, built-in SQLite/Postgres, and bundling.

Claude Code (CLAUDE.md)Bun

Claude Agent SDK CLAUDE.md

CLAUDE.md for building agents with the Claude Agent SDK (Python/TypeScript): options, tools, permissions, and hooks.

Claude Code (CLAUDE.md)LLM apps & agents

Code reviewer subagent (Claude Code)

A Claude Code subagent definition that reviews the current diff for bugs, security, and tests, reporting by severity.

Claude Code (CLAUDE.md)Agent workflows

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.