/godot-dev:godot-play-harnessfrom godot-dev
Provides a harness for Godot journey tests: boots into a situation, drives input from a script, records a timeline.jsonl per run, and captures screenshots when a window exists.
Ships in godot-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 journey boots straight into a moment, drives the same actions a player would, and leaves a timeline another run can be compared with. None of it is instrumentation to delete afterwards: the probe and the situations ship with the game, because the next complaint arrives after the debug node was removed.
| The situation | Read |
|---|---|
| "Playtest this"; does the courier reach the gate, every run; the first journey in a project | the four parts below, then reference/journeys.md |
| Boot straight into a moment; a test that cannot reach a screen; a wait that times out | reference/journeys.md → "Situations" |
| Pressing buttons from a script; a press the game never sees | reference/journeys.md → "Driving input" |
A red run to replay; --fixed-fps; the run ended with no message | reference/journeys.md → "Fixed step, seeds and replay" |
Reading, checking or comparing a recorded run; the timeline/1 fields in Godot terms | reference/timeline-format.md |
| A screenshot or a movie of the moment; a black or missing frame | reference/frames.md |
| Unit tests of pure code, no scene | godot-testing |
| Godot exiting 0 after errors; which lines are markers; timeouts | godot-verify |
| Input actions, the input map, rebinding | godot-input |
| Frame time and monitors over a moment | godot-profiling |
| Autoload design and scene changes in general | godot-scene-flow |
Copy resources/situations.gd, resources/game_probe.gd and resources/journey_recorder.gd
into one folder (they preload each other by relative path) and register the first as the autoload
Situations. Copy templates/courier_situations.gd and name the copy in project.godot:
[autoload]
Situations="*res://harness/situations.gd"
[harness]
situations_script="res://journeys/courier_situations.gd"
Start the first journey from templates/approach_gate_journey.gd. Every shipped script is
statically typed and loads with untyped_declaration raised to an error.
| Part | Done when |
|---|---|
Probe (game_probe.gd) | Situations.probe.snapshot(get_tree()) returns state, pos, ready{} and allReady from the game's own nodes |
Situations (situations.gd) | godot --path . -- --situation=<id> prints [SITUATION] READY <id> for every id the provider registers |
| Journeys (a Node script) | one run prints JOURNEY_DONE ... violations=0 and leaves timeline.jsonl with an end line |
Verdict (scripts/journey_run.py) | it exits 0 on a clean run, and 2 when a journey invariant or a report rule is broken |
python3 scripts/journey_run.py --project . --journey res://journeys/approach_gate_journey.gd \
--out /tmp/journeys --seed 7 --max vel.x:260 --milestone arrival \
--monotonic state:approach,passed --no-null cam
It runs godot --headless -l en --path . --fixed-fps 60 --quit-after 3600 -- --journey=... --journey-out=... --seed=7 under a wall-clock timeout, and decides from the output, never from
the exit code: Godot exits 0 after script errors.
| Verdict | When |
|---|---|
PASS (0) | JOURNEY_DONE, no marker line, no violation, every rule held |
FAIL (2) | a SCRIPT ERROR:, SHADER ERROR:, ERROR: or WARNING: line; a crash, also after the sentinel; a journey violation; a broken rule; a file that breaks timeline/1 |
UNVERIFIED (3) | no binary, a wall-clock timeout, or no JOURNEY_DONE: the backstop ended a run that never finished |
scripts/timeline_report.py checks a timeline on its own (no Godot), with the same rules, and
compares two runs with --before.
A journey is a normal run with the journey loaded by the Situations autoload, not a -s
script: a SceneTree script is compiled before autoloads exist (naming Situations fails to
compile), and a journey under the autoload survives scene changes.
The gate, its collision shape and the courier standing on the ledge must all be true in the same
pass. A situation declares them as probe members; the autoload's enter() waits for all of them:
[SITUATION] READY gate-approach frames=5
[SITUATION] TIMEOUT gate-approach not ready after 600 frames (0.0s): gate_shape
The wait counts frames as well as seconds: under --fixed-fps a headless run is not throttled,
and a wall-clock wait alone outlasts the --quit-after backstop, so the run ends with no message.
A member is a predicate that finds its node each time, never a bool set during a load or a
reference a scene change freed. Never await get_tree().create_timer(3.0).timeout as a wait: a
sleep long enough today flakes next month and names nothing when it does.
var probe := Situations.probe
probe.set_player(route.get_node(^"Courier"))
probe.set_state(func() -> Variant: return route.phase)
probe.ready_member("gate_shape", func() -> bool: return not (route.get_node(^"Gate/Shape") as CollisionShape2D).disabled)
probe.register("gateDist", func() -> float: return gate.global_position.x - courier.global_position.x)
state comes from the game's own state machine through set_state(). A probe holding its
own copy starts lying the day the two diverge.change_scene_to_file(), then the route's
start_at()), never by assigning the phase: readiness then passes on an empty moment.Input.parse_input_event() with an InputEventAction
reaches _unhandled_input; Input.action_press() reaches polling only, so a journey built on
it passes on a game whose players cannot press anything.--fixed-fps 60 plus --seed=N makes two runs give the same samples
(the wall clock ut aside), so a red run replays with one command.samples=0 makes
every per-sample rule pass vacuously.--windowed on a desktop session
(reference/frames.md); keep those runs out of CI.| Not here | Go to |
|---|---|
| Unit tests, a test runner, add-on test frameworks | godot-testing |
| The verdict on a change; trusting a run; markers and exit codes in general | godot-verify |
| Defining actions, the input map, rebinding, touch | godot-input |
| Frame-time numbers, monitors, before and after a change | godot-profiling |
| The run-state autoload, saving, loading screens | godot-scene-flow |
| Flags, finding the binary, headless scripts in general | godot-cli |
| A new project's settings, including the strict warnings | godot-new-project |
reference/frames.md (opens in a new tab)reference/journeys.md (opens in a new tab)reference/timeline-format.md (opens in a new tab)resources/game_probe.gd (opens in a new tab)resources/journey_recorder.gd (opens in a new tab)resources/situations.gd (opens in a new tab)scripts/journey_run.py (opens in a new tab)scripts/timeline_report.py (opens in a new tab)templates/approach_gate_journey.gd (opens in a new tab)templates/courier_situations.gd (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub tipoli5890/game-studio --plugin godot-dev28 skills in this plugin
/godot-2d-controllerMove a 2D character in Godot: CharacterBody2D jump, coyote time, jump buffer, slopes, one-way and moving platforms, top-down movement./godot-2d-renderingGodot 2D look: draw order, z_index and y-sort, CanvasLayer, 2D lights and shadows, canvas shaders, Parallax2D, pixel-perfect scaling./godot-2d-rigA layered 2D character into Godot: rig2d.json to Skeleton2D, Bone2D and weighted Polygon2D parts, cut-out animation, 2D IK./godot-2d-spritesSprite frames into Godot: frames.json to SpriteFrames, AnimatedSprite2D, sheet slicing, pivots, filtering and import for pixel art./godot-3d-controllerMove a 3D character in Godot: CharacterBody3D grounding, slopes and steps, third and first person, lane runner, click-to-move./godot-3d-modelsBring a glTF model into Godot: import settings, post-import script, materials, LODs, collision; audit it against a triangle and texture budget.