From code-analysis-unreal
Unreal Engine 5 framework strategy for code-analysis. Provides UE5 entry points, virtual entry points, dead code exclusions, and phase adjustments. …v2: ue-deps owned by pre_analysis_agent (ue-deps-navigator); inherits cpp static_tools in a C++ project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-analysis-unreal:strategyhaikuThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This strategy declares a pre-analysis agent via the `pre_analysis_agent` frontmatter field.
This strategy declares a pre-analysis agent via the pre_analysis_agent frontmatter field.
When structure-analyzer loads this strategy during Phase 1 initialization, it will invoke
the declared agent (ue-deps-navigator) before per-file analysis begins.
No manual invocation required — the core orchestrator handles discovery.
This framework pack declares its own detection signatures. The core /analyze init gate
scans all installed code-analysis-{framework}:strategy packs and applies each pack's
framework_detection signatures to decide which framework pack(s) to load.
framework_detection:
name: unreal
requires_language: cpp # framework packs may target a specific language
min_signatures: 2 # need this many signatures to match
signatures:
- kind: file_exists
pattern: "**/*.Build.cs"
- kind: file_exists
pattern: "**/*.uproject"
- kind: file_exists
pattern: "**/*.uplugin"
- kind: source_macro
macros: ["UCLASS", "USTRUCT", "UENUM", "UPROPERTY", "UFUNCTION"]
- kind: source_include
patterns: ["GameFramework/", "Engine/GameInstance.h"]
- kind: source_macro
macros: ["IMPLEMENT_PRIMARY_GAME_MODULE", "IMPLEMENT_MODULE"]
Signature kinds (canonical):
file_exists: matches if any file matches the given pattern (glob) in the reposource_macro: matches if any listed macro is used in source files (grep-able via GitNexus or shell)source_include: matches if any listed include pattern appears in source filesAdd to the C++ language strategy exclusions:
*.generated.h — UE Header Tool output*.gen.cpp — UE auto-generated codeIntermediate/** — build artifactsPlugins/**/Binaries/** — plugin binariesUE5 has no user-level int main(). Game project entry points are:
| Class Type | Role | Detection |
|---|---|---|
UGameInstance subclass | Game-wide lifecycle | Inheritance from UGameInstance |
AGameModeBase subclass | Per-mode game logic | Inheritance from AGameModeBase |
APlayerController subclass | Player input/control | Inheritance from APlayerController |
AGameStateBase subclass | Shared game state | Inheritance from AGameStateBase |
| Module registration file | Module init | IMPLEMENT_PRIMARY_GAME_MODULE macro |
The following YAML block is the authoritative declaration consumed by phase3-trace.
Surrounding prose is clarifying commentary only.
virtual_entry_points:
- name: BeginPlay
kind: lifecycle
- name: EndPlay
kind: lifecycle
- name: Tick
kind: lifecycle
- name: PostInitializeComponents
kind: lifecycle
- name: OnConstruction
kind: lifecycle
- name: SetupInputComponent
kind: lifecycle
- name: OnPossess
kind: lifecycle
- name: OnUnPossess
kind: lifecycle
- name: Init
kind: lifecycle
- name: Shutdown
kind: lifecycle
- name: InitGame
kind: lifecycle
- name: NativeConstruct
kind: lifecycle
- name: NativeDestruct
kind: lifecycle
- name: NativeTick
kind: lifecycle
- name: NativeInitializeAnimation
kind: lifecycle
- name: NativeUpdateAnimation
kind: lifecycle
reflection_markers:
- UFUNCTION(BlueprintCallable)
- UFUNCTION(BlueprintPure)
- UFUNCTION(BlueprintImplementableEvent)
- UFUNCTION(BlueprintNativeEvent)
- UFUNCTION(Exec)
- UFUNCTION(Server)
- UFUNCTION(Client)
- UFUNCTION(NetMulticast)
UE5 is event-driven. Engine-called virtual overrides are virtual entry points.
BeginPlay() — game start or spawnEndPlay(const EEndPlayReason::Type) — destructionTick(float DeltaTime) — every framePostInitializeComponents() — after component initOnConstruction() — editor/spawn constructionSetupInputComponent() — input binding setupOnPossess(APawn*) / OnUnPossess() — pawn ownershipInit() — instance initializationOnStart() — game startShutdown() — shutdownInitGame() — game initializationPreLogin() / PostLogin() — player connectionHandleStartingNewPlayer() — new player handlingNativeConstruct() — widget creationNativeDestruct() — widget destructionNativeTick(const FGeometry&, float) — every frameNativeInitializeAnimation() — animation initNativeUpdateAnimation(float) — every frame updateFunctions registered via these patterns are virtual entry points:
AddDynamic(this, &UClass::Handler) — dynamic delegateBindUObject(this, &UClass::Handler) — general delegateAddUObject(this, &UClass::Handler) — multicast delegateBindAction("Name", IE_Pressed, this, &UClass::Handler) — legacy inputEnhancedInputComponent->BindAction(Action, ETriggerEvent::Triggered, this, &UClass::Handler) — Enhanced InputGetWorldTimerManager().SetTimer(Handle, this, &UClass::Handler, Rate)GetWorldTimerManager().SetTimerForNextTick(this, &UClass::Handler)Do NOT flag as dead code:
UFUNCTION(BlueprintCallable) / UFUNCTION(BlueprintPure) — callable from BlueprintUFUNCTION(BlueprintImplementableEvent) — implemented in BlueprintUFUNCTION(BlueprintNativeEvent) — C++ default + Blueprint overrideUFUNCTION(Exec) — console commandUPROPERTY(EditAnywhere) / UPROPERTY(BlueprintReadWrite) — editor/BP accessUFUNCTION(Server) — server RPCUFUNCTION(Client) — client RPCUFUNCTION(NetMulticast) — multicast RPC*_Implementation() suffix — RPC/BlueprintNativeEvent body*_Validate() suffix — RPC validationPostEditChangeProperty() — editor property change hookPostLoad() — asset load hookSerialize() — custom serializationGetLifetimeReplicatedProps() — network replication setupFObjectInitializer param — CDO constructionStartupModule() / ShutdownModule() — module lifecycleIMPLEMENT_MODULE / IMPLEMENT_PRIMARY_GAME_MODULE.Build.cs Config AnalysisWhen file_role == "config" and file is .Build.cs:
PublicDependencyModuleNames and PrivateDependencyModuleNamesmcp__ue-deps-mcp__get_module_info(name={module_name}) for module-level dependency consistency{ProjectName}.h): precompiled header, very high dependency count is normal. Exclude from hub warnings or annotate separately.*.generated.h: UHT output. Exclude from dependency graph..Build.cs: module-level dependencies. Treat as separate layer from C++ include dependencies.Cast<>, FindComponentByClass<> — runtime type lookups invisible in static dependency graph. Flag as hidden coupling.Add to C++ declaration analysis:
UCLASS / USTRUCT / UENUM specifier analysis (Blueprintable, BlueprintType, Abstract)UPROPERTY classification: EditAnywhere / VisibleAnywhere / BlueprintReadWrite / ReplicatedUFUNCTION call path classification: BlueprintCallable / Server / Client / NetMulticast / ExecAdd to C++ implementation analysis:
Super:: call audit — lifecycle overrides missing parent call is a bugIsValid() / nullptr check patterns for UObject pointersNewObject<>() / CreateDefaultSubobject<>() usage context (constructor vs runtime)GetWorld() null check — nullptr possible in editor/CDO contextUPROPERTY() → dangling pointer riskThis plugin provides the following extension hooks. The core pipeline registers these at init time and invokes them at the corresponding pipeline stages.
| Hook Point | Skill Name | Invocation Context |
|---|---|---|
after-analyze-file | code-analysis-unreal:after-analyze-file | Per-file, after mirror document is written. Triggers sub-hooks: tick-audit, replication-audit |
after-phase3-trace | code-analysis-unreal:after-phase3-trace | After Phase 3 flow analysis completes |
phase4-docs | code-analysis-unreal:phase4-docs | During Phase 4 documentation generation |
Supplements the code-analysis-cpp:strategy tool list — the C++ pack runs first. The UE5 pack contributes no additional static tools: ue-deps is handled exclusively by the pre_analysis_agent (ue-deps-navigator) in Step 0 of the Phase 1 pipeline, before static tool dispatch. Placing it here would cause a second redundant invocation.
static_tools:
phase1: []
phase2: []
phase3: []
phase4: []
Installation: uv tool install <plugin-root>/code-analysis-unreal/cli.
npx claudepluginhub juyeongyi/jylee_claude_marketplace --plugin code-analysis-unrealGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.