Skip to content

77 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic launched as Claude Skills), with a router that loads the right skill for your engine and task. Runs in Claude Code, Cursor, Kiro, Codex, Copilot, Gemini CLI and more.

feat(godot): add godot-gdscript-headless-testing skill (Godot 4.7)

Rock (OpenClaw)e86bec955ce0
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index 0dbf7dd..3d0e4a0 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -27,6 +27,7 @@
"./skills/godot/godot-multiplayer",
"./skills/godot/godot-export",
"./skills/godot/godot-csharp",
+ "./skills/godot/godot-gdscript-headless-testing",
"./skills/unity/unity-csharp-scripting",
"./skills/unity/unity-input-system",
"./skills/unity/unity-physics",
@@ -116,7 +117,8 @@
"./skills/godot/godot-audio",
"./skills/godot/godot-multiplayer",
"./skills/godot/godot-export",
- "./skills/godot/godot-csharp"
+ "./skills/godot/godot-csharp",
+ "./skills/godot/godot-gdscript-headless-testing"
]
},
{
diff --git a/README.md b/README.md
index c73f147..d37bf5f 100644
--- a/README.md
+++ b/README.md
@@ -7,16 +7,16 @@
alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents. 67 skills and a router across 10 engines, including an art-direction and asset-production workflow.">
</p>
-**73 game-dev skills for your AI coding agent — install once, and a router loads the
+**74 game-dev skills for your AI coding agent — install once, and a router loads the
right skill for whatever you're building.**
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
-[![Skills](https://img.shields.io/badge/skills-73%20%2B%20router-brightgreen)](skills/)
+[![Skills](https://img.shields.io/badge/skills-74%20%2B%20router-brightgreen)](skills/)
[![Format](https://img.shields.io/badge/format-Agent%20Skills-informational)](docs/SKILL-FORMAT.md)
[![Last commit](https://img.shields.io/github/last-commit/gamedev-skills/awesome-gamedev-agent-skills)](https://github.com/gamedev-skills/awesome-gamedev-agent-skills/commits/main)
[Agent Skills](docs/SKILL-FORMAT.md) are small capability files an AI agent loads only when it
-needs them. This repo gives your agent **73 game-dev skills** and a **router** that picks the
+needs them. This repo gives your agent **74 game-dev skills** and a **router** that picks the
right ones for you. You describe what you're building; the agent loads the matching engine and
task skills before it writes code.
@@ -40,7 +40,7 @@ task skills before it writes code.
## Quick start
**One command, any agent.** The [`skills`](https://www.npmjs.com/package/skills) CLI detects the
-coding agent you already use and installs the router plus all 73 skills into the right place:
+coding agent you already use and installs the router plus all 74 skills into the right place:
```bash
npx skills add gamedev-skills/awesome-gamedev-agent-skills
@@ -117,11 +117,11 @@ engine), while disciplines, genres, and workflows are additive on top.
## Catalog
-73 skills across 8 categories — each links to its `SKILL.md` below.
+74 skills across 8 categories — each links to its `SKILL.md` below.
### Engines
-#### Godot — 15 ([`skills/godot/`](skills/godot/)) · Godot 4.7
+#### Godot — 16 ([`skills/godot/`](skills/godot/)) · Godot 4.7
| Skill | Scope |
|-------|-------|
@@ -140,6 +140,7 @@ engine), while disciplines, genres, and workflows are additive on top.
| [`godot-multiplayer`](skills/godot/godot-multiplayer/SKILL.md) | High-level multiplayer: `MultiplayerAPI`, RPCs, spawner/sync |
| [`godot-export`](skills/godot/godot-export/SKILL.md) | Export presets/templates, platform builds, headless CLI export |
| [`godot-csharp`](skills/godot/godot-csharp/SKILL.md) | C#/.NET in Godot: bindings, signals as events, GDScript interop |
+| [`godot-gdscript-headless-testing`](skills/godot/godot-gdscript-headless-testing/SKILL.md) | Run GDScript tests via `godot --headless`, exit codes for CI |
#### Unity — 8 ([`skills/unity/`](skills/unity/)) · Unity 6.3 LTS (6000.3)
@@ -311,7 +312,7 @@ func _physics_process(delta: float) -> void:
## Repository layout
```
-skills/ 73 specialized skills, grouped by engine / discipline / genre / workflow
+skills/ 74 specialized skills, grouped by engine / discipline / genre / workflow
router/ the master router skill (+ references/)
docs/ authoring standard, installation, compatibility
templates/ SKILL.md template
diff --git a/router/SKILL.md b/router/SKILL.md
index 4cc100e..7f6bd2a 100644
--- a/router/SKILL.md
+++ b/router/SKILL.md
@@ -94,7 +94,8 @@ File signals sharpen this: `*.yarn`/`*.ink` → `dialogue-systems`/`visual-novel
`godot-nodes-scenes`, `godot-signals-groups`; 2D `godot-2d-movement`, `godot-tilemap`; 3D
`godot-3d-essentials`; physics `godot-physics`; UI `godot-ui-control`; animation
`godot-animation`; shaders `godot-shaders`; data `godot-resources`; audio `godot-audio`;
- netcode `godot-multiplayer`; ship `godot-export`.
+ netcode `godot-multiplayer`; headless CLI tests `godot-gdscript-headless-testing`; ship
+ `godot-export`.
- **Unity** (`skills/unity/`): scripting `unity-csharp-scripting`; input `unity-input-system`;
physics `unity-physics`; animation `unity-animation`; data `unity-scriptableobjects`; 2D
`unity-tilemap-2d`; AI nav `unity-navmesh`; ship `unity-build-pipeline`.
diff --git a/router/references/routing-table.md b/router/references/routing-table.md
index 2d3ba22..b0ac07b 100644
--- a/router/references/routing-table.md
+++ b/router/references/routing-table.md
@@ -26,6 +26,7 @@ a real folder at `skills/<category>/<name>/SKILL.md`. Trigger words (`says:`) an
| `godot-multiplayer` | "multiplayer", "RPC", "networked", `MultiplayerSpawner`; `@rpc` |
| `godot-export` | "export Godot", "build for web/windows", `export_presets.cfg` |
| `godot-csharp` | "Godot C#", "GodotSharp", "C# signals in Godot"; `*.cs` + `*.csproj` in a Godot project |
+| `godot-gdscript-headless-testing` | "headless test", "run tests from CLI", `godot --headless --script`, CI job for `.gd` tests |
### Unity (`skills/unity/`, target Unity 6.3 LTS / 6000.3)
diff --git a/skills/godot/godot-gdscript-headless-testing/SKILL.md b/skills/godot/godot-gdscript-headless-testing/SKILL.md
new file mode 100644
index 0000000..d3ca421
--- /dev/null
+++ b/skills/godot/godot-gdscript-headless-testing/SKILL.md
@@ -0,0 +1,136 @@
+---
+name: godot-gdscript-headless-testing
+description: >
+ Run GDScript test suites from the command line with `godot --headless`, using a
+ SceneTree/MainLoop runner script that exits non-zero on failure so CI can gate
+ merges. Use when a Godot project needs unit tests without opening the editor,
+ when wiring a CI job (GitHub Actions or similar) that must fail the build on a
+ failing `.gd` test, or when a `godot --headless` invocation hangs, opens a
+ window, or exits 0 despite failed assertions.
+---
+
+# Godot GDScript headless testing (4.x)
+
+Run GDScript tests from the command line, without the editor GUI, and get a real
+process exit code CI can act on. Targets **Godot 4.7** headless CLI.
+
+## When to use
+
+- Use when a Godot project has no testing addon installed and needs a fast way to
+ verify GDScript logic (pure functions, resource loading, autoload state) from a
+ terminal or CI pipeline.
+- Use when wiring a CI job that must fail the build when a `.gd` test fails.
+- Use when debugging why a `godot --headless` invocation hangs, opens a window, or
+ exits 0 despite failing assertions.
+
+**When *not* to use:** GDScript syntax or language features themselves →
+`godot-gdscript`; export/build pipeline and platform templates → `godot-export`
+(its own `--headless` use case, producing a binary, not running tests).
+
+## Workflow
+
+1. **Confirm the binary resolves headless.** Godot 4.x ships `--headless` built in
+ (no export template needed); run `godot --headless --version` and confirm it
+ prints a version string, not a GUI window.
+2. **Write the runner as a `SceneTree` script, not a `Node` scene.** A `SceneTree`
+ script's `_initialize()` runs once before any frame — enough for pure-logic
+ tests and no `.tscn` required to launch.
+3. **Track pass/fail counts yourself and call `quit(<code>)` explicitly.** Godot
+ does not turn the process exit code non-zero on `push_error()` or a failed
+ `assert()` by itself — the runner must count failures and call `quit(1)`.
+4. **Invoke with `godot --headless --path <project_dir> --script res://<runner>.gd`**
+ and read the **process exit code**, not just stdout, from the shell or CI step.
+5. **Redirect stdout and stderr to files when scripting the invocation from a
+ wrapper shell** (PowerShell, some CI runners). `push_error()` output goes to
+ stderr and can be dropped or reordered when only stdout is captured live.
+
+## Patterns
+
+### 1. Minimal SceneTree test runner with a real exit code
+
+```gdscript
+# res://test_runner.gd — run with:
+# godot --headless --path . --script res://test_runner.gd
+extends SceneTree
+
+var passed := 0
+var failed := 0
+
+func _initialize() -> void:
+ test_add()
+ print("Results: %d passed, %d failed" % [passed, failed])
+ quit(1 if failed > 0 else 0) # non-zero exit fails the CI step
+
+func assert_eq(actual, expected, label: String) -> void:
+ if actual == expected:
+ passed += 1
+ else:
+ failed += 1
+ push_error("FAIL %s: expected %s, got %s" % [label, expected, actual])
+
+func test_add() -> void:
+ assert_eq(2 + 2, 4, "test_add")
+```
+
+Verified against Godot 4.7.2: `godot --headless --path . --script
+res://test_runner.gd` prints `Results: N passed, M failed` to stdout, routes
+`push_error` lines to stderr, and returns process exit code `0` when
+`failed == 0`, `1` otherwise.
+
+### 2. Testing something that needs a frame, a timer, or a signal
+
+```gdscript
+extends SceneTree
+
+func _initialize() -> void:
+ await run_tests()
+ quit(0)
+
+func run_tests() -> void:
+ var timer_node := Timer.new()
+ root.add_child(timer_node)
+ timer_node.start(0.1)
+ await timer_node.timeout
+ # assertions here can rely on the node having been in the tree for a frame
+ timer_node.queue_free()
+```
+
+`_initialize()` may `await`, which is what makes this pattern work for anything
+that needs a node to actually enter the tree, a timer to fire, or a signal to
+emit — none of which happen before the engine has processed at least one frame.
+
+### 3. CI step (GitHub Actions) that gates on the exit code
+
+```yaml
+- name: Run GDScript tests
+ run: godot --headless --path . --script res://test_runner.gd
+```
+
+No extra flag is needed — the runner already fails the job on a non-zero exit
+code from `run:`; the discipline lives entirely in the runner script's `quit()`
+call, not in the CI configuration.
+
+## Pitfalls
+
+- **Exit code stays 0 despite failed assertions** → the runner never called
+ `quit(1)`. Track failures yourself and call `quit()` explicitly; do not rely on
+ `assert()` or `push_error()` alone to change the process exit code.
+- **Script "does nothing" or opens the editor window** → missing `--headless`, or
+ the script path is wrong. `--script` takes a `res://`-relative path resolved
+ against `--path <project_dir>`, not an absolute filesystem path.
+- **`_initialize()` runs before nodes, timers, or signals exist** → logic that
+ needs a frame to have processed must `await` a signal or a timer before
+ asserting; see Pattern #2.
+- **Output looks empty or out of order from a wrapper shell** → some shells
+ (PowerShell in particular) can reorder or drop a native process's live
+ stdout/stderr. Redirect both streams to files and read the files after the
+ process exits, instead of trusting the live console.
+- **Runner never terminates** → a `SceneTree` script keeps running until
+ something calls `quit()`. A test that `await`s a signal that never fires hangs
+ the job forever — always back an `await` with a timeout node as a fallback.
+
+## Related skills
+
+- `godot-gdscript` — the language syntax and node lifecycle this pattern's
+ runner script itself uses.
+- `godot-export` — headless CLI export/build, a different `--headless` use case.