ue-headless
/ue-headless
Works with Unreal Engine 5.8 without opening the editor. Builds with UnrealBuildTool and returns only the errors (file, line, message), runs Python scripts inside UE without a UI (UnrealEditor-Cmd with -run=pythonscript, or -ExecutePythonScript) and runs automated tests with -NullRHI by reading index.json or the log. Use it after editing .h, .cpp or .Build.cs files, to import or create assets in batch with Python, or before packaging. Trigger phrases - "compile the project", "build without the editor", "give me only the errors", "run this Python script in Unreal", "run the tests", "headless",
- Author
- davidricardobc ↗
- Repository
- claude-unreal-agent ↗
- Licence
- MIT
- Last repository change
- 09.11.2026
Assessment and security
- Files in this package
- 11
- Scripts
- 7
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 09.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 7 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/api_probe.py, scripts/build.ps1, scripts/run-python.ps1, scripts/run-tests.ps1, scripts/smoke_test.py, tests/test_api_probe.py, tests/test_headless.py
What it does and when to use it
Works with Unreal Engine 5.8 without opening the editor. Builds with UnrealBuildTool and returns only the errors (file, line, message), runs Python scripts inside UE without a UI (UnrealEditor-Cmd with -run=pythonscript, or -ExecutePythonScript) and runs automated tests with -NullRHI by reading index.json or the log. Use it after editing .h, .cpp or .Build.cs files, to import or create assets in batch with Python, or before packaging. Trigger phrases - "compile the project", "build without the editor", "give me only the errors", "run this Python script in Unreal", "run the tests", "headless",
Triggers from the description
Original author description
Works with Unreal Engine 5.8 without opening the editor. Builds with UnrealBuildTool and returns only the errors (file, line, message), runs Python scripts inside UE without a UI (UnrealEditor-Cmd with -run=pythonscript, or -ExecutePythonScript) and runs automated tests with -NullRHI by reading index.json or the log. Use it after editing .h, .cpp or .Build.cs files, to import or create assets in batch with Python, or before packaging. Trigger phrases - "compile the project", "build without the editor", "give me only the errors", "run this Python script in Unreal", "run the tests", "headless",
How it works
- Markers
- Before you start
- 1. Build and return only errors
- 2. Python inside UE without a UI
- 3. Automated tests without rendering
- Skill tests
- Pitfalls
- Unverified (confirm on day 1)
SKILL.md preview
---
name: ue-headless
description: Works with Unreal Engine 5.8 without opening the editor. Builds with UnrealBuildTool and returns only the errors (file, line, message), runs Python scripts inside UE without a UI (UnrealEditor-Cmd with -run=pythonscript, or -ExecutePythonScript) and runs automated tests with -NullRHI by reading index.json or the log. Use it after editing .h, .cpp or .Build.cs files, to import or create assets in batch with Python, or before packaging. Trigger phrases - "compile the project", "build without the editor", "give me only the errors", "run this Python script in Unreal", "run the tests", "headless", "UBT", "compile errors", "run the automation tests", "run python in Unreal without the editor".
---
# ue-headless
Three tasks without a visible editor: build, run Python, run tests. In all of them: short output (errors, not the whole log) and no guessing about success, because the exit code of UBT/Python is not always reliable.
## Markers
- `<UE_ROOT>`: engine root, for example `C:\Program Files\Epic Games\UE_5.8`.
- `<ProyectoDir>`: the folder of the `.uproject` (project directory). `<Proyecto>`: its name without the extension. The editor target is `<Proyecto>Editor`.
- Templates in `.claude/skills/ue-headless/scripts/` (`build.ps1`, `run-python.ps1`, `run-tests.ps1`, `smoke_test.py`, `api_probe.py`). They are copied or called from there. The scripts detect `UnrealEditor` and `UnrealEditor-Cmd`.
- **Run from PowerShell**, not from Git Bash: Git Bash converts paths like `/Engine/Maps/Entry` or `/Game/...` into `C:/Program Files/Git/...` (verified: the editor opened `/Temp/Untitled_1`). If there is no other way, use `MSYS_NO_PATHCONV=1`.
## Before you start
1. The editor must be closed. All three scripts abort if they see `UnrealEditor.exe` (skipped with `-Force`).
2. If the editor is open with Live Coding and only a function body changed, use `LiveCodingToolset.CompileLiveCoding` over MCP instead of UBT.
3. If there are new or removed `UFUNCTION`, `UPROPERTY` or `USTRUCT`: build with UBT, not with Live Coding, and say "close and reopen the editor".
## 1. Build and return only errors
```
powershell -File .claude/skills/ue-headless/scripts/build.ps1 -UERoot "<UE_ROOT>" -Project "<ProyectoDir>\<Proyecto>.uproject"
```
It is equivalent to `"<UE_ROOT>\Engine\Build\BatchFiles\Build.bat" <Proyecto>Editor Win64 Development -Project="<ProyectoDir>\<Proyecto>.uproject" -WaitMutex -MaxParallelActions=4`. The cap of 4 actions (`-Hilos`, "threads"; 0 = no cap) avoids saturating a 4-thread laptop; verified (game target 116 s, editor 109 to 136 s cold). If it fails with `Could not find NetFxSDK install dir`, the .NET Framework SDK is missing: see `package-and-verify-build`, prerequisite 1. The script saves the full log in `Saved/Logs/headless-build.log` and shows up to 30 unique errors as `archivo(línea): código mensaje` (that is, file(line): code message), and the last line `BUILD OK` or `BUILD FAIL`.
- Bounded retry: at most 3 rounds of "fix and build". If the same error stays the same, stop and show the context to the person.
- If a `.Build.cs` changed or files were added: regenerate the project with `"<UE_ROOT>\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe" -projectfiles -project="<ProyectoDir>\<Proyecto>.uproject" -game` (without the `-engine` suffix: it pulls in engine projects; with an installed engine it is unnecessary). Alternative: `"<UE_ROOT>\Engine\Build\BatchFiles\GenerateProjectFiles.bat" -project="..." -game`. Unverified in 5.8: run it with `-help` (1 minute).
- `UnrealHeaderTool` errors (badly written macros, `GENERATED_BODY`) come out in the same format.
## 2. Python inside UE without a UI
```
powershell -File .claude/skills/ue-headless/scripts/run-python.ps1 -UERoot "<UE_ROOT>" -Project "<ProyectoDir>\<Proyecto>.uproject" -Script "<ruta>\x.py"
```
It is equivalent to `"<UE_ROOT>\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" "<Proyecto>.uproject" -run=pythonscript -script="<ruta>\x.py" -unattended -nopause -stdout -abslog="<log>"`. (`<ruta>` is the path of the script.)
- It is fast and does not open the UI. It does not load levels: they must be loaded inside the script. It needs the "Python Editor Script" plugin enabled.
- Slower alternative (opens the full editor): `-Mode ExecutePythonScript`, which uses `-ExecutePythonScript="x.py" -NullRHI`. It also needs Editor Scripting Utilities. If the editor does not close by itself, end the script with `unreal.SystemLibrary.execute_console_command(None, "QUIT_EDITOR")` (unverified).
- Convention: the script prints `KIT_OK` at the end. The wrapper decides success by that line, not by the exit code. If `KIT_OK` appears but the log has `Traceback` or `Error:`, the wrapper exits with 4 ("PYTHON AVISOS", that is, "PYTHON WARNINGS"): it is not green, review it.
- Python is not run with the editor open: the wrapper aborts (code 2) and the MCP's `execute_tool_script` is a sandbox without `import unreal`. With the editor open, use the MCP tools.
- Test first with `smoke_test.py` (read-only: engine version and asset count).
- Save only what was touched (`unreal.EditorAssetLibrary.save_asset("/Game/...")`), never everything.
- To write scripts: enable Developer Mode in Project Settings > Python. It generates `Intermediate/PythonStub/unreal.py`; search it with grep, do not read it whole.
- **Shared API probe** (`api_probe.py`): reads the `api.txt` of all skills (or those of `KIT_API_SKILLS=a,b`) and checks each `Class.member` in `unreal`. With the `func` or `prop` mark it also checks whether it is called with `()` or goes through `get/set_editor_property`: a bare `hasattr` does not catch calling a property as a function (it happened with `bIsComponentPartitioned`). Format and examples in the script header. Outside UE it only validates the format (`KIT_PROBE_SKIP`). Day 1: `run-python.ps1 -Script .claude/skills/ue-headless/scripts/api_probe.py`, 1 minute.
- Data Tables from CSV: `unreal.DataTableFunctionLibrary.fill_data_table_from_csv_file(table, path, import_row_struct)`. It empties the table before filling it; headers equal to the struct names; CSV in UTF-8 with BOM if there are accents.
## 3. Automated tests without rendering
```
powershell -File .claude/skills/ue-headless/scripts/run-tests.ps1 -UERoot "<UE_ROOT>" -Project "<ProyectoDir>\<Proyecto>.uproject" -Filter "Project"
```
It is equivalent to `UnrealEditor-Cmd.exe <Proyecto>.uproject -ExecCmds="Automation RunTests <Filtro>; Quit" -unattended -nopause -NullRHI -log -ReportExportPath="<ProyectoDir>\Saved\AutomationReports\headless"`. (`<Filtro>` is the test filter.)
- The log has `**** TEST COMPLETE. EXIT CODE: N ****` (0 = no failures, Epic's docs). The script reads `index.json` (`state` Fail or Error counts as a failure; `Skipped` is reported separately and is NOT a failure) and, if it does not exist, uses that code from the log.
- The report path goes without a trailing slash (a forum reports that it fails with one).
- `-ReportExportPath` is the current one in 5.8 (`AutomationControllerManager.cpp`); `-ReportOutputPath` is the old alias and warns.
- `-NullRHI` does not draw: visual tests need a GPU and are run with the normal editor.
- With the editor open, over MCP: `AutomationTestToolset.DiscoverTests` first (otherwise, empty results), then `ListTests`, `RunTests`, `GetTestStatus`, `GetTestResults`.
- 0 tests found is almost always a badly written filter. It is not reported as "passed".
## Skill tests
`python -I .claude/skills/ue-headless/tests/test_headless.py` (6 tests) and `python -I .claude/skills/ue-headless/tests/test_api_probe.py` (8 tests), without Unreal or network. They use `build.ps1 -ParseLog/-PrintArgs`, `run-python.ps1 -ParseLog` and `run-tests.ps1 -ParseOnly` on logs and a sample `index.json`, and the probe with a fake `unreal` module (including the case of a property called as a function). What does need Unreal is still "unverified" below.
## Pitfalls
- UBT with the editor open: it may refuse or leave half-built binaries. Close the editor.
- The Python commandlet in 5.8 activates source control before running; with UEGitPlugin it can be slow or ask for something. If it hangs, use plan B, `-ExecutePythonScript`.
- In old versions there were unexpected shutdowns of the Python commandlet. Always use `TimeoutSec` (the scripts include it) and kill the hung process.
- 5.8.4 fixes a UAT log stall (1,024-line buffer) and commandlet output with other code pages. Before 5.8.4 the UAT log can get stuck.
- VS 2026 with 5.8.1: UBT could generate VS 2022 projects and fail. Check Editor Preferences > Source Code Editor.
- Read logs with `grep -a`: the log may contain non-UTF-8 bytes.
## Unverified (confirm on day 1)
- `-WaitMutex` and UBT's behavior with Live Coding active (whether it refuses): `Build.bat -help`, 1 minute.
- `-abslog=`, `-stdout`, `-nopause` in the Python commandlet: run `smoke_test.py` once and check that the log comes out in `Saved/Logs/headless-python.log`.
- That the probe tells `prop` from `func` inside UE as in the test (the descriptor of a UPROPERTY is not callable): run it once with `KIT_API_SKILLS=build-tile` and look for `OK` on `is_component_partitioned prop`.
- The exact shape of `index.json` (fields `tests`, `state`, `fullTestPath`, `entries`): the script reads it with optional fields.
- That `-run=pythonscript` loads `Python Editor Script` only if the plugin is enabled in the `.uproject`.
Files in this package (11)
- SKILL.md 9 KB
- scripts/api_probe.py 5 KB
- scripts/build.ps1 4 KB
- scripts/run-python.ps1 3 KB
- scripts/run-tests.ps1 5 KB
- scripts/smoke_test.py 1 KB
- tests/build.sample.log 1 KB
- tests/index.allok.json 1 KB
- tests/index.sample.json 1 KB
- tests/test_api_probe.py 3 KB
- tests/test_headless.py 3 KB
Versions
The database has no other skills named ue-headless.
Database snapshot: 13.11.2026 · package version 6b2c8055a95e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 3 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100scenario-unreal-expert
Use when an agent drives Unreal Engine 5.8 on a Mac for any task: Editor Python (the unreal module), headless UnrealEditor-Cmd -run=pythonscript jobs, Epic's Unreal MCP server, the Remote Control API, console commands and cvars; when a script breaks on 5.8 (EditorLevelLibrary,… - 100godot-headless-ci
Runs Godot 4 from the command line without the editor UI - importing assets, checking scripts for parse errors, running GUT or gdUnit4 tests, and exporting builds - and sets up GitHub Actions CI that exports Windows, Linux, macOS and Web builds on every push or tag. Use when the… - 90unreal-project-audit
Use when the task is to inspect Unreal project structure, plugins, assets, and build settings. - 95game-build-log-triage
Triage Unity and Unreal Engine editor, build, package, cook, compile, and CI logs into the first actionable failure, likely subsystem, and next debugging steps. Use when a game project fails to build, cook, package, import assets, compile scripts/code, or throws noisy… - 100unreal-engine
Unreal Engine is Epic Games' real-time 3D engine for games, architectural visualization, film and simulation, programmed with Blueprints (visual scripting) or C++. Use when a user asks to write Unreal C++ gameplay classes, expose code to Blueprints, set up Enhanced Input, enable… - 100unreal-python-scripting
Gives Unreal Engine 5.8 Python API patterns - Blueprint spawning, material instances, component properties, workarounds for API limits. Use when scripting Unreal in Python, writing Unreal Python tools, or hitting an Unreal Python API limitation.