Rules for making headless Godot (4.2+) development reproducible, avoiding drift and environment-specific failures.
Scope:
- Godot 4.2+ (Godot 3.x is out of scope)
Required rules (highest priority):
- Always use
--headless --path <PROJECT_DIR>(removescwddependency) - Always capture logs:
2>&1 | tee logs/<name>.log - In sandbox/CI, or after
user:/// XDG write failures, use project-localXDG_DATA_HOME,XDG_CONFIG_HOME, andXDG_CACHE_HOME - Never edit
.tscnas raw text (edits must go through--headless --script) - For repeated validation commands, standardize them as
tools/*.sh; after manual tweaks, re-run via the same scripts - If
res://tools/godot_apply_patch.gdis missing, copy.agents/skills/headless-godot/tools/godot_apply_patch.gdto<PROJECT_DIR>/tools/godot_apply_patch.gdbefore running patch commands - Keep startup smoke and logic tests separate: smoke starts
run/main_scene;run_tests.gdholds project-specific logic checks
If you get stuck, provide:
- Full command lines and
logs/*.log godot --versionoutput- Whether
export_presets.cfgexists (when exporting)
Out of scope:
- GUI/OS-specific setup beyond the project-local XDG wrapper
- Level design, render validation, performance tuning
- Game-specific scoring, win/loss rules, controls, and simulation policies
When you need details, read these files (relative to this skill's base directory):
skills/headless_cli.md— CLI conventions, XDG setup, known warningsskills/export_and_import.md— export/import rulesskills/scene_editing_via_godot.md— safe.tscnediting, patch JSON schema and operationsskills/testing_headless.md— headless testing strategy
If unsure about Godot CLI or features, consult: