/unreal-skills:automated-testerfrom Unreal Harness Skills
Creates deterministic, headless-runnable end-to-end tests for Unreal Engine features using typed C++ primitives. Encodes a specific testing doctrine: arrange via one primitive, observe via a different one, no mocks.
Ships in Unreal Harness Skills. 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.
Stand up a deterministic, headless-runnable test that proves an Unreal feature works
— and, when asked, wire it into a guarded dev loop so it gates an agent building
that feature. This skill applies the doctrine in docs/TESTING.md; read that file
once if you haven't — this SKILL is the procedure, that doc is the why.
The opinion, in one line: a feature isn't done until a test arranges its preconditions through typed primitives, acts, and asserts on observed state read back through a different primitive — and if you can't arrange or observe it through a typed command, you add that command to the C++ plugin, you don't weaken the test. No mocks. No native UE automation. The MCP surface is the test API.
Before anything else: never mock the engine, never reach for
FAutomationTestBase/ Gauntlet, never assert only on a mutator's own echo. If those feel necessary, the arrange/observe surface has a gap — fill it in C++ (§4).
Establish four things before writing a line of test. Infer what you can from the codebase; ask the user only what you genuinely can't.
actor_spawn, level_load,
bp_create_blueprint, pie_start, …)actor_set_transform, observe with actor_inspect.)If arrange or observe has no typed command, that's the real first task — go to §4.
| Tier | When | Runs under | Observe via |
|---|---|---|---|
| 1 — Static / asset | asset CRUD, blueprint/material/statetree authoring, editor-world actor state | headless -nullrhi | *_inspect / *_read + on-disk .uasset |
| 2 — Runtime / PIE | gameplay, physics, AI, anything that only manifests while playing | headless for queries; GUI if it opens a viewport | structured log markers (primary), pie_query, ai_get_*, editor_perf_snapshot |
| 2b — Pixel / render | "does it look right" | GUI only | editor_screenshot + /see / vision; assert on bytes/path, not pixel-diff |
Most features are Tier 1. Reserve Tier 2 for genuine runtime behaviour; reserve 2b for when a human/vision check of pixels is the only proof.
Default to a Bun in-process integration test in src/server/test/integration/<domain>.test.ts
— fast, no socket, no leaks, auto-skips when no editor is up. Copy
templates/integration.test.ts from this skill as the skeleton, or model on a real
neighbour (src/server/test/integration/actor.test.ts, blueprint.test.ts,
statetree.test.ts).
The four beats, each non-negotiable:
ensureAbsent before any create) and namespaced (NS =
/Game/__MCPTest__). Put shared setup in beforeAll. Use harness helpers from
test/harness/ops.ts (ensureAbsent, payload, isFalsyOrEmpty, assertReady,
firstAssetOf).dry_run: true
pre-flight assertion too (§3)..uasset exists on disk (uassetDiskPath
— a file-local helper, not part of test/harness/ops.ts; copy it from
test/integration/asset.test.ts), not that the create returned success.await assertReady(ctx.mcp) (crash guard).editorSuite("myfeature", (ctx) => {
beforeAll(async () => {
await ensureAbsent(ctx.mcp, `${NS}/BP_Sample`);
await ctx.mcp.expect("bp_create_blueprint", { name: `${NS}/BP_Sample`, parent_class: "Actor" });
});
test("does the observable thing", async () => {
await ctx.mcp.expect("<mutator>", { /* ... */ }); // ACT
const got = await ctx.mcp.expect("<different reader>", { /* ... */ }); // OBSERVE
expect(/* field of got */).toBe(/* expected */); // ASSERT
await assertReady(ctx.mcp);
});
});
Mirror it as a @covers pytest test in tests/integration/test_<domain>.py so
the coverage oracle stays green (§5). Same AAA(O) shape; mcp.expect(tool, {...}).
pie_start returns starting;
poll pie_get_state to a deadline until is_running flips (see waitForPie in
pie.test.ts). Same for stop.test.skipIf(!GUI)(...) (Bun) / @pytest.mark.gui_only (pytest).afterEach/finally that force-pie_stop (harmless
not_in_pie no-op if nothing's playing). Never leave a session running.[FEATURE] event=... field=...); assert via editor_read_logs. This is the
primary runtime oracle — deterministic where screenshots and timings are noisy.pie_send_keystrokes doesn't
reach polled input (GAP-030), and GameMode BeginPlay doesn't fire in PIE
(GAP-031). Drive from a placed BP_*Director, verify via pie_query + markers.When the feature is a mutator, add a dry-run test: call with dry_run: true, assert
result.dry_run === true and inspect result.diff — then assert no side effect
happened (read back, confirm unchanged). Validation parity means a green dry-run
implies a green commit (docs/USAGE.md §1.4). If the mutator returns
dry_run_unsupported, that's expected for append-only/creation ops — assert that
error code instead (it's the documented "not ready for dry-run" signal).
This is the heart of the doctrine. If you cannot construct the scenario or read the outcome through a typed command, add the command to the C++ plugin rather than scripting around it. The scenario lives in the engine, typed and replayable.
HandleCommand-style handler in the right domain .cpp
(src/Plugin/UnrealMCP/Source/UnrealMCP/Private/Commands/...); parse with
TryGet*Field; on bad input return FMCPCommonUtils::CreateErrorResponse(msg, EMCPErrorCode::Code, hint); return a plain result object on success.FMCPBridge::ExecuteCommand's dispatch chain. If it mutates an
asset, follow PreEditChange → mutate → PostEditChange → MarkPackageDirty (server
auto-saves). Add to IsBlockedFromDryRun/IsBlockedDuringPie if applicable and
mirror into src/server/src/bridge/gates.ts.src/server/src/domains/<domain>.ts, register in
src/register.ts, run bun run lint:names + bun run typecheck.docs/USAGE.md §3 and CLAUDE.md → "Adding/editing a C++ command".Prefer a granular, observation-oriented primitive (a reader/inspector, a precise
mutator) over a convenience composite — composites belong in the server layer, and
some are refused by design (docs/ARCHITECTURE.md §5; read it before adding anything
that smells like a recipe). After rebuilding the editor, probe the new command with
bun src/server/scripts/bridge-call.ts <cmd> '<json>' before relying on it.
tests/integration/test_zz_coverage.py statically scans @covers("op", ...)
literals and fails the suite if any registry operation is untested (and catches
typo'd op names). So: every new command needs a @covers pytest test. Mark your
test, e.g. @covers("myfeature_do", "myfeature_inspect").
The Bun suite mirrors but does not yet enforce coverage. Always add the pytest
@coverstest (the gate) in addition to the Bun test (the fast path). If you're asked to "make coverage real on the Bun side," that's a known standing improvement — a Bun coverage oracle scanning the integration suite.
# Fast in-process path (auto-skips editor-gated suites if no editor is up):
cd src/server && bun test
cd src/server && bun test test/integration/myfeature.test.ts # one file
# Against a live editor (start one first, or let the pytest harness own it).
# scripts/ and tests/ live at the REPO ROOT — run these from there, not src/server:
scripts/launch-editor.ps1 # headless; or add -Gui for render/PIE-viewport tests
scripts/run-server.ps1 # the Bun MCP server
# The parity gate (repo root; builds + launches a real editor, runs the coverage oracle):
tests/run.ps1 # headless
tests/run.ps1 --ue-mode=gui # GUI (render/PIE-viewport tests)
tests/run.ps1 --ue-attach # attach to an already-running editor (fast iterate)
Reading the evidence is the point — don't just check green/red:
editor_read_logs for your markers, re-run the
observe command, inspect the diff, capture a screenshot if Tier 2b.mcp_status to ready (never a fixed
sleep), and that exactly one driver is touching the editor.When the ask is "guard an agent building feature X" (not just "add a test"), produce a standing verification the loop runs on every change:
src/server/scripts/verify-<game>.ts
— a bounded PASS/FAIL script (real MCP client → boot PIE → drive → assert markers +
pie_query positions → screenshot → pie_stop), with a wall-clock watchdog and
a finally pie_stop. Model on src/server/scripts/verify-template.ts; copy
templates/verify-loop.ts as the skeleton.bun test <file> (+ the pytest gate).Then state the loop explicitly to the user (this is the guardrail, per
docs/TESTING.md §10):
1. Contract + observe-commands defined (C++ primitives added if missing)
2. Test written FIRST → 3. implement → 4. run headless + bounded
5. READ evidence (logs/diff/screenshot) → 6. green=commit, red=fix → loop 3–5
If you want this loop to run unattended on an interval, that's /loop (drive
/automated-tester or the verify script). Don't build a bespoke scheduler.
FAutomationTestBase, Gauntlet, functional
test actors). The MCP surface is the test API. If you reach for these, stop and add
the missing typed command instead (§4).docs/ARCHITECTURE.md §5).pie_stop). Never leak a PIE
session; one driver at a time./see check,
not a primary machine assertion.automated-tester/ # ${CLAUDE_SKILL_DIR}
SKILL.md this playbook
templates/integration.test.ts Bun integration-test skeleton (AAA(O) + teardown)
templates/verify-loop.ts standing PASS/FAIL E2E verify-script skeleton (watchdog + finally pie_stop)
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub oliver-io/unreal-harness --plugin unreal-skills22 skills in this plugin
/architectWrite or update an architecture document for an Unreal Engine system — a conceptual spec a senior engineer can build from. Use when someone wants to "document this system", "write an architecture doc", "spec a feature before building it", "describe how X works for the team", or "update the docs to match the code". Plan-only and code-free: it researches the live editor, Blueprints, and source, then writes a Design-level document about intent, boundaries, contracts, and invariants — no implementation, no builds, no editor mutation. Works in any UE project, not one studio's house style./bootstrapCreate a new Unreal Engine project under projects/ wired to this repo's UnrealMCP plugin and pre-configured with the recommended engine built-in plugins (Niagara, Water, GeometryScripting, GAS, StateTree, animation, runtime mesh, etc.), and give the project its own agent-facing CLAUDE.md. Use when someone wants to "bootstrap a project", "make a new UE project", "scaffold a test/sandbox project", get a fresh project to drive with the MCP, or "write a CLAUDE.md for this game". Produces a minimal C++ host project that loads the plugin from this repo (no copy) and builds against the engine at UNREAL_ENGINE_ROOT. Asks the intended architecture (C++-first vs Blueprint-first, single- vs multiplayer) and writes a project CLAUDE.md tuned to the answers; can also adopt an existing project by exploring it and writing a CLAUDE.md that describes it./buildBuild an Unreal Engine project across its flavors — the editor target for local play-in-editor (PIE), a standalone/packaged Windows client, and a dedicated server (local dev or a cooked Linux build for remote/cloud hosting). Use when someone wants to "build the game", "build the editor", "compile the project", "package for Windows", "cook content", "make a client/server build", "build the dedicated server", "make a shipping build", "build for the cloud/GameLift", or asks which build command they need and what config/platform to use. Generic across any UE project with similar Editor/Game/Server target architecture — it derives names from the project, hardcodes none. Knows the compile-vs-cook-vs-package distinction, the target matrix, and the constraints that silently break builds./capture-poseTurn a human-framed editor viewport into a reproducible, automated IN-GAME screenshot. The human positions the level-editor camera on whatever they want to see; this records that exact pose (location/rotation/FOV/aspect) and reproduces it inside the running game (PIE) through the real game render path — no character driving, no camera flying — saving the shot so any later run can re-capture the identical view with zero human input. This is the sanctioned way to build the "fixed capture rig" that agent-observed testing doctrine requires (docs/TESTING.md in the harness repo) before any screenshot-based visual validation. Use when someone says "capture this view", "record my camera", "snapshot this framing in-game", "set up a repeatable shot of X", "make a capture rig for this", or "I framed it — grab it in the game". Pairs with /visual-critique for judging the captured frame (against a reference image or a written spec).
/docsBuild and maintain a game project's architecture-documentation system — a bidirectionally-navigable, code-synced knowledge base genericized from a production UE reference project's two-taxonomy model. One namespace, three modes. `/docs taxonomy` builds the FORWARD taxonomy (the file-by-file source atlas TAXONOMY.md + doc router INDEX.md, for top-down navigation). `/docs reverse` builds the REVERSE taxonomy (backward-reference CLAUDE.md files that point a leaf folder up to its owning doc + an ANNOTATE.md backlog of undocumented systems). `/docs audit` is the SYNC loop (verify each doc against the code, one per pass, with a resumable ledger). Use for "build a taxonomy / index the codebase / source atlas", "add folder pointers / annotate the source tree / stop agents drifting off-architecture", "audit the docs / check docs against code / find stale docs". Markdown-only — no source edits, no editor mutation. Generic across any UE project (C++-first, Blueprint-first, or with a TS backend); derives source roots from the project, hardcodes none. The doc *bodies* themselves are written by the sibling `/architect` skill./gameliftAdvise on integrating AWS GameLift (GameLift Servers) — choosing a hosting model, designing game session queues and FlexMatch matchmaking, and deciding how much of the match/place/run lifecycle to own vs delegate to AWS. Use when someone asks "how do I set up a GameLift queue", "add matchmaking", "how should we host dedicated servers", "do we need FlexMatch", "custom control plane vs AWS-native", "why are placements timing out", or wants to understand GameLift's hosting/placement model before building. Neutral, vendor-fact-grounded, code-free advisor — not a code generator.