Skip to content
AI & Agents
Skill

/ue-module-build-system

Use when writing or fixing Build.cs, Target.cs, .uproject or .uplugin files, creating a module or plugin, or resolving an Unreal build error. Also use when the user mentions 'unresolved external symbol', 'LNK2019', 'cannot open include file', 'C1083', 'MODULENAME_API',

From plugin
unreal-engine-skills
46831 skills

Claude Code

$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-module-build-system --agent claude-code

SKILL.md

ue-module-build-system.SKILL.md
name: ue-module-build-system
description: "Use when writing or fixing Build.cs, Target.cs, .uproject or .uplugin files, creating a module or plugin, or resolving an Unreal build error. Also use when the user mentions 'unresolved external symbol', 'LNK2019', 'cannot open include file', 'C1083', 'MODULENAME_API', 'PublicDependencyModuleNames', 'IWYU', 'PCHUsage', 'IMPLEMENT_MODULE', 'IMPLEMENT_PRIMARY_GAME_MODULE', 'LoadingPhase', 'circular dependency', 'Missing precompiled manifest', 'EngineAssociation', 'IncludeOrderVersion', 'Live Coding'. For UCLASS/UPROPERTY rules see ue-cpp-foundations; for editor modules see ue-editor-tools; for Game Feature plugins see ue-game-features."
metadata:
  version: "2.0.0"
  engine: "5.8"

UE Module & Build System

Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers and UnrealBuildTool sources; older forms are listed under "Deprecated — do not use".

This skill covers UnrealBuildTool (UBT) `ModuleRules` (`*.Build.cs`) and `TargetRules` (`*.Target.cs`), the `.uproject` and `.uplugin` descriptors, module registration (`IModuleInterface` and `IMPLEMENT_MODULE` in `Modules/ModuleManager.h`, module `Core`), plugin discovery (`IPluginManager` in `Interfaces/IPluginManager.h`, module `Projects`), and the compiler, linker, UHT and UBT errors those files cause.

Context

Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.

Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.

| Request is about… | Go to | |---|---| | Dependencies, include paths, PCH, warnings in an existing `Build.cs` | [Build.cs Anatomy](#buildcs-anatomy) | | `Target.cs`, `BuildSettingsVersion`, `IncludeOrderVersion`, target types | [Target.cs](#targetcs) | | `.uproject`, module `Type`, `LoadingPhase`, enabling plugins | [.uproject File](#uproject-file) | | Adding a module (`IMPLEMENT_MODULE`, module interface, `StartupModule`) | [Creating a New Module](#creating-a-new-module) | | Adding a plugin (`.uplugin`, runtime + editor modules, dependencies) | [Creating a Plugin](#creating-a-plugin) | | "Which module do I add to use type X?" | [Which Module Provides This Type](#which-module-provides-this-type) | | LNK2019, C1083, UHT, UBT or runtime module-load errors | [Resolving Build Errors](#resolving-build-errors) |

Build.cs Anatomy

Every module has `<ModuleName>.Build.cs` next to its `Public/` and `Private/` folders. The class name must equal the module name.

// Source/MyGame/MyGame.Build.cs
using UnrealBuildTool;

public class MyGame : ModuleRules
{
    public MyGame(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        // Types from these modules appear in this module's Public/ headers
        PublicDependencyModuleNames.AddRange(new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "InputCore",
            "EnhancedInput",
        });

        // Used only inside Private/ .cpp files; not re-exported downstream
        PrivateDependencyModuleNames.AddRange(new string[]
        {
            "Slate",
            "SlateCore",
            "UMG",
        });

        // Loaded through FModuleManager at runtime, never linked
        DynamicallyLoadedModuleNames.Add("OnlineSubsystem");
    }
}

Public vs Private Dependencies

| Field | Use when | |---|---| | `PublicDependencyModuleNames` | A type from the module appears in one of your **Public/** headers (base class, member, parameter, return type, `UPROPERTY`). Downstream modules inherit the include paths. | | `PrivateDependencyModuleNames` | The module is used only in **Private/** `.cpp` files or private headers. | | `PublicIncludePathModuleNames` / `PrivateIncludePathModuleNames` | You need the module's headers (forward declarations, inline types) but link nothing from it. | | `DynamicallyLoadedModuleNames` | You call `FModuleManager::Get().LoadModule(...)` yourself; UBT only ensures the module is built. |

Start private and promote to public only when a public header forces it. Everything-public inflates compile time for every downstream module.

Include Paths and IWYU

UBT discovers `Public/`, `Internal/` and `Private/` automatically; `PublicIncludePaths`/`PrivateIncludePaths` exist for extra subfolders only. Under `BuildSettingsVersion.V2` and later, `bLegacyPublicIncludePaths` is false, so headers from other modules are written relative to that module's `Public/` (or `Classes/`) root:

// Source/MyGame/Private/MyActor.cpp
#include "MyActor.h"                          // own header first
#include "GameFramework/Actor.h"              // Engine/Classes/GameFramework/Actor.h
#include "Engine/World.h"                     // only what this file uses directly
#include "GameFramework/PlayerController.h"

`IWYUSupport` defaults to `IWYUSupport.Full`, which lets `UnrealBuildTool -Mode=IWYU` rewrite the module's includes; set `IWYUSupport = IWYUSupport.KeepAsIs` for code you maintain by hand.

API Export Macro

UBT defines `<MODULENAME>_API` (module name upper-cased plus `_API`) as `DLLEXPORT` while compiling the module and `DLLIMPORT` for importers; monolithic builds define it empty. Anything referenced from another module needs it:

// Source/MyGame/Public/MyGameTypes.h
#pragma once
#include "CoreMinimal.h"

class MYGAME_API FMyGameTypes
{
public:
    void DoSomething();
};

MYGAME_API void MyGameFreeFunction();

Engine headers wrap this as `#define UE_API CORE_API` at the top of a file and `#undef UE_API` at the bottom (`Async/Mutex.h`). That is an engine-only convention; project code writes `MYGAME_API` directly. Missing `MYGAME_API` on a class another module references is the most common cause of LNK2019.

Warnings and Compiler Flags

bWarningsAsErrors = true;
CppCompileWarningSetti
Read more
@quodsoler
Ships withunreal-engine-skills

A collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.

Stars on GitHub

Momentum

stars in total
468
Star history of quodsoler/unreal-engine-skills on GitHub, a chart by star-history.com

Other skills on unreal-engine-skills.

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw2w393k
@openclaw@openclawInstall Skill

Questions about ue-module-build-system.

Which coding agents can use ue-module-build-system?
ue-module-build-system installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.