agentleFS
muxammadmamajonovmuxammadmamajonov/dot-claude/.claude/skills/unreal/SKILL.md

unreal

Skill0 starsChanged 5 months agoMITView on GitHub

Use for Unreal Engine 4/5 games — C++ gameplay, Blueprints, Actors/UCLASS, Gameplay Ability System, asset pipeline, performance. Triggers — .uproject/.uasset, 'unreal', 'ue4', 'ue5', 'blueprint'.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every exposed UObject must have GENERATED_BODY() and a valid module in Build.cs.

    line 37
  2. Very specific:

    Use TObjectPtr<> (UE5) instead of raw UObject* pointers — enables GC tracking.

    line 38
  3. Very specific:

    Prefer FName/FText/FString for the correct semantic purpose: FName for identity, FText for UI, FString for manipulation.

    line 39
  4. Very specific:

    Keep Tick() bodies under 0.1 ms.

    line 41
  5. Distinctive:

    Import source assets at full resolution.

    line 50
  6. Distinctive:

    Never trust client input; validate on the server before applying.

    line 57
  7. Very specific:

    Do not call LoadObject / StaticFindObject at runtime in shipping builds — use Soft References and async load.

    line 60
  8. Very specific:

    Do not tick actors that don't need per-frame updates.

    line 61
  9. Very specific:

    Do not use global GEngine->AddOnScreenDebugMessage in shipping.

    line 62
  10. Very specific:

    Do not commit intermediate .uasset binary conflicts — always re-save through the editor after a merge.

    line 63

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Unreal Engine Development

When to use

  • Writing or reviewing Unreal C++ gameplay classes, components, or subsystems
  • Designing or debugging Blueprint graphs
  • Setting up asset import pipelines, LODs, or streaming
  • Profiling and fixing CPU/GPU frame-time issues
  • Configuring build targets, packaging, and platform-specific settings
  • Integrating third-party plugins or Marketplace assets

Workflow

  1. Classify the task — gameplay logic, rendering, physics, UI (UMG), networking, build/package, or asset pipeline.
  2. Confirm UE version — UE4 vs UE5 (Nanite, Lumen, PCG, Motion Matching differ significantly). Check UE_VERSION in Build.cs or the .uproject file.
  3. Choose the right abstraction layer:
    • Pure game logic → C++ AActor / UActorComponent subclass.
    • Designer-facing behaviour → expose via UPROPERTY(EditAnywhere, BlueprintReadWrite) and UFUNCTION(BlueprintCallable).
    • Prototype quickly → Blueprint; port hot paths to C++ once stable.
  4. Scaffold the class using the UE editor wizard (New C++ Class) to get correct macros, module includes, and UCLASS()/USTRUCT() boilerplate auto-generated.
  5. Add headers conservatively — include only what the .cpp needs; forward-declare in .h. Slow compile times are the biggest UE productivity killer.
  6. Implement and wire up:
    • Override lifecycle hooks in the correct order: PostInitializeComponents → BeginPlay → Tick → EndPlay.
    • Register delegates with AddDynamic for Blueprint-compatible events.
  7. Test in PIE (Play-In-Editor) before packaging. Use stat unit, stat fps, and the Session Frontend Profiler to catch regressions immediately.
  8. Profile with Unreal Insights for CPU traces; RenderDoc or Nvidia Nsight for GPU.
  9. Package via Project → Package Project (or RunUAT BuildCookRun) targeting the platform. Check log for cook errors before QA.
  10. Audit against .claude/checklists/performance.md and .claude/checklists/security.md before shipping.

Standards

C++ conventions

  • Every exposed UObject must have GENERATED_BODY() and a valid module in Build.cs.
  • Use TObjectPtr<> (UE5) instead of raw UObject* pointers — enables GC tracking.
  • Prefer FName/FText/FString for the correct semantic purpose: FName for identity, FText for UI, FString for manipulation.
  • Mark read-only Blueprint references BlueprintReadOnly; expose mutators through explicit UFUNCTION.
  • Keep Tick() bodies under 0.1 ms. Move anything heavier to async tasks, timers, or events.
  • Log with UE_LOG(LogYourCategory, Warning, TEXT("...")) — never printf.

Blueprints

  • Blueprints own visual state and designer-tweakable data; C++ owns logic and performance-critical paths.
  • Compile all Blueprints before packaging (Editor → Blueprints → Compile All Blueprints).
  • Name events and variables explicitly — avoid default NewVar_0 names.

Asset pipeline

  • Import source assets at full resolution; use LOD groups and Nanite (UE5) for runtime resolution.
  • Texture sizes must be power-of-two; use BC7 for colour, BC5 for normal maps, BC4 for greyscale.
  • Redirect assets via Asset Manager instead of direct StaticLoadObject — supports async loading.

Networking (multiplayer)

  • Mark server-authoritative state Replicated and UPROPERTY(ReplicatedUsing=OnRep_*).
  • RPCs: Server (_Implementation), Client, NetMulticast — validate authority with HasAuthority().
  • Never trust client input; validate on the server before applying.

Do not

  • Do not call LoadObject / StaticFindObject at runtime in shipping builds — use Soft References and async load.
  • Do not tick actors that don't need per-frame updates; disable with PrimaryActorTick.bCanEverTick = false.
  • Do not use global GEngine->AddOnScreenDebugMessage in shipping; wrap in #if !UE_BUILD_SHIPPING.
  • Do not commit intermediate .uasset binary conflicts — always re-save through the editor after a merge.

Common mistakes to avoid

MistakeFix
Holding UObject* in non-UObject classes without UPROPERTYThe GC will collect it mid-frame. Use UPROPERTY or FWeakObjectPtr.
Calling BeginPlay logic in the constructorConstructors run in the editor on CDO; use BeginPlay for runtime init.
Hot-reloading C++ with live delegates boundCan crash the editor; unbind delegates in EndPlay before reloading.
Streaming levels that stall the game threadAlways use async level loading (LoadStreamLevel with a delegate).
Packaging without cooking redirectorsPlayers see missing asset errors; run Fix Up Redirectors before cook.
Blueprint nativisation left enabled in UE4Produces brittle compiled code; disable unless specifically needed.

Output format

  • New C++ class: .h and .cpp pair with full UE boilerplate, matching module includes in Build.cs.
  • Blueprint guidance: numbered step-by-step with node names in code formatting.
  • Profiling report: table of hotspots with ms budget vs. actual and one recommended fix each.
  • Architecture decision: diagram description → rationale → trade-offs, referencing .claude/templates/architecture.md.

Related checklists

  • .claude/checklists/performance.md
  • .claude/checklists/security.md
  • .claude/checklists/qa.md

Related agents

  • .claude/agents/core/orchestrator.md
  • .claude/agents/engineering/devops-engineer.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.