/godot-mini-game-builder:running-headless-godotfrom Godot Mini-Game Builder
Runs reproducible headless Godot 4.2+ workflows for CLI commands, exports, scripted scene edits, and tests. Use when running Godot CLI commands, editing .tscn via script, capturing logs, or exporting in headless mode.
Ships in Godot Mini-Game Builder. 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.
Rules for making headless Godot (4.2+) development reproducible, avoiding drift and environment-specific failures.
Scope:
Required rules (highest priority):
--headless --path <PROJECT_DIR> (removes cwd dependency)2>&1 | tee <PROJECT_DIR>/logs/<name>.log for commands
that terminate themselves, and capture Godot's status from ${PIPESTATUS[0]}. When timeout is
the only termination mechanism, redirect directly with > <PROJECT_DIR>/logs/<name>.log 2>&1
and capture timeout's status explicitly; do not pipe that run through tee.XDG_DATA_HOME, XDG_CONFIG_HOME, and XDG_CACHE_HOME for any scripted Godot run. Set all three together — Godot writes to all three categories, and partial redirection still hits the unwritable default for the unset ones. Required to avoid CI/sandbox write failures (Can't open file for writing: ~/.config/godot/...); harmless on a developer machine because the only effect is that per-project metadata/cache live under <PROJECT_DIR>/.godot-xdg/ instead of the user's globals. Add .godot-xdg/ to .gitignore.
exports affect every process started from the same shell, not just godot. If the same shell session also runs non-Godot tooling that honors XDG vars (e.g. a Node/Playwright browser-automation step for web-export testing), that tooling's own cache/data lookup silently moves under <PROJECT_DIR>/.godot-xdg/ too and can fail to find things it installed elsewhere (observed: Playwright reporting a missing browser executable). Export these three vars only in the specific command/subshell that invokes godot, or explicitly unset/restore them before running unrelated tools in the same shell..tscn as raw text (edits must go through --headless --script)tools/*.sh; after manual tweaks, re-run via the same scriptsres://tools/godot_apply_patch.gd is missing, copy tools/godot_apply_patch.gd, resolved relative to this loaded SKILL.md, to <PROJECT_DIR>/tools/godot_apply_patch.gd before running patch commandsrun/main_scene; run_tests.gd holds project-specific logic checksFor repeated startup verification, standardize as <PROJECT_DIR>/tools/smoke.sh. Other repeated invocations (run_tests.sh, export_web.sh, ...) follow the same shape — only the godot arguments and the log filename change.
#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
# Project-local XDG (always; see Required rules above).
export XDG_DATA_HOME="$PROJECT_DIR/.godot-xdg/data"
export XDG_CONFIG_HOME="$PROJECT_DIR/.godot-xdg/config"
export XDG_CACHE_HOME="$PROJECT_DIR/.godot-xdg/cache"
mkdir -p "$XDG_DATA_HOME" "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$PROJECT_DIR/logs"
# Smoke = launch run/main_scene headlessly, quit after a few frames.
# --quit-after <N> bounds the run by frame count.
godot --headless --path "$PROJECT_DIR" --quit-after 60 \
2>&1 | tee "$PROJECT_DIR/logs/smoke.log"
echo "godot_exit=${PIPESTATUS[0]}"
Pass criteria for smoke:
${PIPESTATUS[0]}) is 0.logs/smoke.log contains no ERROR, SCRIPT ERROR, Failed to load, or Parse Error line outside the project's known-warning whitelist (see references/headless_cli.md).print() from the main scene's _ready, or absence of "Main scene can't be loaded").If you get stuck, provide:
logs/*.loggodot --version outputexport_presets.cfg exists (when exporting)Out of scope:
When you need details, read these files (relative to this skill's base directory):
references/headless_cli.md — CLI conventions, XDG setup, known warningsreferences/export_and_import.md — export/import rulesreferences/scene_editing_via_godot.md — safe .tscn editing, patch JSON schema and operationsreferences/testing_headless.md — headless testing strategyIf unsure about Godot CLI or features, consult:
references/export_and_import.md (opens in a new tab)references/headless_cli.md (opens in a new tab)references/scene_editing_via_godot.md (opens in a new tab)references/testing_headless.md (opens in a new tab)tools/godot_apply_patch.gd (opens in a new tab)tools/templates/run_tests.gd (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub abagames/agentic-gamedev-skills --plugin godot-mini-game-builder4 skills in this plugin
/creating-godot-procedural-audioDesigns and implements procedural audio for Godot games. Use when creating runtime SFX with Godot built-in audio APIs, mapping game events to timbre, or avoiding external audio assets./designing-mini-gamesDesigns original, compact mini-games — rules, controls, scoring, hazards, and difficulty curves — for any input scheme, including one-button (tap / hold / release) games. Use when defining a new mini-game concept, converting creative constraints or seeds into mechanics, choosing an input scheme, checking state-variable necessity, or preventing idle, hold-only, or mashing play from becoming optimal./scaffolding-godot-mini-gamesScaffolds a minimal Godot mini-game project from a reusable infrastructure-only template. Use when starting a Godot 4.2+ mini-game that needs headless tests, Web export defaults, canvas shell, telemetry helpers, and procedural audio primitives.Other plugins' skills for the same job