ue-module-build-system
Use when working with Build.cs, Target.cs, module creation, plugin setup, or build errors in Unreal Engine — including "unresolved external symbol," "cannot open include file," IWYU violations, missing API macros, or dependency configuration. See also ue-cpp-foundations for UObject macro patterns.
What this skill does
# UE Module & Build System
You are an expert in Unreal Engine's module and build system. You understand Unreal Build Tool (UBT), ModuleRules, TargetRules, the .uproject manifest, plugin architecture, and the IWYU include discipline enforced by UE5.
## Before Starting
Read `.agents/ue-project-context.md` if it exists — it provides module names, engine version, active plugins, and build targets that affect dependency and include configuration.
Ask which situation applies:
1. Configuring dependencies in an existing Build.cs
2. Creating a new module from scratch
3. Creating a new plugin
4. Resolving a build error (linker, include, or IWYU)
5. Setting up Target.cs for a new build target
---
## Build.cs Anatomy
Every UE module has a `ModuleName.Build.cs` file next to its `Public/` and `Private/` directories.
```csharp
// Source/MyModule/MyModule.Build.cs
using UnrealBuildTool;
public class MyModule : ModuleRules
{
public MyModule(ReadOnlyTargetRules Target) : base(Target)
{
// PCH settings — use IWYU in UE5
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
// Enable strict IWYU (recommended for new modules in UE5)
bEnforceIWYU = true;
// Types accessible to modules that depend on MyModule
PublicDependencyModuleNames.AddRange(new string[]
{
"Core",
"CoreUObject",
"Engine",
});
// Types used only internally (not re-exported in public headers)
PrivateDependencyModuleNames.AddRange(new string[]
{
"Slate",
"SlateCore",
});
// Load at runtime but don't link at compile time
DynamicallyLoadedModuleNames.Add("OnlineSubsystem");
}
}
```
### Public vs Private Dependencies
| Field | When to use |
|---|---|
| `PublicDependencyModuleNames` | A type from the dependency appears in your **public headers** |
| `PrivateDependencyModuleNames` | The dependency is consumed only in **Private/** .cpp files |
A common mistake: putting everything in `PublicDependencyModuleNames`. This bloats transitive include paths for every downstream module. Only promote to public when your public headers actually `#include` headers from that module.
### Include Paths
```csharp
// Expose extra paths to modules that depend on you
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/Interfaces"));
// Expose extra paths only to this module's own source
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private/Helpers"));
```
UBT automatically adds `Public/` and `Private/` — you rarely need to set these manually unless you have nested subdirectory headers you want to import without path prefixes.
### API Export Macro
UBT generates `MODULENAME_API` from the module's directory name, uppercased. Any class, function, or variable that must be visible across DLL boundaries needs this macro:
```cpp
// Public/MyClass.h
#pragma once
#include "CoreMinimal.h"
class MYMODULE_API FMyClass
{
public:
void DoSomething();
};
// Standalone exported function
MYMODULE_API void MyFreeFunction();
```
Missing `MYMODULE_API` on a class that another module references causes "unresolved external symbol" linker errors.
### PCH and IWYU
```csharp
// UE5 recommended — each file includes exactly what it uses
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
bEnforceIWYU = true;
// Legacy — one monolithic PCH (avoid for new modules)
PCHUsage = PCHUsageMode.UseSharedPCHs;
```
With IWYU, every `.cpp` file includes its own `.h` first, then only what it directly uses:
```cpp
// Private/MyClass.cpp
#include "MyClass.h" // own header first
#include "Engine/Actor.h" // only includes this file directly uses
```
### Compiler Flags
```csharp
// C++ exceptions — disable unless third-party code requires them
bEnableExceptions = false;
// Runtime type information — disable unless using dynamic_cast
bUseRTTI = false;
// Third-party static libraries shipped with the engine
AddEngineThirdPartyPrivateStaticDependencies(Target, "zlib", "OpenSSL");
```
---
## Target.cs
Located at `Source/ProjectName.Target.cs` (and `Source/ProjectNameEditor.Target.cs`).
```csharp
// Source/MyGame.Target.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class MyGameTarget : TargetRules
{
public MyGameTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.Latest;
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
// All game modules that UBT should compile
ExtraModuleNames.AddRange(new string[] { "MyGame", "MyGameUtilities" });
}
}
// Source/MyGameEditor.Target.cs
public class MyGameEditorTarget : TargetRules
{
public MyGameEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.Latest;
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
ExtraModuleNames.AddRange(new string[] { "MyGame", "MyGameEditor" });
}
}
```
### Target Types
| TargetType | Use for |
|---|---|
| `Game` | Standalone game executable |
| `Editor` | Editor build (includes editor-only modules) |
| `Client` | Networked client without server logic |
| `Server` | Dedicated server (no renderer) |
| `Program` | Standalone non-game tool |
**Build configurations**: `Debug` (full symbols, no optimization), `DebugGame` (engine optimized, game debug), `Development` (default; balanced), `Test` (like shipping but with console/stats), `Shipping` (final release, strips all debug).
---
## .uproject File
```json
{
"FileVersion": 3,
"EngineAssociation": "5.4",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "MyGame",
"Type": "Runtime",
"LoadingPhase": "Default"
},
{
"Name": "MyGameEditor",
"Type": "Editor",
"LoadingPhase": "Default"
}
],
"Plugins": [
{
"Name": "ModelingToolsEditorMode",
"Enabled": true
},
{
"Name": "MyPlugin",
"Enabled": true
}
]
}
```
### Module Types
| Type | When to use |
|---|---|
| `Runtime` | Core game logic, ships with game |
| `RuntimeNoCommandlet` | Runtime, excluded from commandlet processes |
| `Editor` | Editor-only — stripped from shipping builds |
| `EditorNoCommandlet` | Editor, excluded from commandlets |
| `Developer` | Tools usable in Editor and Development builds |
| `DeveloperTool` | Developer module, shows in editor UI |
| `CookedOnly` | Included only in cooked (packaged) builds |
| `UncookedOnly` | Included only in uncooked (development) builds |
| `RuntimeAndProgram` | Runtime module that also compiles into standalone Programs |
| `EditorAndProgram` | Editor module that also compiles into standalone Programs |
| `Program` | Standalone programs (UnrealHeaderTool etc.) |
### Loading Phases
| Phase | Use for |
|---|---|
| `EarliestPossible` | First possible phase — core engine modules only |
| `PostSplashScreen` | After splash screen renders |
| `PreEarlyLoadingScreen` | Before the early loading screen |
| `PreLoadingScreen` | Before the main loading screen |
| `PostConfigInit` | Systems that must configure before engine starts |
| `PreDefault` | Modules that must be ready before Default modules |
| `Default` | Standard game modules (most common) |
| `PostDefault` | Modules that depend on Default modules being up |
| `PostEngineInit` | After full engine initialization |
| `None` | Not auto-loaded — requires `FModuleManager::LoadModule()` |
---
## Creating a New Module
### Directory Structure
```
Source/
MyModule/
Public/
MyModule.h (optional module interface header)
MyClass.h
Private/
MyModule.cpp (module registration)
MyClass.cpp
MyModule.Build.cs
```
### Module Interface
```cpp
// Public/MyModule.h
#pragma Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.