| name | godot-4 |
| description | Work inside a Godot 4.x project: find the engine, read project.godot, edit scenes and GDScript/C#, verify headless after every change, playtest windowed, export. Use whenever the project has project.godot or the owner mentions Godot, GDScript, .tscn, autoloads, GUT or gdUnit4.
|
| version | 1.0.0 |
| author | Remedy |
| tags | ["game","godot","gdscript","engine","headless","export"] |
| requires | [] |
| tools | ["game_project_info","godot_run","godot_check","godot_export","godot_import","game_playtest","local_discover","bash_exec","file_read","file_write","file_edit","repo_search","list_dir","computer_screenshot","skill_activate"] |
| triggers | ["\\b(godot|gdscript|\\.tscn|\\.gd\\b|autoload|gdunit|gut\\b)\\b","\\b(export templates?|scene tree|project\\.godot|\\.tres|\\.godot/)\\b"] |
| local | {"binaries":[{"id":"godot","names":"[Truncated]","env":"[Truncated]"}]} |
Godot 4 (engine loop)
Godot 4.x only. GDScript 2 syntax. If project.godot says config_version=4
or config/features lacks "4.x", stop and tell the owner it is a Godot 3
project — do not mix idioms.
Decision tree (start here)
game_project_info(path) → engine name/version, language, binary, verify
command. If it reports no binary: try local_discover, GODOT /
GODOT4_BIN env, godot* on PATH, a Godot*.exe in the project root
(prefer *_console.exe on Windows). Still nothing → ask: "tell me where
Godot is" and move on. Never start a setup wizard.
file_read project.godot: main scene (run/main_scene), autoloads,
input map, window size/stretch, rendering method, physics layer names.
- Work in scenes (
.tscn, text) + scripts (.gd). Prefer editing .gd
over hand-editing .tscn; when you must touch .tscn, keep load_steps,
[ext_resource] ids and uid:// values intact.
- Verify after every change (hard rule):
godot_check(paths=[edited .gd/.tscn]) → parse errors, missing refs.
- Smoke:
godot_run(path, script="tools/smoke_boot.gd", headless=True)
and require SMOKE OK in stdout. No smoke script yet → create it
(below) before the first edit. Fallback: godot_run(headless=True, quit_after=1) — weaker, prints only script/load errors.
- Playtest:
godot_run(path, headless=False) (auto-backgrounded) then
game_playtest(pid, seconds, interval, keys, question) or
computer_screenshot. Read the engine log for SCRIPT ERROR, E 0:00.
- Export:
godot_export(list=True) → pick preset → godot_export(preset, output, debug=False). Templates missing → tell the owner to install them
from Editor → Manage Export Templates; you cannot download them silently.
Read references/INDEX.md and pull what you need with file_read.
Canonical smoke script —