[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75D6S1XQZPJMVVVZFT6Q4WK":3,"skill-same:01M75D6S1XQZPJMVVVZFT6Q4WK":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M75D6S1XQZPJMVVVZFT6Q4WK","gda",null,"Use the gda CLI to build, inspect, validate, and export Godot projects without opening the editor, or to inspect and control a running game through gda-daemon. Use when an agent builds or modifies a Godot game, or the user asks for gda or Godot automation.","aigengame\u002Fgodot-agent","aigengame","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F283304695?v=4","01M75D6AD70Y2TJ49Y2D77BMX1","AIGen Game","01M75D6ADXKJ2W873KH52GQ2Y0",58,"MIT","https:\u002F\u002Fgithub.com\u002Faigengame\u002Fgodot-agent\u002Fblob\u002Fmain\u002Fskills\u002Fgda\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: gda\ndescription: Use the gda CLI to build, inspect, validate, and export Godot projects without opening the editor, or to inspect and control a running game through gda-daemon. Use when an agent builds or modifies a Godot game, or the user asks for gda or Godot automation.\n---\n\n# gda\n\n`gda` is an agent-facing CLI for Godot. Use headless operations to create and\ninspect scenes, nodes, scripts, resources, shaders, themes, and project settings;\nvalidate or run scripts and scenes; and export artifacts. Use live operations to\ninspect a running game, inject input, capture the viewport, and read diagnostics\nor performance data. Live operations use `gda-daemon`. Both kinds support Godot\n4.6+ on macOS, Linux and Windows; check a command's `--schema` constraints for its\nsupported platforms.\n\n## Configure and discover\n\n- Set `GDA_GODOT` to the Godot executable, or pass `--godot PATH` after the\n  command. If a command reports `binary_not_found`, find the Godot executable or\n  ask the user for its path, then use it as above.\n  On Windows, use Godot's `*_console.exe`.\n- Pass `--project DIR`, set `GDA_PROJECT`, or run inside the project directory.\n  The project must contain `project.godot`. Use an explicit project when a\n  script or asset depends on `res:\u002F\u002F` or project autoloads.\n- Keep the same engine and project for the related calls of one workflow.\n- Use `gda --version --json` to identify the installed CLI and its source in a\n  long session. Use `gda info --json` to check the Godot engine.\n- Use `gda --help` for command groups, `gda \u003Cgroup> --help` for a group's\n  commands, and `gda \u003Cgroup> \u003Ccommand> --help` for usage. Use\n  `gda \u003Cgroup> \u003Ccommand> --schema` for that command's arguments, JSON result,\n  and errors. `gda schema` describes the full installed surface. Consult\n  these sources for exact options and fields instead of assuming this skill is a\n  command catalog.\n\nThe CLI reads stdin and writes stdout and stderr as UTF-8 on every platform,\nincluding Windows. Encode JSON stdin and decode captured CLI output as UTF-8.\n\nPass `--json` on operations, for example\n`gda scene validate res:\u002F\u002Fmain.tscn --project game --json`. Read the one JSON\nobject on stdout; engine output goes to stderr. On failure, branch on the\nstructured `error.code` and inspect any `evidence`; do not parse\n`error.message`. An exit code of zero does not always mean the requested check\npassed:\n\n| Operation | Check in the successful result |\n| --- | --- |\n| `scene validate`, `script validate` | `valid`; `false` is not a pass. |\n| `scene preflight` | `status` and `started`; static validation does not boot the target scene. |\n| `script run`, `export smoke` | Child `exit_status` and diagnostics; use `--strict` when non-zero status or a recognized shutdown leak must fail the command. |\n| `game set` | `verified`; `false` means the observed read-back differs. Follow up with `game get` or a domain-specific observation when the side effect matters. |\n\nFor precision-sensitive values, inspect the result or read-back. Godot can\nchange a decimal value while parsing it; `gda` refuses values that the parser\nwould destroy. Consult the relevant command schema for accepted value forms\nand limits.\n\n## Headless workflow\n\nWith no project yet, run `gda project create DIR --name NAME --json` first.\nDIR must be a new directory in an existing parent, or an empty directory;\ndot-prefixed entries such as `.git` do not count. The new `project.godot` sets\nonly the name, so set the main scene and other settings with `project set`.\nThen use DIR as the project.\n\nRun `gda project scan --json` on a fresh checkout or a project the editor\nnever opened, and after you add, rename or delete a `class_name` script: the\nengine finds a project `class_name` only through the index a scan writes, and\ngda does not check whether that index is current.\n\n1. Create or edit a scene with `scene`, `node`, `script`, and `resource`\n   commands. Use `script attach` to bind a script to a node; generic\n   `node set --property script` is refused. Create assets used by\n   `preload(\"res:\u002F\u002F...\")` before you attach the script. Supply a `res:\u002F\u002F`\n   Resource path when assigning a Resource-typed property.\n2. Run `scene validate` and `script validate` for the changed files. Check\n   their `valid` verdicts. `scene validate` checks dependencies and scripts,\n   but does not prove that the target scene starts.\n3. Run `scene preflight` to boot the target scene for a bounded interval.\n   Check its startup verdict and diagnostics. Use `script run` for a\n   project test script; inspect the child status even when `gda` succeeds.\n4. Use `export list` to select a preset. Optionally inspect it with\n   `export get`, then run `export run`. If needed, use `export smoke` on the\n   built artifact. A smoke run proves only what that bounded process\n   observed; it does not prove that the game completed its intended task.\n\nWhen `scene create` uses a `Control-derived` root from `--root-type`, it writes\nzero anchors and zero offsets. A root with no intrinsic minimum size renders as\na zero-size rect; a root with an intrinsic minimum size renders at that minimum\ninstead, not at viewport size. Set `anchor_right` and `anchor_bottom` to `1`\nwith `node set`, then confirm the layout with `game rect` in an Engine session.\nFor a `Control` inside a `Container`, change minimum size, size flags, or\nthe container layout instead of offsets. A root from `--inherits` keeps the\nbase's anchors and offsets.\n\nFor a variant of a base scene, use `scene create PATH --inherits BASE`, not\n`node add --instance`: the new scene's root is the base's root. In the variant,\noverride inherited nodes with `node set` and add its own nodes; edit or remove\ninherited nodes in the base. `scene get` and `node list` show the variant's\ncomposed tree and mark inherited nodes with `inherited_from`; an inherited\ninstance whose scene is missing carries no mark.\n\n`export run` checks the export templates itself before it exports, and\nrefuses with `export_templates_missing` when they are not available.\n`--mode pack` needs no templates. `export get` is optional inspection. Give\nit the same engine, project, preset, and data root (`--user-data-root`) as\n`export run`:\n\n- `templates_installed: false` means that the `templates_version` directory\n  is missing under `templates_root`. Then a non-null `templates_root_host`\n  means that the host has these templates but the data root hides them; a\n  null value means that they are not installed.\n- `templates_installed: true` means only that the version directory exists.\n  It does not prove that the preset's platform can export.\n\nTo recover, put matching templates, including the files for the preset's\nplatform, under `templates_root`. With a data root, you can instead select\nanother data root, or run without one where the environment permits.\nTemplate readiness does not prove that an export succeeds or that the\nExport artifact runs.\n\n### Data root in restricted environments\n\nA headless run sends the engine log to a private temporary file. Godot can\nstill write to its data directory during engine initialization, including\nfor a validation. If that directory is not writable, select a writable data\nroot. The global option comes before the command group:\n\n```bash\ngda --user-data-root \u002Fwritable\u002Fgda-data scene validate res:\u002F\u002Fmain.tscn --project game --json\n```\n\nThe data root moves the engine data directory (`user:\u002F\u002F` and the export\ntemplates) and the engine log. The editor configuration and cache locations\ndepend on the platform and can stay in place; on Linux they do not move.\n`project scan`, and `resource import` when it starts an engine, move the\nplatform's configuration and cache locations under the data root too; without\na data root, they use a private directory.\nJudge the impact from the operation verdict and the engine diagnostics. A\ndirectory warning does not by itself make a successful operation invalid.\n`script run` reports `engine_data_path` and `log_file`; inspect them before\nyou treat a failed `user:\u002F\u002F` save as a game defect.\n\n- Use one data root for the engine-launching headless operations of one\n  restricted workflow.\n- Use a separate data root for each invocation that runs at the same time.\n  Each launch truncates the one engine log under a data root.\n- Do not set the data root (`GDA_USER_DATA_ROOT`) for unrelated commands.\n- Do not give `export smoke` a data root unless it refuses with\n  `user_data_unwritable`. Without one, each smoke run creates a private data\n  root, so no `user:\u002F\u002F` state carries from one smoke run to the next.\n- `--user-data-root` does not reconfigure an Engine session that the daemon\n  manages.\n- A successful validation under a data root does not prove that the export\n  templates are available there.\n\n### Advanced Godot usages\n\n**Scene inheritance.** One base scene holds the tree and its scripts. A\nvariant made with `scene create PATH --inherits BASE` keeps that tree and\nstores only what it changes: overrides on the base's nodes, and nodes of its\nown. Keep the logic in the base and specialize the visuals and values in each\nvariant. The commands and the rules are in the variant paragraph above.\n\n**Resource-based components.** A `class_name` script that `extends Resource`\nholds a behavior's data and logic, decoupled from the scene tree: the behavior\nlives in a file that any node can hold and call, not in a node at a path, so\nthe agent defines and tunes it without a scene edit, and swaps it without\nchanging the node tree. `project scan` registers the class, `resource create`\nwrites the `.tres`, and `node set --value res:\u002F\u002F….tres` links it to a node\nexport typed with that class.\n\nA shared component is the default: the `.tres` stays linked in every scene\nfile, and an edit of the `.tres` reaches all of them. For a per-instance\ncopy, choose one of two options:\n\n- **Local to scene** (`resource set --property resource_local_to_scene\n  --value true`): the engine gives each scene instance its own copy when it\n  instantiates the scene, before any `_ready`; the nodes of one instance\n  share that copy, and a nested resource that is local to scene is copied\n  too. On that copy `get_local_scene()` returns the scene root and the\n  engine calls `_setup_local_to_scene`; a `duplicate()` copy gets neither.\n  The risk: when the node that holds the component is one an inherited scene\n  takes from its base, or the root of an instanced child, a re-save of that\n  scene by any gda write or by the editor stores the copy in its file as an\n  embedded `sub_resource`. The link to the `.tres` is lost in that file, a\n  later edit of the `.tres` does not reach it, and nothing reports it.\n- **`duplicate()` in the owner's script**, for example in `_ready`: the\n  `.tres` stays linked in every scene file, and the script makes the copy at\n  runtime. The script then owns what the engine owned: a child's `_ready`\n  runs before its parent's and sees the shared `.tres`; two nodes of one\n  instance that duplicate separately do not share. `duplicate(true)` copies\n  an embedded sub-resource but keeps a nested `.tres` shared, and\n  `duplicate_deep(Resource.DEEP_DUPLICATE_ALL)` copies the nested `.tres` too.\n\nRule of thumb: use `duplicate()` for a component on a node that the re-save\nabove can reach, and local to scene for a resource the engine must set up\nper scene. The copy semantics above are the engine's, not a gda guarantee.\n\n## Live workflow\n\nA live run needs a main scene. Set `application\u002Frun\u002Fmain_scene` or pass a\nvalid `--scene res:\u002F\u002F...` to `daemon start`. An explicit `res:\u002F\u002F` scene\nalso bypasses an unresolved `uid:\u002F\u002F` main scene.\n\n1. Start the daemon with `gda daemon start --project game --json`. This can\n   install the gda harness and update `project.godot`; inspect the change.\n   The Engine session starts when a live operation needs it.\n2. Run `gda daemon wait-ready --project game --json` before read-only\n   diagnostics. Inspect `clean_start` and `startup_diagnostics`. A serving\n   session can still have a scene script that failed to compile. A null\n   `clean_start` means the startup log was unavailable, not that it was clean.\n3. Discover runtime node paths with a bounded `game tree --max-depth N` or\n   `game find` query. Narrow with `--root`; a truncated result or a bounded\n   empty search does not prove absence. Then use `game get`, `game rect`,\n   or other live commands on the exact path.\n4. Use `input` for interaction, `diag errors` and `logger tail` for\n   diagnostics, and `perf` for measurements. Start the daemon with\n   `--windowed` for rendered UI checks or `screen capture`; these need a\n   display (Xvfb on a headless host), or an accessible interactive desktop\n   on Windows.\n5. Stop with `gda daemon stop`. This stops the daemon and its Engine\n   session, but the gda harness stays installed. To remove the gda harness\n   installation, run `gda daemon uninstall` after `daemon stop`. A\n   disposable project copy is an optional way to keep the harness out of\n   the source project. You do not need to uninstall before `gda export run`:\n   it removes the harness for the export and restores the project's prior\n   harness state. Other export routes do not remove it.\n\nFor a windowed launch, `live_windowed_unavailable` means skip rendered\nchecks in this environment. `live_windowed_permission_denied` means retry\noutside the restriction before deciding whether the host can render.\n\nAfter updating gda, stop and start the daemon before using live commands.\nRepeating `daemon start` updates the installed harness but does not reload\nthe code in the running game.\n\nA `live_timeout` discards the Engine session. The next live operation starts\na new game, so do not assume that earlier runtime changes still exist.\n\nInput has two injection routes, reported as `injection_route`. The default\n`input action` uses `action_state` to change the polled action state; it\ndoes not send an event to `_input`, `_unhandled_input`, or `_gui_input`.\nA key or mouse command uses `viewport_event` to send an event through the\nviewport. Use `input action --as-event` only when an event handler must\nreceive that action rather than the mapped key:\n\n| Injection | `Input.is_action_pressed` | `_input` \u002F `_unhandled_input` | `_gui_input` |\n| --- | --- | --- | --- |\n| `input action` | yes | no | no |\n| `input action --as-event` | no | yes | yes (focused Control) |\n| `input key` of the mapped key | no | yes | yes (focused Control) |\n\nThe table describes eligible delivery under normal propagation and\nconsumption rules, not proof that a handler ran. For UI activation, use\n`input mouse-click` or `input tap` to send a complete press\u002Frelease\ngesture. A default `BaseButton` activates on the release; `action_mode` or\nsubclasses such as `MenuButton`\u002F`OptionButton` can activate on press.\n\nIn a windowed session, a loss of OS focus after `input action` releases the\nheld state: the engine releases every pressed input, an injected action\nstate included, when another application or a second windowed session\ntakes the focus, and regaining the focus does not restore it. Press again\nafter such a loss.\n\nTo verify an interaction:\n\n1. Find out whether the game polls input state or handles input events.\n   Select the route from the table.\n2. Find the runtime target with a bounded `game tree` or `game find` query.\n3. For key or action-event button activation, the intended Control must hold\n   focus. gda has no focus command; the game gives the Control focus, for\n   example with `grab_focus()` in its script. Then inject the matching input.\n4. Read the expected game state, for example with `game get`. This read is\n   the proof. For visible UI effects, also inspect a `screen capture` of the\n   resulting state. An injected gesture alone does not prove that the intended\n   handler or gameplay action ran.\n\n`game rect` reports coordinates relative to the Control's canvas. A\ntransformed `CanvasLayer` or an active `Camera2D` can make them differ from\nclick coordinates. Do not take click coordinates from the pixels of a\nviewport capture.\n\n`script run` runs your script as written. It does not add coordinate\nconversion, gesture completion, or event timing to the script's own\n`push_input()` calls. Your tests must establish those details and the\nactual UI layout. Input that a script sends is separate from input that\ngda injects with `input` commands into an Engine session. See Godot's\n[InputEvent guide](https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002F4.6\u002Ftutorials\u002Finputs\u002Finputevent.html).\n\nA `screen capture` is evidence only when it shows the intended state:\n\n- Use the `--await-*` predicate to capture when the relevant state holds.\n  The predicate must represent the visible state. Text kept on a hidden\n  `Label` is not sufficient.\n- Use `--await-events` to trigger a short-lived state and capture it in one\n  operation.\n- Use `--settle-frames` when the game draws the state later. A settle moves\n  the capture later than the predicate's first match. The earlier state can\n  be gone by then.\n- Inspect the image. When timing matters, also inspect the returned frame\n  counters and predicate evidence.\n- Do not assume that one settle count works for every state. Process\n  frames are not a fixed wall-clock duration.\n\nIf the game needs structured records in `logger tail`, resolve the harness\nby node path and check that the daemon launched the session. Do not refer to\nthe `GdaHarness` global in game code: a project or export without the harness\ncannot parse that name.\n\n```gdscript\nvar harness := get_node_or_null(\"\u002Froot\u002FGdaHarness\")\nif harness != null and harness.is_daemon_launched():\n    harness.gda_log(\"info\", \"player spawned\", {\"hp\": 100})\nelse:\n    print(\"player spawned\")\n```\n","# gda\n\n`gda` is an agent-facing CLI for Godot. Use headless operations to create and\ninspect scenes, nodes, scripts, resources, shaders, themes, and project settings;\nvalidate or run scripts and scenes; and export artifacts. Use live operations to\ninspect a running game, inject input, capture the viewport, and read diagnostics\nor performance data. Live operations use `gda-daemon`. Both kinds support Godot\n4.6+ on macOS, Linux and Windows; check a command's `--schema` constraints for its\nsupported platforms.\n\n## Configure and discover\n\n- Set `GDA_GODOT` to the Godot executable, or pass `--godot PATH` after the\n  command. If a command reports `binary_not_found`, find the Godot executable or\n  ask the user for its path, then use it as above.\n  On Windows, use Godot's `*_console.exe`.\n- Pass `--project DIR`, set `GDA_PROJECT`, or run inside the project directory.\n  The project must contain `project.godot`. Use an explicit project when a\n  script or asset depends on `res:\u002F\u002F` or project autoloads.\n- Keep the same engine and project for the related calls of one workflow.\n- Use `gda --version --json` to identify the installed CLI and its source in a\n  long session. Use `gda info --json` to check the Godot engine.\n- Use `gda --help` for command groups, `gda \u003Cgroup> --help` for a group's\n  commands, and `gda \u003Cgroup> \u003Ccommand> --help` for usage. Use\n  `gda \u003Cgroup> \u003Ccommand> --schema` for that command's arguments, JSON result,\n  and errors. `gda schema` describes the full installed surface. Consult\n  these sources for exact options and fields instead of assuming this skill is a\n  command catalog.\n\nThe CLI reads stdin and writes stdout and stderr as UTF-8 on every platform,\nincluding Windows. Encode JSON stdin and decode captured CLI output as UTF-8.\n\nPass `--json` on operations, for example\n`gda scene validate res:\u002F\u002Fmain.tscn --project game --json`. Read the one JSON\nobject on stdout; engine output goes to stderr. On failure, branch on the\nstructured `error.code` and inspect any `evidence`; do not parse\n`error.message`. An exit code of zero does not always mean the requested check\npassed:\n\n| Operation | Check in the successful result |\n| --- | --- |\n| `scene validate`, `script validate` | `valid`; `false` is not a pass. |\n| `scene preflight` | `status` and `started`; static validation does not boot the target scene. |\n| `script run`, `export smoke` | Child `exit_status` and diagnostics; use `--strict` when non-zero status or a recognized shutdown leak must fail the command. |\n| `game set` | `verified`; `false` means the observed read-back differs. Follow up with `game get` or a domain-specific observation when the side effect matters. |\n\nFor precision-sensitive values, inspect the result or read-back. Godot can\nchange a decimal value while parsing it; `gda` refuses values that the parser\nwould destroy. Consult the relevant command schema for accepted value forms\nand limits.\n\n## Headless workflow\n\nWith no project yet, run `gda project create DIR --name NAME --json` first.\nDIR must be a new directory in an existing parent, or an empty directory;\ndot-prefixed entries such as `.git` do not count. The new `project.godot` sets\nonly the name, so set the main scene and other settings with `project set`.\nThen use DIR as the project.\n\nRun `gda project scan --json` on a fresh checkout or a project the editor\nnever opened, and after you add, rename or delete a `class_name` script: the\nengine finds a project `class_name` only through the index a scan writes, and\ngda does not check whether that index is current.\n\n1. Create or edit a scene with `scene`, `node`, `script`, and `resource`\n   commands. Use `script attach` to bind a script to a node; generic\n   `node set --property script` is refused. Create assets used by\n   `preload(\"res:\u002F\u002F...\")` before you attach the script. Supply a `res:\u002F\u002F`\n   Resource path when assigning a Resource-typed property.\n2. Run `scene validate` and `script validate` for the changed files. Check\n   their `valid` verdicts. `scene validate` checks dependencies and scripts,\n   but does not prove that the target scene starts.\n3. Run `scene preflight` to boot the target scene for a bounded interval.\n   Check its startup verdict and diagnostics. Use `script run` for a\n   project test script; inspect the child status even when `gda` succeeds.\n4. Use `export list` to select a preset. Optionally inspect it with\n   `export get`, then run `export run`. If needed, use `export smoke` on the\n   built artifact. A smoke run proves only what that bounded process\n   observed; it does not prove that the game completed its intended task.\n\nWhen `scene create` uses a `Control-derived` root from `--root-type`, it writes\nzero anchors and zero offsets. A root with no intrinsic minimum size renders as\na zero-size rect; a root with an intrinsic minimum size renders at that minimum\ninstead, not at viewport size. Set `anchor_right` and `anchor_bottom` to `1`\nwith `node set`, then confirm the layout with `game rect` in an Engine session.\nFor a `Control` inside a `Container`, change minimum size, size flags, or\nthe container layout instead of offsets. A root from `--inherits` keeps the\nbase's anchors and offsets.\n\nFor a variant of a base scene, use `scene create PATH --inherits BASE`, not\n`node add --instance`: the new scene's root is the base's root. In the variant,\noverride inherited nodes with `node set` and add its own nodes; edit or remove\ninherited nodes in the base. `scene get` and `node list` show the variant's\ncomposed tree and mark inherited nodes with `inherited_from`; an inherited\ninstance whose scene is missing carries no mark.\n\n`export run` checks the export templates itself before it exports, and\nrefuses with `export_templates_missing` when they are not available.\n`--mode pack` needs no templates. `export get` is optional inspection. Give\nit the same engine, project, preset, and data root (`--user-data-root`) as\n`export run`:\n\n- `templates_installed: false` means that the `templates_version` directory\n  is missing under `templates_root`. Then a non-null `templates_root_host`\n  means that the host has these templates but the data root hides them; a\n  null value means that they are not installed.\n- `templates_installed: true` means only that the version directory exists.\n  It does not prove that the preset's platform can export.\n\nTo recover, put matching templates, including the files for the preset's\nplatform, under `templates_root`. With a data root, you can instead select\nanother data root, or run without one where the environment permits.\nTemplate readiness does not prove that an export succeeds or that the\nExport artifact runs.\n\n### Data root in restricted environments\n\nA headless run sends the engine log to a private temporary file. Godot can\nstill write to its data directory during engine initialization, including\nfor a validation. If that directory is not writable, select a writable data\nroot. The global option comes before the command group:\n\n```bash\ngda --user-data-root \u002Fwritable\u002Fgda-data scene validate res:\u002F\u002Fmain.tscn --project game --json\n```\n\nThe data root moves the engine data directory (`user:\u002F\u002F` and the export\ntemplates) and the engine log. The editor configuration and cache locations\ndepend on the platform and can stay in place; on Linux they do not move.\n`project scan`, and `resource import` when it starts an engine, move the\nplatform's configuration and cache locations under the data root too; without\na data root, they use a private directory.\nJudge the impact from the operation verdict and the engine diagnostics. A\ndirectory warning does not by itself make a successful operation invalid.\n`script run` reports `engine_data_path` and `log_file`; inspect them before\nyou treat a failed `user:\u002F\u002F` save as a game defect.\n\n- Use one data root for the engine-launching headless operations of one\n  restricted workflow.\n- Use a separate data root for each invocation that runs at the same time.\n  Each launch truncates the one engine log under a data root.\n- Do not set the data root (`GDA_USER_DATA_ROOT`) for unrelated commands.\n- Do not give `export smoke` a data root unless it refuses with\n  `user_data_unwritable`. Without one, each smoke run creates a private data\n  root, so no `user:\u002F\u002F` state carries from one smoke run to the next.\n- `--user-data-root` does not reconfigure an Engine session that the daemon\n  manages.\n- A successful validation under a data root does not prove that the export\n  templates are available there.\n\n### Advanced Godot usages\n\n**Scene inheritance.** One base scene holds the tree and its scripts. A\nvariant made with `scene create PATH --inherits BASE` keeps that tree and\nstores only what it changes: overrides on the base's nodes, and nodes of its\nown. Keep the logic in the base and specialize the visuals and values in each\nvariant. The commands and the rules are in the variant paragraph above.\n\n**Resource-based components.** A `class_name` script that `extends Resource`\nholds a behavior's data and logic, decoupled from the scene tree: the behavior\nlives in a file that any node can hold and call, not in a node at a path, so\nthe agent defines and tunes it without a scene edit, and swaps it without\nchanging the node tree. `project scan` registers the class, `resource create`\nwrites the `.tres`, and `node set --value res:\u002F\u002F….tres` links it to a node\nexport typed with that class.\n\nA shared component is the default: the `.tres` stays linked in every scene\nfile, and an edit of the `.tres` reaches all of them. For a per-instance\ncopy, choose one of two options:\n\n- **Local to scene** (`resource set --property resource_local_to_scene\n  --value true`): the engine gives each scene instance its own copy when it\n  instantiates the scene, before any `_ready`; the nodes of one instance\n  share that copy, and a nested resource that is local to scene is copied\n  too. On that copy `get_local_scene()` returns the scene root and the\n  engine calls `_setup_local_to_scene`; a `duplicate()` copy gets neither.\n  The risk: when the node that holds the component is one an inherited scene\n  takes from its base, or the root of an instanced child, a re-save of that\n  scene by any gda write or by the editor stores the copy in its file as an\n  embedded `sub_resource`. The link to the `.tres` is lost in that file, a\n  later edit of the `.tres` does not reach it, and nothing reports it.\n- **`duplicate()` in the owner's script**, for example in `_ready`: the\n  `.tres` stays linked in every scene file, and the script makes the copy at\n  runtime. The script then owns what the engine owned: a child's `_ready`\n  runs before its parent's and sees the shared `.tres`; two nodes of one\n  instance that duplicate separately do not share. `duplicate(true)` copies\n  an embedded sub-resource but keeps a nested `.tres` shared, and\n  `duplicate_deep(Resource.DEEP_DUPLICATE_ALL)` copies the nested `.tres` too.\n\nRule of thumb: use `duplicate()` for a component on a node that the re-save\nabove can reach, and local to scene for a resource the engine must set up\nper scene. The copy semantics above are the engine's, not a gda guarantee.\n\n## Live workflow\n\nA live run needs a main scene. Set `application\u002Frun\u002Fmain_scene` or pass a\nvalid `--scene res:\u002F\u002F...` to `daemon start`. An explicit `res:\u002F\u002F` scene\nalso bypasses an unresolved `uid:\u002F\u002F` main scene.\n\n1. Start the daemon with `gda daemon start --project game --json`. This can\n   install the gda harness and update `project.godot`; inspect the change.\n   The Engine session starts when a live operation needs it.\n2. Run `gda daemon wait-ready --project game --json` before read-only\n   diagnostics. Inspect `clean_start` and `startup_diagnostics`. A serving\n   session can still have a scene script that failed to compile. A null\n   `clean_start` means the startup log was unavailable, not that it was clean.\n3. Discover runtime node paths with a bounded `game tree --max-depth N` or\n   `game find` query. Narrow with `--root`; a truncated result or a bounded\n   empty search does not prove absence. Then use `game get`, `game rect`,\n   or other live commands on the exact path.\n4. Use `input` for interaction, `diag errors` and `logger tail` for\n   diagnostics, and `perf` for measurements. Start the daemon with\n   `--windowed` for rendered UI checks or `screen capture`; these need a\n   display (Xvfb on a headless host), or an accessible interactive desktop\n   on Windows.\n5. Stop with `gda daemon stop`. This stops the daemon and its Engine\n   session, but the gda harness stays installed. To remove the gda harness\n   installation, run `gda daemon uninstall` after `daemon stop`. A\n   disposable project copy is an optional way to keep the harness out of\n   the source project. You do not need to uninstall before `gda export run`:\n   it removes the harness for the export and restores the project's prior\n   harness state. Other export routes do not remove it.\n\nFor a windowed launch, `live_windowed_unavailable` means skip rendered\nchecks in this environment. `live_windowed_permission_denied` means retry\noutside the restriction before deciding whether the host can render.\n\nAfter updating gda, stop and start the daemon before using live commands.\nRepeating `daemon start` updates the installed harness but does not reload\nthe code in the running game.\n\nA `live_timeout` discards the Engine session. The next live operation starts\na new game, so do not assume that earlier runtime changes still exist.\n\nInput has two injection routes, reported as `injection_route`. The default\n`input action` uses `action_state` to change the polled action state; it\ndoes not send an event to `_input`, `_unhandled_input`, or `_gui_input`.\nA key or mouse command uses `viewport_event` to send an event through the\nviewport. Use `input action --as-event` only when an event handler must\nreceive that action rather than the mapped key:\n\n| Injection | `Input.is_action_pressed` | `_input` \u002F `_unhandled_input` | `_gui_input` |\n| --- | --- | --- | --- |\n| `input action` | yes | no | no |\n| `input action --as-event` | no | yes | yes (focused Control) |\n| `input key` of the mapped key | no | yes | yes (focused Control) |\n\nThe table describes eligible delivery under normal propagation and\nconsumption rules, not proof that a handler ran. For UI activation, use\n`input mouse-click` or `input tap` to send a complete press\u002Frelease\ngesture. A default `BaseButton` activates on the release; `action_mode` or\nsubclasses such as `MenuButton`\u002F`OptionButton` can activate on press.\n\nIn a windowed session, a loss of OS focus after `input action` releases the\nheld state: the engine releases every pressed input, an injected action\nstate included, when another application or a second windowed session\ntakes the focus, and regaining the focus does not restore it. Press again\nafter such a loss.\n\nTo verify an interaction:\n\n1. Find out whether the game polls input state or handles input events.\n   Select the route from the table.\n2. Find the runtime target with a bounded `game tree` or `game find` query.\n3. For key or action-event button activation, the intended Control must hold\n   focus. gda has no focus command; the game gives the Control focus, for\n   example with `grab_focus()` in its script. Then inject the matching input.\n4. Read the expected game state, for example with `game get`. This read is\n   the proof. For visible UI effects, also inspect a `screen capture` of the\n   resulting state. An injected gesture alone does not prove that the intended\n   handler or gameplay action ran.\n\n`game rect` reports coordinates relative to the Control's canvas. A\ntransformed `CanvasLayer` or an active `Camera2D` can make them differ from\nclick coordinates. Do not take click coordinates from the pixels of a\nviewport capture.\n\n`script run` runs your script as written. It does not add coordinate\nconversion, gesture completion, or event timing to the script's own\n`push_input()` calls. Your tests must establish those details and the\nactual UI layout. Input that a script sends is separate from input that\ngda injects with `input` commands into an Engine session. See Godot's\n[InputEvent guide](https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002F4.6\u002Ftutorials\u002Finputs\u002Finputevent.html).\n\nA `screen capture` is evidence only when it shows the intended state:\n\n- Use the `--await-*` predicate to capture when the relevant state holds.\n  The predicate must represent the visible state. Text kept on a hidden\n  `Label` is not sufficient.\n- Use `--await-events` to trigger a short-lived state and capture it in one\n  operation.\n- Use `--settle-frames` when the game draws the state later. A settle moves\n  the capture later than the predicate's first match. The earlier state can\n  be gone by then.\n- Inspect the image. When timing matters, also inspect the returned frame\n  counters and predicate evidence.\n- Do not assume that one settle count works for every state. Process\n  frames are not a fixed wall-clock duration.\n\nIf the game needs structured records in `logger tail`, resolve the harness\nby node path and check that the daemon launched the session. Do not refer to\nthe `GdaHarness` global in game code: a project or export without the harness\ncannot parse that name.\n\n```gdscript\nvar harness := get_node_or_null(\"\u002Froot\u002FGdaHarness\")\nif harness != null and harness.is_daemon_launched():\n    harness.gda_log(\"info\", \"player spawned\", {\"hp\": 100})\nelse:\n    print(\"player spawned\")\n```\n",{"name":5,"description":7},"main","ae208aebd47b23cfe94debde67329dde799c9b25","skills\u002Fgda",10,"https:\u002F\u002Fgithub.com\u002Faigengame\u002Fgodot-agent","https:\u002F\u002Faigengame.xyz\u002F","https:\u002F\u002Fgithub.com\u002Faigengame","https:\u002F\u002Faigengame.xyz","AIGen : Harnessing the AI-Eigen space for precise and instant game generation.","2026-11-02 19:29:11",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add aigengame\u002Fgodot-agent --skill gda",{"tool":40,"command":41},"bunx","bunx skills add aigengame\u002Fgodot-agent --skill gda",{"tool":43,"command":44},"pnpm","pnpm dlx skills add aigengame\u002Fgodot-agent --skill gda","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faigengame\u002Fgodot-agent\u002Fblob\u002Fmain\u002Fskills\u002Fgda\u002FSKILL.md",true,[],[49],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M75D6W274Z38ATFDAR7Y9X16","skill","https:\u002F\u002Fgithub.com\u002Faigengame\u002Fgodot-agent\u002Fblob\u002Fmain\u002Fsrc\u002Fgda\u002Fskill\u002FSKILL.md",[],[]]