/unity-dev:unity-play-harnessfrom unity-dev
Makes Unity games observable and reachable for automated playtesting and journey tests. Boots into specific game moments and verifies behavior like 'does the runner reach the gate?'
Ships in unity-dev. 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; scripts run unread.
A game an agent cannot drive is a game that gets checked once, by hand, by whoever happens to be at the keyboard. The work here is not testing; it is making the game observable and reachable so that everything else — a verification, a measurement, an answer to a complaint — becomes cheap enough to do on every change.
| The situation | Read |
|---|---|
| "Playtest this"; a journey test — does the runner reach the gate, every run | the four parts below, then reference/journeys.md |
| Designing the one-line snapshot; a value you need is not in it; reading it from eval, a command, the log or a test | reference/probe-contract.md |
| "boot straight into the boss"; "how would a test reach this screen"; a wait that times out | reference/situations.md |
| Writing the test that drives and samples; which invariants are worth asserting over a run | reference/journeys.md |
| A screenshot pass over every situation; situations that must not write the player's saves; the same ids in a built player | reference/situations.md → "A shot list over every situation" |
| A match that has to play itself; an autoplayer through the real input funnel; the smoke run that rides on it | reference/situations.md → "the autoplayer" · reference/journeys.md → "The autoplayer smoke run" |
| Reading, comparing or handing over a recorded run | reference/timeline-format.md |
| A feel report with no number in it — "comes in too fast", "disappears while it loads", "looks inconsistent", "I can't measure what the player felt"; deciding what stays a human judgement | reference/complaint-to-test.md |
| Minutes of random but plausible input over every situation; a seed that replays a red run | reference/soak.md · templates/SoakTest.cs |
| What to build first, where a threshold comes from, simulation/presentation split | unity-game-brief |
| A results file you are about to believe; exit codes; state leaking between runs | unity-debug → reference/harness-trust.md |
Running the suite headless: -runTests, test filters, tests not found | unity-debug → reference/cli-harness.md |
Driving a live Editor, unity command, Safe Mode | unity-debug → reference/editor-control.md |
| Needing to SEE the moment: windowed runs, settle time, reading the pixels | unity-debug → reference/visual-checks.md |
Copy resources/GameProbe.cs, resources/GameProbeReporter.cs, resources/Situations.cs,
resources/SituationBoot.cs and resources/JourneyRecorder.cs into a
Runtime assembly, resources/Editor/ProbeCommands.cs into an Editor one, and start from
templates/CourierSituations.cs and templates/JourneyTest.cs. A 2D game starts from
templates/CourierSituations2D.cs instead and adds resources/JourneyInvariants2D.cs, which is
a separate file so that a project without the 2D physics module still compiles the rest.
Four parts, each with a condition that says it is actually there:
| Part | Done when |
|---|---|
| Probe | unity command eval 'return GameProbe.Json();' returns one line carrying state, pos, ready{} and allReady |
| Situations | Situations.Ids() lists at least one id, and every one of them declares a readiness set |
| Journeys | one [UnityTest] writes timeline.jsonl, logs [JOURNEY] … samples=N, and scripts/journey_report.py prints violations=0 |
| Complaint → test | the last feel report has a situation, a sampled quantity, a threshold with a source, and a before/after table |
None of it is instrumentation to delete afterwards. GameProbe and Situations ship with the
game, because the next complaint arrives after the debug component was removed.
The single most expensive shape of bug here, and the reason situations wait on a set:
The visible ground, its collider and the hazard volume must become ready in the same pass. When they do not, the game looks finished and is not — the runner is drawn on a lane it can fall through, and the bug reproduces once in ten runs.
So: list every member the moment needs, make each one a predicate that is re-evaluated on every poll, and wait until they are all true with a timeout that names the ones still missing.
[SITUATION] TIMEOUT approach-gate not ready after 15.0s: laneCollider, sentry
Never yield return new WaitForSeconds(3f). A sleep that is long enough today is a flake next
month, and when it fails it tells you only that three seconds passed.
| Key | What it is |
|---|---|
schema · frame · t · ut · dt · timeScale | Version, and the clock in both scales — a timeScale of 0 explains most "it froze" reports |
scene · situation · state · cam | Where the game is, and which moment it was told to be in; a null cam explains a black screenshot |
pos · vel · speed | The player: transform.position, and velocity from the delegate given to SetPlayerVelocity (a 2D body, a CharacterController, a motor, a grid mover), else Rigidbody.linearVelocity, else the position delta |
ready{} · allReady | Every readiness member, re-evaluated this frame |
counts{} · custom{} | Named ints, and the handful of game-specific numbers a complaint could be about |
batch · playing | Which instrument produced the line, and whether the game was running at all |
Two hooks put anything else in there, and both take a delegate rather than a value — a delegate
cannot go stale, a cached bool can:
GameProbe.Ready("laneCollider", () => _lane != null && _lane.Collider.enabled);
GameProbe.Register("gateDist", () => Vector3.Distance(_runner.position, _gate.position));
state comes from the game's own state machine, through SetState(() => _run.Phase.ToString()).
A probe holding its own copy starts lying on exactly the day the two diverge — which is the day
something is broken.
Enter calls the game's own transition. Assigning Phase = Approach produces the right
label with none of the work done, and readiness then passes on an empty moment.bool set during a
load that may have been cancelled. An empty set reads as not ready.timeScale to 0
must still time out instead of hanging the suite.Update. WaitForEndOfFrame never resumes in batch mode, so a journey that
samples there records everything windowed and nothing headless.speed < 12 within 2 units of the gate
survives the next tuning pass; speed == 9.8 fails it. Print the absolute numbers underneath.samples=0 makes every other assertion iterate an empty list
and pass — a green test that checked nothing.GameProbe and Situations stay in a Runtime assembly;
GameProbeReporter disables itself unless Debug.isDebugBuild || Application.isEditor, so a
release player carries the probe and prints nothing; the commands are Editor-only.| Not here | Go to |
|---|---|
| Running Unity, exit codes, screenshots, verifying a fix, trusting a run, proving the harness is honest | unity-debug |
| Frame-time counters, draw calls, GC, a before/after table of numbers | unity-profiling |
| The brief, the constraints, which interaction to build first | unity-game-brief |
| Installing editors, licences, templates, the CLI's own surface | unity-cli |
| Assembly definitions, folder layout, which Editor version the project is pinned to | unity-new-project |
| A collision or trigger that never fires, a raycast that misses | unity-physics-3d · unity-physics-2d |
| Building the UI rather than reaching a screen of it | unity-game-ui |
| Which controller, camera or movement model a game needs, by perspective | unity-gameplay |
| Reading input through one funnel a journey can drive | unity-input |
| The same observability on a real phone: a probe scene read through logcat or the iOS console | unity-device-testing |
reference/complaint-to-test.md (opens in a new tab)reference/journeys.md (opens in a new tab)reference/probe-contract.md (opens in a new tab)reference/situations.md (opens in a new tab)reference/soak.md (opens in a new tab)reference/timeline-format.md (opens in a new tab)resources/Editor/ProbeCommands.cs (opens in a new tab)resources/GameProbe.cs (opens in a new tab)resources/GameProbeReporter.cs (opens in a new tab)resources/JourneyInvariants2D.cs (opens in a new tab)resources/JourneyRecorder.cs (opens in a new tab)resources/SituationBoot.cs (opens in a new tab)resources/Situations.cs (opens in a new tab)scripts/journey_report.py (opens in a new tab)scripts/probe.py (opens in a new tab)templates/CourierSituations.cs (opens in a new tab)templates/CourierSituations2D.cs (opens in a new tab)templates/JourneyTest.cs (opens in a new tab)templates/SoakTest.cs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tipoli5890/game-studio --plugin unity-dev51 skills in this plugin
/unity-2d-animationSkeletal 2D characters: PSB rig, bones and weights, sprite swaps, 2D IK (2D Animation package)./unity-2d-controllerMove a 2D character: platformer jump, slopes, coyote time, moving platforms, top-down movement./unity-2d-gridGrid tactics and tile puzzles, hex or square: move range, A* paths, line of sight, turns, undo./unity-2d-level2D level layout as data: Tiled/LDtk import, rooms, endless chunks, seeded levels, jump reachability.