/cpp:unrealfrom cpp
Use when writing code an Unreal Engine module or a package it links compiles, or debugging, rebuilding, or reloading C++, Python, or Blueprint running inside Unreal Engine on macOS, or reading its logs, crash reports, and traces, covering module build rules, editor attaches, native stops, Hot Reload, embedded Python, and Blueprint limits
Ships in cpp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Covers code an Unreal editor, commandlet, or automation run executes on a Mac, and the C++ its modules compile. Use tool:debugging for the debugging method and debugger sessions, cpp:debugging for C++ values and LLDB commands, python:debugging for debugpy sessions, and cpp:coding for the C++ a fix writes.
[REFERENCES]:
unreal-mcp, its start, editor identity, and toolsetsFacts read before any session, in order:
Engine: <engine> is the Engine folder of the install EngineAssociation of <uproject> names in ~/Library/Application Support/Epic/UnrealEngineLauncher/LauncherInstalled.dat, /Users/Shared/Epic Games/UE_<major.minor>/Engine for a Launcher install, and every command runs that engine's files
Release: facts below were read from 5.8.4 sources and binaries, and another release is checked against its own before one is acted on:
jq '{MajorVersion, MinorVersion, PatchVersion, Changelist}' "<engine>/Build/Build.version"
Configuration of the build under suspicion, as Development compiles project modules -O3 -gdwarf-4 and DebugGame compiles them -O0:
"<engine>/Build/BatchFiles/RunUBT.sh" -TargetType=Editor Mac DebugGame -Project=<uproject> -WaitMutex, then run UnrealEditor-Mac-DebugGame.app or UnrealEditor-Mac-DebugGame-Cmd<ModuleConfiguration><DisableOptimizeCode> of <project>/Saved/UnrealBuildTool/BuildConfiguration.xml, or UE_DISABLE_OPTIMIZATION and UE_ENABLE_OPTIMIZATION around one functionBuildPlugin compiles editor Development alone, so its frames never reach DebugGameSymbols: engine frames hold names and no locals until the Launcher's editor symbols install by the steps below
Engine tools sit in <engine>/Build/BatchFiles (RunUAT.sh, RunUBT.sh) and <engine>/Binaries/Mac (UnrealEditor-Cmd, UnrealEditor-Mac-DebugGame-Cmd, UnrealAtoS, UnrealPak, zen). Signing allows every attach with no SIP or signing change: UnrealEditor.app and UnrealEditor-Mac-DebugGame.app are ad hoc signed with com.apple.security.get-task-allow, and the -Cmd binaries are linker-signed with no hardened runtime. Project modules carry no dSYM, and LLDB reads their debug information from object files under <project>/Intermediate, so the folder stays untouched while a session runs.
Editor symbols install once per engine:
jq '.InstallTags' of the .item with AppName UE_<major.minor> under ~/Library/Application Support/Epic/EpicGamesLauncher/Data/Manifests lacks editor_symbols, and <engine>/Binaries/Mac/libUnrealEditor-Core.dSYM is absent, as each dSYM sits beside its dylibdf -h <engine> shows room for the tag, whose files <engine>/../.egstore/<id>.manifest listslegendary adds a tag through --install-tag under its own Epic sign-in, and its manifest reader sizes a tag offlineread {"of": "scopes"} at an engine stop after the install lists the frame's locals| [INDEX] | [QUESTION] | [ROUTE] |
|---|---|---|
| [01] | Wrong value or path in a C++ module | [03] on a DebugGame editor |
| [02] | Fault during start-up | [03], breakpoints given in the attach |
| [03] | Failing automation test | [03] over a test run |
| [04] | Python running in the editor | [04], native code under it by [03] |
| [05] | Blueprint runtime error or wrong script path | references/blueprint.md |
| [06] | Crash, hang, slow frame, memory growth | references/evidence.md |
| [07] | Rebuilt module behaves as before | [05] |
| [08] | Verse | None on 5.8 |
Verse code cannot exist in a 5.8 project: bUseVerseBPVM defaults true, which compiles WITH_VERSE_VM 0, the VerseVM and Solaris plug-ins are absent, and libUnrealEditor-CoreUObject.dylib exports no Verse::SetDebugger.
Engine processes start under a wait flag and take an attach, as a PID found by name can be the owner's or another agent's editor, and an editor launched under a debugger stops in FPythonScriptPlugin::InitializePython (Epic forum reports on 5.8.3 and 5.8.4):
Start the process in a background task whose shell prints its PID and becomes the engine, <pid> below:
echo $$; exec "<engine>/Binaries/Mac/UnrealEditor-Mac-DebugGame-Cmd" "<uproject>" -ExecCmds="Automation RunTests <test>;Quit" -unattended -nullrhi -nosplash -stdout -abslog=<file.log> -ReportExportPath=<dir> -WaitForDebuggerNoBreak
"<engine>/Binaries/Mac/UnrealEditor-Mac-DebugGame.app/Contents/MacOS/UnrealEditor-Mac-DebugGame" "<uproject>" -abslog=<file.log> -WaitForDebuggerNoBreak"<engine>/Binaries/Mac/UnrealEditor-Cmd" -run=pythonscript -script=<py> -EnablePlugins=PythonScriptPlugin -unattended -nullrhi -nosplash -stdout -WaitForDebuggerNoBreak-WaitForDebugger in place of -WaitForDebuggerNoBreak adds an EXC_BREAKPOINT stop in GuardedMain once attached, which resume {"action": "continue"} passessession attaches with each breakpoint, which binds before the engine leaves its wait or once its module loads:
{
"action": "attach",
"language": "cpp",
"pid": <pid>,
"functions": [{ "name": "<Class>::<Method>" }],
"settings": {
"initCommands": ["command script import \"<engine>/Extras/LLDBDataFormatters/UEDataFormatters_2ByteChars.py\""],
"postRunCommands": ["process handle SIGUSR2 --stop false --pass true --notify false"]
}
}
resume {"action": "wait", "wait_seconds": 300} until the stop, as an editor start outlasts the default wait
Readings at a stop:
<optimized out> in a project frame -> Development build, rebuild DebugGamedebug map object file "/Users/build/..." ... does not exist in an engine frame -> editor symbols absent, read the nearest project frameSIGUSR2 -> the postRunCommands line did not run, as the engine raises SIGUSR2 by pthread_kill to capture thread stacksSIGSTOP on the Cocoa main thread -> continue once moreEXC_BREAKPOINT in FDebug::CheckVerifyFailedImpl2 or UE::Assert::Private::EnsureFailed -> failed check or ensure, which no exception filter catches, with the failing expression in the caller frameUE::Assert::Private::ProcessLowLevelFatalError -> fatal error, stopped before FDebug::ProcessFatalError hands it to the crash handlerUObject::ProcessEvent or FFrame::Step -> script called this code, and references/blueprint.md reads its script stackFName summary with an error, or a UObject with no name -> defects of the stock formatter, while FString, TArray, TMap, and TSet format cleanly:
sizeof(TCHAR)), with an unbalanced parenthesisSBValueNamePrivate, where 5.8 stores FNameAndObjectHashIndexGNameBlocksDebug[i] refused as subscript of pointer to incomplete type 'void' -> no engine dSYM types the symbol, and a target.expr-prefix file holding extern unsigned char **GNameBlocksDebugTyped asm("_GNameBlocksDebug"); and #define GNameBlocksDebug GNameBlocksDebugTyped types itread {"of": "threads"} names GameThread, RenderThread, RHIThread, and worker threads, and read {"of": "frames", "thread": <id>} reads eachSession rules:
Embedded script interpreter unavailable at that import -> first lldb-dap on the PATH holds no Python, as LLVM's release archives build itinitCommands, so Build/BatchFiles/Mac/GenerateLLDBInit.sh, which writes ~/.lldbinit with the import and LLDB's default target.inline-breakpoint-strategy, stays unrunUEDataFormatters.py casts TCHAR* to a four-byte wchar_t*, while TCHAR is char16_t on a Mac, so the _2ByteChars file is the one loadedunreal-mcp, Python remote execution, and Hot Reload until resumeEditors embed CPython 3.11 in an isolated environment: PYTHONPATH is ignored, UE_PYTHONPATH and AdditionalPaths of [/Script/PythonScriptPlugin.PythonScriptPluginSettings] are read, and debugpy is not bundled. UnrealEditor-Cmd <uproject> -run=pythonscript -script=<py> runs Python with no editor window.
Remote execution runs Python and console commands in a running editor, with <section> standing for [/Script/PythonScriptPlugin.PythonScriptPluginSettings]:
remote_execution.py finds editors by UDP multicast 239.0.0.1:6766 and hosts a command channel on TCP 127.0.0.1:6776 the chosen editor connects to<section> holds bRemoteExecution=True and RemoteExecutionMulticastBindAddress=0.0.0.0, in the project's Config/DefaultEngine.ini-ini:Engine:<section>:bRemoteExecution=True,<section>:RemoteExecutionMulticastBindAddress=0.0.0.00.0.0.0 too, as a Mac delivers no multicast datagram to a socket bound to the default 127.0.0.1, so editor and client each find nothingunreal.SystemLibrary.execute_console_command(None, "<command>") sent this way runs a console commandShell clients take the engine's module, choose the editor by its project folder, and run code or a script path in mode ExecuteFile:
import sys
import time
sys.path.insert(0, "<engine>/Plugins/Experimental/PythonScriptPlugin/Content/Python")
import remote_execution
config = remote_execution.RemoteExecutionConfig()
config.multicast_bind_address = "0.0.0.0"
client = remote_execution.RemoteExecution(config)
client.start()
deadline = time.monotonic() + 5
while not (nodes := [node for node in client.remote_nodes if node.get("project_root") == "<project>/"]) and time.monotonic() < deadline:
time.sleep(0.1)
client.open_command_connection(nodes[0]["node_id"])
print(client.run_command("<code or script path>"))
client.stop()
Python stops take a debugpy listener inside the editor:
uv pip install --target <dir> --python "<engine>/Binaries/ThirdParty/Python3/Mac/bin/python3" debugpy writes a debugpy built for the editor's interpreter into <dir>
Remote execution from a background task starts the listener, never wait_for_client on the editor thread:
import sys
sys.path.insert(0, "<dir>")
import debugpy
import unreal
debugpy.configure(python=unreal.get_interpreter_executable_path())
debugpy.listen(("127.0.0.1", <port>))
session {"action": "attach", "language": "python", "address": "127.0.0.1:<port>", "settings": {"redirectOutput": true}, "breakpoints": [...]}, as debugpy_unreal.py states that leaving out redirectOutput hangs the debugger and the editor
Remote execution from another background task runs the script by path, as a stop freezes the game thread and the call until resume
Python rules:
debugpy_unreal.start(<port>) calls wait_for_client() on the calling thread and blocks the editor, and debugpy_unreal.install_debugpy() runs unpinned pip into the engine, so neither is called-ExecutePythonScript=<py> or init_unreal.py with debugpy.listen at its top, where wait_for_client is alloweddebugpy.breakpoint() in a script stops at its next statementLogPython: Error lines naming frozen modules at debugpy.listen are debugpy's notice, and breakpoints in script files still bindimportlib.reload(<module>) and a call of the entry with new objects, as old references and callbacks stayC++ rebuilds reach a running editor through Hot Reload, as Live Coding sits under Source/Developer/Windows with no Mac module. Edits decide the path:
Body of a loaded gameplay module, its class answering true from IsGameModule(): end PIE, resume, and build while the editor's watcher runs:
"<engine>/Build/BatchFiles/RunUBT.sh" -TargetType=Editor Mac <configuration> -Project=<uproject> -Module=<module> -FailIfGeneratedCodeChanges
Body of any other project or project plug-in module: console Module Recompile <module> through remote execution, which builds with -FailIfGeneratedCodeChanges and reloads in the editor
Anything else: quit, rebuild, start, attach, for a reflected header, UCLASS, USTRUCT, generated code, layout, constructor, static state, or native dependency
Reload rules:
-unattended and in commandlets, and builds landing while PIE runs reload once it ends<engine>/Intermediate/EditorRuns/<pid> and matches its executable, never its project, so the open project is checked firstUnrealEditor.app and UnrealEditor-Mac-<configuration>.app, so a -Cmd process takes no reload-NoHotReload, as AutomationTool's own builds do, and -ForceHotReload is never passedlib<target>-<module>-<NNNN>.dylib, four digits before the configuration (libUnrealEditor-<module>-0001-Mac-DebugGame.dylib), and no loaded dylib is overwrittenModule Recompile answers true whatever the compile did, so UBT's Log.txt and the new file decideread {"of": "modules"} or console Module List naming the new file, a breakpoint set again, and a stop in new code prove the reloadModule Load, Module Unload, and Module Reload take <module> and act without a buildUnrealBuildTool compiles a plug-in's modules, and packages a plug-in links compile to match, each fact read from an installed engine's UnrealBuildTool source:
F, U, A, T, E, and I prefixes, and reflection macrosCppStandardVersion sets Default, EngineDefault, and Minimum to Cpp20, with Cpp23 experimental, so headers a module includes hold C++20 members aloneCppCompileEnvironment defaults bUseRTTI to false, compiled -fno-rtti, and bHideSymbolsByDefault to true, compiled -fvisibility-ms-compat -fvisibility-inlines-hiddenbEnableExceptions defaults to false, compiled -fno-exceptions on Linux, yet MacToolChain.cs compiles every Mac module -fexceptions, so package code throws on neitherAppleToolChain.cs compiles each Mac module source -x objective-c++, and bEnableObjCAutomaticReferenceCounting defaults to false, so a header a module includes compiles under manual reference countingModuleRules.cs states a module setting bEnableObjCAutomaticReferenceCounting takes no shared precompiled header, as those compile without ARCAppleToolChain.cs) and the engine SDK's static one on Linux under -nostdinc++ (LinuxToolChain.cs)Build tools decide architecture and deployment target per target, so a package matches every module linking it:
BaseEngine.ini sets EditorDefaultArchitecture and DefaultArchitecture to the host's, and UEBuildMac.cs adds every supported one for distribution, a supported-architectures query, or an ini default naming universalBuildPlugin of AutomationTool passes -architecture=arm64+x64 for Mac by default, so a package it links holds bothApplePlatformSDK.Versions.cs reads EditorDeploymentTarget of Mac_SDK.json for editor and program targets, falling back to DeploymentTarget, and DeploymentTarget for the restLinuxPlatformSDK.cs takes the SDK LINUX_MULTIARCH_ROOT names, else the in-tree one the engine states as MainVersionWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bsamiee/rasm --plugin cpp3 skills in this plugin
/codingUse when writing or reviewing C++ or Objective-C++, covering functional design with value types and results, ownership, coroutines, compile-time evaluation, memory layout, concurrency, and C interfaces/debuggingUse when C, C++, or Objective-C misbehaves at run time and its cause is unproven (wrong value, failing test case, throw, trap, sanitizer report, crash core), covering build facts, test launches, value reads under lldb-dap, exception and trap stops, dSYMs, core files, attaches, and sanitizer buildsOther plugins' skills for the same job