{"id":"0ec774ad-424b-4a6e-ad5e-983f5be0a2ff","shortId":"qxK7DV","kind":"skill","title":"unreal-engine-cpp-pro","tagline":"Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.","description":"# Unreal Engine C++ Pro\n\nThis skill provides expert-level guidelines for developing with Unreal Engine 5 using C++. It focuses on writing robust, performant, and standard-compliant code.\n\n## When to Use\nUse this skill when:\n- Developing C++ code for Unreal Engine 5.x projects\n- Writing Actors, Components, or UObject-derived classes\n- Optimizing performance-critical code in Unreal Engine\n- Debugging memory leaks or garbage collection issues\n- Implementing Blueprint-exposed functionality\n- Following Epic Games' coding standards and conventions\n- Working with Unreal's reflection system (UCLASS, USTRUCT, UFUNCTION)\n- Managing asset loading and soft references\n\nDo not use this skill when:\n- Working with Blueprint-only projects (no C++ code)\n- Developing for Unreal Engine versions prior to 5.x\n- Working on non-Unreal game engines\n- The task is unrelated to Unreal Engine development\n\n## Core Principles\n\n1.  **UObject & Garbage Collection**:\n    *   Always use `UPROPERTY()` for `UObject*` member variables to ensure they are tracked by the Garbage Collector (GC).\n    *   Use `TStrongObjectPtr<>` if you need to keep a root reference outside of a UObject graph, but prefer `addToRoot()` generally.\n    *   Understand the `IsValid()` check vs `nullptr`. `IsValid()` handles pending kill state safely.\n\n2.  **Unreal Reflection System**:\n    *   Use `UCLASS()`, `USTRUCT()`, `UENUM()`, `UFUNCTION()` to expose types to the reflection system and Blueprints.\n    *   Minimize `BlueprintReadWrite` when possible; prefer `BlueprintReadOnly` for state that shouldn't be trampled by logic in UI/Level BPs.\n\n3.  **Performance First**:\n    *   **Tick**: Disable Ticking (`bCanEverTick = false`) by default. Only enable it if absolutely necessary. Prefer timers (`GetWorldTimerManager()`) or event-driven logic.\n    *   **Casting**: Avoid `Cast<T>()` in hot loops. Cache references in `BeginPlay`.\n    *   **Structs vs Classes**: Use `F` structs for data-heavy, non-UObject types to reduce overhead.\n\n## Naming Conventions (Strict)\n\nFollow Epic Games' coding standard:\n\n*   **Templates**: Prefix with `T` (e.g., `TArray`, `TMap`).\n*   **UObject**: Prefix with `U` (e.g., `UCharacterMovementComponent`).\n*   **AActor**: Prefix with `A` (e.g., `AMyGameMode`).\n*   **SWidget**: Prefix with `S` (Slate widgets).\n*   **Structs**: Prefix with `F` (e.g., `FVector`).\n*   **Enums**: Prefix with `E` (e.g., `EWeaponState`).\n*   **Interfaces**: Prefix with `I` (e.g., `IInteractable`).\n*   **Booleans**: Prefix with `b` (e.g., `bIsDead`).\n\n## Common Patterns\n\n### 1. Robust Component Lookup\nAvoid `GetComponentByClass` in `Tick`. Do it in `PostInitializeComponents` or `BeginPlay`.\n\n```cpp\nvoid AMyCharacter::PostInitializeComponents() {\n    Super::PostInitializeComponents();\n    HealthComp = FindComponentByClass<UHealthComponent>();\n    check(HealthComp); // Fail hard in dev if missing\n}\n```\n\n### 2. Interface Implementation\nUse interfaces to decouple systems (e.g., Interaction system).\n\n```cpp\n// Interface call check\nif (TargetActor->Implements<UInteractable>()) {\n    IInteractable::Execute_OnInteract(TargetActor, this);\n}\n```\n\n### 3. Async Loading (Soft References)\nAvoid hard references (`UPROPERTY(EditDefaultsOnly) TSubclassOf<AActor>`) for massive assets which force load orders. Use `TSoftClassPtr` or `TSoftObjectPtr`.\n\n```cpp\nUPROPERTY(EditAnywhere, BlueprintReadWrite)\nTSoftClassPtr<AWeapon> WeaponClassToLoad;\n\nvoid AMyCharacter::Equip() {\n    if (WeaponClassToLoad.IsPending()) {\n        WeaponClassToLoad.LoadSynchronous(); // Or use StreamableManager for async\n    }\n}\n```\n\n## Debugging\n\n*   **Logging**: Use `UE_LOG` with custom categories.\n    ```cpp\n    DEFINE_LOG_CATEGORY_STATIC(LogMyGame, Log, All);\n    UE_LOG(LogMyGame, Warning, TEXT(\"Health is low: %f\"), CurrentHealth);\n    ```\n*   **Screen Messages**:\n    ```cpp\n    if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT(\"Died!\"));\n    ```\n*   **Visual Logger**: extremely useful for AI debugging. Implement `IVisualLoggerDebugSnapshotInterface`.\n\n## Checklist before PR\n\n- [ ] Does this Actor need to Tick? Can it be a Timer?\n- [ ] Are all `UObject*` members wrapped in `UPROPERTY`?\n- [ ] Are hard references (TSubclassOf) causing load chains? Can they be Soft Ptrs?\n- [ ] Did you clean up verified delegates in `EndPlay`?\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["unreal","engine","cpp","pro","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents"],"capabilities":["skill","source-sickn33","skill-unreal-engine-cpp-pro","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/unreal-engine-cpp-pro","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34404 github stars · SKILL.md body (4,629 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:51:54.154Z","embedding":null,"createdAt":"2026-04-18T21:46:52.548Z","updatedAt":"2026-04-22T00:51:54.154Z","lastSeenAt":"2026-04-22T00:51:54.154Z","tsv":"'-1':483 '1':160,358 '2':212,388 '3':248,411 '5':11,39,66,141,484 'aactor':320 'absolut':262 'actor':70,504 'addonscreendebugmessag':482 'addtoroot':198 'ai':495 'alway':164 'amycharact':374,440 'amygamemod':325 'ask':573 'asset':114,424 'async':412,449 'avoid':273,362,416 'b':353 'bcanevertick':254 'beginplay':281,371 'best':21 'bisdead':355 'blueprint':94,128,229 'blueprint-expos':93 'blueprint-on':127 'blueprintreadon':235 'blueprintreadwrit':231,436 'boolean':350 'boundari':581 'bps':247 'c':13,25,41,61,132 'cach':278 'call':401 'cast':272,274 'categori':457,461 'caus':524 'chain':526 'check':203,380,402 'checklist':499 'clarif':575 'class':76,284 'clean':534 'clear':548 'code':52,62,81,100,133,305 'collect':90,163 'collector':179 'common':356 'compliant':51 'compon':71,360 'convent':103,300 'core':158 'cover':15 'cpp':4,372,399,433,458,478 'criteria':584 'critic':80 'currenthealth':475 'custom':456 'data':290 'data-heavi':289 'debug':85,450,496 'decoupl':394 'default':257 'defin':459 'deleg':537 'deriv':75 'describ':552 'dev':385 'develop':14,35,60,134,157 'die':489 'disabl':252 'driven':270 'e':341 'e.g':311,318,324,336,342,348,354,396 'editanywher':435 'editdefaultson':420 'enabl':259 'endplay':539 'engin':3,10,24,38,65,84,137,149,156 'ensur':172 'enum':338 'environ':564 'environment-specif':563 'epic':98,303 'equip':441 'event':269 'event-driven':268 'eweaponst':343 'execut':407 'expert':6,31,569 'expert-level':30 'expos':95,222 'extrem':492 'f':286,335,474,485 'fail':382 'fals':255 'fcolor':486 'findcomponentbyclass':379 'first':250 'focus':43 'follow':97,302 'forc':426 'function':96 'fvector':337 'game':99,148,304 'garbag':89,162,178 'gc':180 'general':199 'gengin':480,481 'getcomponentbyclass':363 'getworldtimermanag':266 'graph':195 'guid':7 'guidelin':33 'handl':207 'hard':383,417,521 'health':471 'healthcomp':378,381 'heavi':291 'hot':276 'hygien':17 'iinteract':349,406 'implement':92,390,405,497 'input':578 'interact':397 'interfac':344,389,392,400 'issu':91 'isvalid':202,206 'ivisualloggerdebugsnapshotinterfac':498 'keep':187 'kill':209 'leak':87 'level':32 'limit':540 'load':115,413,427,525 'log':451,454,460,464,467 'logger':491 'logic':244,271 'logmygam':463,468 'lookup':361 'loop':277 'low':473 'manag':113 'massiv':423 'match':549 'member':169,516 'memori':86 'messag':477 'minim':230 'miss':387,586 'name':299 'necessari':263 'need':185,505 'non':146,293 'non-unr':145 'non-uobject':292 'nullptr':205 'oninteract':408 'optim':77 'order':428 'output':558 'outsid':191 'overhead':298 'pattern':19,357 'pend':208 'perform':18,47,79,249 'performance-crit':78 'permiss':579 'possibl':233 'postinitializecompon':369,375,377 'pr':501 'practic':22 'prefer':197,234,264 'prefix':308,315,321,327,333,339,345,351 'principl':159 'prior':139 'pro':5,26 'project':68,130 'provid':29 'ptrs':531 'red':487 'reduc':297 'refer':118,190,279,415,418,522 'reflect':108,214,226 'requir':577 'review':570 'robust':46,359 'root':189 'safe':211 'safeti':580 'scope':551 'screen':476 'shouldn':239 'skill':28,58,123,543 'skill-unreal-engine-cpp-pro' 'slate':330 'soft':117,414,530 'source-sickn33' 'specif':565 'standard':50,101,306 'standard-compli':49 'state':210,237 'static':462 'stop':571 'streamablemanag':447 'strict':301 'struct':282,287,332 'substitut':561 'success':583 'super':376 'swidget':326 'system':109,215,227,395,398 'targetactor':404,409 'tarray':312 'task':151,547 'templat':307 'test':567 'text':470,488 'tick':251,253,365,507 'timer':265,512 'tmap':313 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'track':175 'trampl':242 'treat':556 'tsoftclassptr':430,437 'tsoftobjectptr':432 'tstrongobjectptr':182 'tsubclassof':421,523 'type':223,295 'u':317 'ucharactermovementcompon':319 'uclass':110,217 'ue':453,466 'uenum':219 'ufunct':112,220 'ui/level':246 'understand':200 'unreal':2,9,23,37,64,83,106,136,147,155,213 'unreal-engine-cpp-pro':1 'unrel':153 'uobject':16,74,161,168,194,294,314,515 'uobject-deriv':73 'uproperti':166,419,434,519 'use':40,55,56,121,165,181,216,285,391,429,446,452,493,541 'ustruct':111,218 'valid':566 'variabl':170 'verifi':536 'version':138 'visual':490 'void':373,439 'vs':204,283 'warn':469 'weaponclasstoload':438 'weaponclasstoload.ispending':443 'weaponclasstoload.loadsynchronous':444 'widget':331 'work':104,125,143 'wrap':517 'write':45,69 'x':12,67,142","prices":[{"id":"42a1edc6-c423-4381-89dc-7903f37f53cb","listingId":"0ec774ad-424b-4a6e-ad5e-983f5be0a2ff","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:46:52.548Z"}],"sources":[{"listingId":"0ec774ad-424b-4a6e-ad5e-983f5be0a2ff","source":"github","sourceId":"sickn33/antigravity-awesome-skills/unreal-engine-cpp-pro","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/unreal-engine-cpp-pro","isPrimary":false,"firstSeenAt":"2026-04-18T21:46:52.548Z","lastSeenAt":"2026-04-22T00:51:54.154Z"}],"details":{"listingId":"0ec774ad-424b-4a6e-ad5e-983f5be0a2ff","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"unreal-engine-cpp-pro","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34404,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-21T16:43:40Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"33552aa0b8eb941fb938595dafa124c9a41f7cb7","skill_md_path":"skills/unreal-engine-cpp-pro/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/unreal-engine-cpp-pro"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"unreal-engine-cpp-pro","description":"Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/unreal-engine-cpp-pro"},"updatedAt":"2026-04-22T00:51:54.154Z"}}