Prove a Godot change works headless: import, load every script and shader, run scenes N frames. Godot exits 0 after errors, so the output decides PASS/FAIL.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Godot Verify?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tipoli5890-godot-verify)
---
name: godot-verify
description: >-
Prove a Godot change works headless: import, load every script and shader, run scenes N frames.
Godot exits 0 after errors, so the output decides PASS/FAIL.
---
# godot-verify — the headless gate, and the exit 0 that proves nothing
Godot exits 0 after a parse error, a runtime error, a broken shader and a missing resource, so a
change is verified by what the run prints, never by its exit code.
## Load what the situation needs
| The situation | Read |
|---|---|
| "Does it work?" after any change to scripts, scenes, shaders, resources or autoloads | *The gate* below, then run `scripts/godot_verify.py` |
| An exit code of 0 you were about to believe; which command shows which failure; why not `--check-only` | `reference/traps.md` |
| A line in the output: is it an error, which file, should a warning fail | `reference/markers.md` |
| A run that never ends; choosing `--timeout`, `--quit-after`, `--frames`, `--fixed-fps` | `reference/timeouts.md` |
| Flags, `-s` scripts, arguments after `--`, finding the binary | `godot-cli` |
| Rules and data under unit tests, a runner with no add-on | `godot-testing` |
| Playing through a moment: input, timelines, screenshots | `godot-play-harness` |
| Godot 3 names in the code that fails to load | `godot-version-guard` |
| Scene or resource text that will not load | `godot-scene-files` |
## The gate
```bash
GODOT_BIN=/path/to/Godot python3 scripts/godot_verify.py path/to/project
python3 scripts/godot_verify.py path/to/project --godot /path/to/Godot --scene res://rooftop_route.tscn --frames 120
```
A run on a project with one bad script that nothing loads at startup. Every Godot process
exits 0, and `--import` prints nothing about the bad file:
```
run import: exit 0, 1.1s, 0 marker lines
run load: exit 0, 0.1s, 2 marker lines
run scene res://depot.tscn: exit 0, 0.1s, 0 marker lines
NOTE headless renders nothing: pixels, the GPU shader back-end and audio output were not checked
FAIL load res://uses_class.gd: SCRIPT ERROR: Parse Error: Expected expression for variable initial value after "=". (res://uses_class.gd:4 GDScript::reload) || ERROR: Failed to load script ...
godot-verify: FAIL 1 problem; 7 files loaded (4 .gd, 1 .gdshader, 1 .tres, 1 .tscn), 1 scene run 60 frames; stages import+load+scenes
```
The last line is the verdict and the exit code says the same:
| Exit | Verdict | Meaning |
|---|---|---|
| 0 | `PASS` | every stage ran, printed its sentinel and no marker |
| 2 | `FAIL` | a stage ran and something is wrong; each problem is on a `FAIL` line above |
| 3 | `UNVERIFIED` | nothing was verified: no binary, a binary that prints no version, a timeout, a missing sentinel, the gate's own script failing |
| 1 | `refused` / usage | the folder has no `project.godot`, or a bad flag |
UNVERIFIED is not green. Report it as "not verified", with its reason, and never round it up.
| Flag | Effect |
|---|---|
| `--godot PATH` | the binary; default `$GODOT_BIN`. A macOS app bundle is taken to its `Contents/MacOS/Godot`. Never guessed |
| `--scene PATH` | a scene to run (res://, uid:// or a path in the project); repeatable. Default: the main scene |
| `--no-main-scene` | run no scene unless `--scene` names one |
| `--frames N` | frames per scene (default 60) |
| `--fixed-fps N` | one physics tick per frame and no real-time wait (default 60; 0 runs in real time) |
| `--timeout S` | wall clock per Godot run (default 300) |
| `--exclude PATH` | a res:// folder or file not to load (an add-on you do not own); repeatable |
| `--allow-warnings` | `WARNING:` lines become `NOTE` lines instead of failures |
| `--copy` | verify a temp copy without `.godot/`; the folder is not written to |
## What each stage catches, and why the order
1. **`--version`** must print a version line. A wrapper or a broken install that exits 0 and
prints nothing would otherwise pass every later stage.
2. **`--import`, once.** It writes `.godot/` and the global class cache, without which every
`class_name` is "not found". If a pass still reports missing imports, run it again until
nothing new imports. It also reports asset
import errors and errors in what the main scene reaches. In place it writes what the editor
writes: a `.uid` beside each `.gd` and `.gdshader` and a `.import` beside each asset; commit
those, or pass `--copy`.
3. **Load every file in the project context** (`resources/verify_loader.gd`, run by `-s`). Every
`.gd .tscn .scn .tres .res .gdshader` under `res://`, except `.godot/`, dot-folders, folders
with a `.gdignore` and folders holding their own `project.godot`. Autoloads and `class_name`
resolve here, unlike single-file `--check-only`. A `Logger` pins each error to its file; each
scene is instantiated and freed; each shader is compiled with
`Shader.get_shader_uniform_list`, because `load()` alone leaves a broken shader silent. This is
the only stage that sees a script or shader that nothing uses at startup.
4. **Run each scene for N frames** (`resources/scene_runner.gd`). The scene becomes
`SceneTree.current_scene`, so `_ready` runs: the only stage that sees runtime errors there. A
scene that quits the tree itself is reported with the frames it reached, as a failure.
Every run is `--headless -l en --path PROJECT`, under a wall clock, with `--quit-after` as a
backstop on the `-s` runs. The two scripts are copied to a temp folder and run by absolute path,
so nothing of the gate's is written into the project.
## Verdict rules
Per run, in this order:
1. A marker from the project (`SCRIPT ERROR:`, `SHADER ERROR:`, `ERROR:`, `WARNING:`, a crash
banner) is **FAIL**, even when the run then hangs or prints no sentinel: the error is real
and a retry will not change it.
2. A marker naming the gate's own loader or runner is **UNVERIFIED**: the tool broke, not the
project.
3. A timeout, or a run with no sentinel, is **UNVERIFIED**.
4. Otherwise the run passes.
The gate keeps going after a FAIL, so one pass lists every broken file; it stops at the first
UNVERIFIED stage. Problems already reported against a file are not repeated from the raw stream.
## Using the two scripts yourself
They need no `class_name`, no autoload and no copy inside the project:
```bash
# res_paths.txt: one res:// path per line
"$GODOT_BIN" --headless -l en --path PROJECT --quit-after 300 -s /abs/verify_loader.gd -- /abs/res_paths.txt
"$GODOT_BIN" --headless -l en --path PROJECT --fixed-fps 60 --quit-after 360 -s /abs/scene_runner.gd -- res://depot.tscn 60
```
Their sentinels are `GODOT_VERIFY_DONE stage=load status=ran files=N bad=M` and
`GODOT_VERIFY_DONE stage=scene status=ran frames=60/60 path=...`. A run of either that does not
end with its line has no verdict.
## Discipline
- **Never read the exit code as a verdict.** It is 0 after nearly every failure
(`reference/traps.md`). Exports and `quit(code)` are the exceptions.
- **A sentinel per run, and counts in it.** `files=0` or `frames=0/60` is a run that checked
nothing; a pass with no counts hides it.
- **Load in the project context.** Not file by file with `--check-only`: it is wrong both ways.
- **Run the scenes that matter.** Loading proves a scene parses; only running it proves `_ready`
works. Name each scene a change touches with `--scene`.
- **Headless is not the whole game.** No pixels, no GPU shader back-end, no audio: the gate says
so on its `NOTE` line, and so does any report built on it.
- **Warnings fail.** Downgrade them with `--allow-warnings` only for a project that knowingly
prints them, and read the `NOTE` lines (`reference/markers.md`).
## Scope — what this skill does NOT do
| Not here | Go to |
|---|---|
| Running Godot by hand, every flag, user arguments, logs | `godot-cli` |
| Unit tests and their runner | `godot-testing` |
| Journeys, timelines, frames from a windowed run | `godot-play-harness` |
| Renamed Godot 3 classes and syntax | `godot-version-guard` |
| Export presets and templates | `godot-export` |