無料GitHub で公開
gdx-game-dev
Build, modify, run, test, screenshot, record, and export Godot 4.x games with the gdx CLI. Use when Codex needs to create a new Godot game project, attach to an existing Godot project, generate GDScript, build scenes/resources from JSON specs, edit a running scene through the gdx daemon, capture screenshots, record animation clips, send input, inspect game state, run Godot tests, or produce exports through gdx.
含まれるファイル(11)
- SKILL.md8.1 KB
- agents/openai.yaml182 B
- assets/scene-specs/hello-2d.json724 B
- assets/scripts/smoke_test.gd142 B
- references/gdx-cli.md3.5 KB
- references/scene-spec.md2.4 KB
- references/troubleshooting.md2.7 KB
- references/workflows.md5.9 KB
- scripts/new-game-smoke.ps11.8 KB
- scripts/resolve-gdx.ps1981 B
- scripts/smoke-test.ps1541 B
SKILL.md(原文)
インストールする前に、エージェントに与えられる指示の中身を確認できます。
gdx Game Development
Use gdx as the Godot automation layer. Codex remains responsible for game design, project architecture, GDScript, scene/resource specs, test logic, and interpreting failures. gdx applies those decisions to a real Godot 4.x project through JSON-emitting commands.
Start Here
- Locate
gdxand Godot:- Prefer
gdxonPATH. - If working inside the
gdxrepo andgdxis not onPATH, runcargo build --workspace, then usetarget/debug/gdx.exeon Windows ortarget/debug/gdxelsewhere. - Run
gdx doctor. If Godot is not discoverable, pass--godot <path>or setGDX_GODOT. For mixed environments, configure standard and .NET builds separately withGDX_GODOT_STANDARD/GDX_GODOT_DOTNET; gdx selects by project type.
- Prefer
- Identify the project:
- New game:
gdx project create --path <project> --name <Name>. - Existing game:
gdx --project <project> project update, thengdx --project <project> project inspect. - After rebuilding or upgrading
gdx, first rungdx --project <project> project update --check, then refresh withgdx --project <project> project updateand restart any running daemon. - Use
--project <dir>on every command that operates on an existing project.
- New game:
- Implement in normal project files:
- Write GDScript under
res://scripts/.... - Create or copy assets under
res://assets/.... - Build scenes with
scene create,scene build, or daemonnodecommands.
- Write GDScript under
- Verify in a loop:
- Run
gdx --project <project> asset importwhen the project workflow knows importable assets changed. Daemon startup intentionally does not infer this. gdx --project <project> script check-all(bounded parallelism defaults to at most four jobs; use--jobs 1or--jobs 2when diagnosing contention).gdx --project <project> test run --path res://tests/smoke_test.gd --method run_testsgdx --project <project> verify --spec <project>\verify.json- For ad hoc runtime checks, use
daemon start --restart,call invoke,state get, andcapture daemon. - For animation review, use
capture record --out <project>\artifacts\recording.avi --duration 3 --fps 60to launch the scene with Godot Movie Writer and write an AVI clip. Add--input-sequence <json>when gesture motion needs to be replayed in that fresh scene. - Stop long-running sessions with
gdx --project <project> daemon stop.
- Run
Required Practices
- Treat every final command response as JSON. Stdout contains one success object. In non-TTY use, stderr is line-delimited progress NDJSON and its final line is the failure object. Parse progress incrementally; do not wait silently when
heartbeatevents are available. - Use ordinary shell pipelines and redirection when output must be retained, for example
gdx ... 1>result.json 2>progress.ndjson. gdx does not persist command results or one-shot logs in the project. - Use
--progress ndjsonfor machine-driven long operations. Godot child events provide the child PID, subject, and timeout. - Use Godot class names exactly, such as
Node2D,Control,Label,Sprite2D,CharacterBody2D,Node3D,MeshInstance3D, andCamera3D. - Use
res://paths for Godot project resources and ordinary filesystem paths only for external files, specs, and screenshots. - Prefer
scene build --spec <json>for larger scene construction and daemonnode create/node setfor incremental edits to a running scene. - Add an explicit game-state method such as
gdx_state()on important nodes when runtime verification needs structured state.state get --target /defaults togdx_state()when no method or property is supplied, and the result reports whether it read a method or property. - Return only finite, JSON-compatible numbers from project methods.
daemon_non_finite_responseidentifies INF, -INF, and NaN values through RFC 6901 paths indetails.non_finite_values; fix those project values instead of coercing the RPC response. - Run Godot-executing
gdxcommands with filesystem/process access sufficient for.godot/imported/,user://, requested artifact paths, render windows, and child processes. If the current Codex permission profile or Windows Application Control blocks the compiled binary, report the exact blocker and run the runtime gate from Codex Full access mode or an external terminal;cargo checkis not a substitute for that gate. - Prefer project-level automation methods such as
gdx_start_run()withcall invokefor game UI regressions. Useinput click-nodeorinput activatefor generic controls; useinput tap,input drag,input pinch, orinput sequencefor mobile gameplay that handles touch events. Touch commands require a daemon runtime withtouch_sequence; if they reportdaemon_runtime_outdated, runproject update --check, thenproject update, then restart the daemon. Do not reinterpret touch gestures as mouse events. Avoid coordinate clicks unless the coordinate itself is under test. - Avoid
:=for values derived fromDictionaryorVariantunless the type is explicit; Godot can treat those inference warnings as runtime parse errors. - Keep daemon sessions short. Start them for interactive edits, input, state reads, and screenshots; stop them when finished.
- The daemon snapshots active
.gdcontents at startup. Ifdaemon statusreportsscript_sync.status: "stale"or an RPC returnsdaemon_scripts_stale, rundaemon start --restartand recreate the runtime state needed for validation or capture. Do not expect silent hot reload or automatic restart. - Require
daemon starthealth to reportrpc_ready,scene_loaded, andproject_healthy: truebefore interactive work. Inspecthealth.first_erroronproject_unhealthy; use--no-health-checkonly for deliberate diagnostics. - For GDScript-only projects, missing .NET SDK output from a Mono Godot build is omitted from ordinary runtime diagnostics and remains available as a non-blocking
doctorsuggestion. Treat it as blocking for C# or mixed projects. - Keep command persistence in the caller when needed. Redirect stdout/stderr or store selected artifacts explicitly; do not expect gdx run history.
- Treat screenshots and recordings as evidence. The game project owns visual baselines, comparison metrics, thresholds, masks, and product acceptance rules; do not add those business decisions to gdx.
- Decide in the project workflow when changed source assets require
asset import. gdx executes the explicit import command but does not scan for project-specific pending imports during daemon startup. - Do not edit
.tscnby hand unless the user explicitly asks and the project already follows that pattern. - Do not add source-project-specific migration logic to
gdxitself. Fix the game project, scripts, specs, or assets.
References
- Read
references/gdx-cli.mdfor compact command syntax and error handling. - Read
references/scene-spec.mdbefore writing ascene buildJSON spec. - Read
references/workflows.mdfor end-to-end new project, existing project, daemon, screenshot, test, and export workflows. - Read
references/troubleshooting.mdwhen Godot, daemon, import, script, screenshot, or export commands fail. - For full open-source documentation, read
../../docs/en/agent-usage.mdor../../docs/zh-CN/agent-usage.md.
Useful Bundled Files
- Copy or adapt
assets/scene-specs/hello-2d.jsonfor a minimal 2D scene build spec. - Copy or adapt
assets/scripts/smoke_test.gdforgdx test run. - Use
scripts/resolve-gdx.ps1to locate a usablegdxexecutable from PowerShell. - Use
scripts/smoke-test.ps1for a quick local tool check. - Use
scripts/new-game-smoke.ps1for a temporary end-to-end project smoke test when Godot is available.
レビュー
まだレビューはありません。使ってみた感想をお寄せください。