Gda 标志

Gda

组织
aigengame
gda

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
代码仓库godot-agent
技能名称gda
星标数
56
复刻数
9
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 aigengame 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Gda AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/aigengame/godot-agent/tree/main/skills/gda
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aigengame/godot-agent.git /tmp/godot-agent
mkdir -p .claude/skills
cp -r /tmp/godot-agent/skills/gda .claude/skills/gda
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Gda,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Gda。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Gda 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

gda

gda is an agent-facing CLI for Godot. Use headless operations to create and inspect scenes, nodes, scripts, resources, shaders, themes, and project settings; validate or run scripts and scenes; and export artifacts. Use live operations to inspect a running game, inject input, capture the viewport, and read diagnostics or performance data. Live operations use gda-daemon. Both kinds support Godot 4.6+ on macOS, Linux and Windows; check a command's --schema constraints for its supported platforms.

Configure and discover

  • Set GDA_GODOT to the Godot executable, or pass --godot PATH after the command. If a command reports binary_not_found, find the Godot executable or ask the user for its path, then use it as above. On Windows, use Godot's *_console.exe.
  • Pass --project DIR, set GDA_PROJECT, or run inside the project directory. The project must contain project.godot. Use an explicit project when a script or asset depends on res:// or project autoloads.
  • Keep the same engine and project for the related calls of one workflow.
  • Use gda --version --json to identify the installed CLI and its source in a long session. Use gda info --json to check the Godot engine.
  • Use gda --help for command groups, gda <group> --help for a group's commands, and gda <group> <command> --help for usage. Use gda <group> <command> --schema for that command's arguments, JSON result, and errors. gda schema describes the full installed surface. Consult these sources for exact options and fields instead of assuming this skill is a command catalog.

The CLI reads stdin and writes stdout and stderr as UTF-8 on every platform, including Windows. Encode JSON stdin and decode captured CLI output as UTF-8.

Pass --json on operations, for example gda scene validate res://main.tscn --project game --json. Read the one JSON object on stdout; engine output goes to stderr. On failure, branch on the structured error.code and inspect any evidence; do not parse error.message. An exit code of zero does not always mean the requested check passed:

OperationCheck in the successful result
scene validate, script validatevalid; false is not a pass.
scene preflightstatus and started; static validation does not boot the target scene.
script run, export smokeChild exit_status and diagnostics; use --strict when non-zero status or a recognized shutdown leak must fail the command.
game setverified; false means the observed read-back differs. Follow up with game get or a domain-specific observation when the side effect matters.

For precision-sensitive values, inspect the result or read-back. Godot can change a decimal value while parsing it; gda refuses values that the parser would destroy. Consult the relevant command schema for accepted value forms and limits.

Headless workflow

With no project yet, run gda project create DIR --name NAME --json first. DIR must be a new directory in an existing parent, or an empty directory; dot-prefixed entries such as .git do not count. The new project.godot sets only the name, so set the main scene and other settings with project set. Then use DIR as the project.

Run gda project scan --json on a fresh checkout or a project the editor never opened, and after you add, rename or delete a class_name script: the engine finds a project class_name only through the index a scan writes, and gda does not check whether that index is current.

  1. Create or edit a scene with scene, node, script, and resource commands. Use script attach to bind a script to a node; generic node set --property script is refused. Create assets used by preload("res://...") before you attach the script. Supply a res:// Resource path when assigning a Resource-typed property.
  2. Run scene validate and script validate for the changed files. Check their valid verdicts. scene validate checks dependencies and scripts, but does not prove that the target scene starts.
  3. Run scene preflight to boot the target scene for a bounded interval. Check its startup verdict and diagnostics. Use script run for a project test script; inspect the child status even when gda succeeds.
  4. Use export list to select a preset. Optionally inspect it with export get, then run export run. If needed, use export smoke on the built artifact. A smoke run proves only what that bounded process observed; it does not prove that the game completed its intended task.

When scene create uses a Control-derived root from --root-type, it writes zero anchors and zero offsets. A root with no intrinsic minimum size renders as a zero-size rect; a root with an intrinsic minimum size renders at that minimum instead, not at viewport size. Set anchor_right and anchor_bottom to 1 with node set, then confirm the layout with game rect in an Engine session. For a Control inside a Container, change minimum size, size flags, or the container layout instead of offsets. A root from --inherits keeps the base's anchors and offsets.

For a variant of a base scene, use scene create PATH --inherits BASE, not node add --instance: the new scene's root is the base's root. In the variant, override inherited nodes with node set and add its own nodes; edit or remove inherited nodes in the base. scene get and node list show the variant's composed tree and mark inherited nodes with inherited_from; an inherited instance whose scene is missing carries no mark.

export run checks the export templates itself before it exports, and refuses with export_templates_missing when they are not available. --mode pack needs no templates. export get is optional inspection. Give it the same engine, project, preset, and data root (--user-data-root) as export run:

  • templates_installed: false means that the templates_version directory is missing under templates_root. Then a non-null templates_root_host means that the host has these templates but the data root hides them; a null value means that they are not installed.
  • templates_installed: true means only that the version directory exists. It does not prove that the preset's platform can export.

To recover, put matching templates, including the files for the preset's platform, under templates_root. With a data root, you can instead select another data root, or run without one where the environment permits. Template readiness does not prove that an export succeeds or that the Export artifact runs.

Data root in restricted environments

A headless run sends the engine log to a private temporary file. Godot can still write to its data directory during engine initialization, including for a validation. If that directory is not writable, select a writable data root. The global option comes before the command group:

bash
gda --user-data-root /writable/gda-data scene validate res://main.tscn --project game --json

The data root moves the engine data directory (user:// and the export templates) and the engine log. The editor configuration and cache locations depend on the platform and can stay in place; on Linux they do not move. project scan, and resource import when it starts an engine, move the platform's configuration and cache locations under the data root too; without a data root, they use a private directory. Judge the impact from the operation verdict and the engine diagnostics. A directory warning does not by itself make a successful operation invalid. script run reports engine_data_path and log_file; inspect them before you treat a failed user:// save as a game defect.

  • Use one data root for the engine-launching headless operations of one restricted workflow.
  • Use a separate data root for each invocation that runs at the same time. Each launch truncates the one engine log under a data root.
  • Do not set the data root (GDA_USER_DATA_ROOT) for unrelated commands.
  • Do not give export smoke a data root unless it refuses with user_data_unwritable. Without one, each smoke run creates a private data root, so no user:// state carries from one smoke run to the next.
  • --user-data-root does not reconfigure an Engine session that the daemon manages.
  • A successful validation under a data root does not prove that the export templates are available there.

Advanced Godot usages

Scene inheritance. One base scene holds the tree and its scripts. A variant made with scene create PATH --inherits BASE keeps that tree and stores only what it changes: overrides on the base's nodes, and nodes of its own. Keep the logic in the base and specialize the visuals and values in each variant. The commands and the rules are in the variant paragraph above.

Resource-based components. A class_name script that extends Resource holds a behavior's data and logic, decoupled from the scene tree: the behavior lives in a file that any node can hold and call, not in a node at a path, so the agent defines and tunes it without a scene edit, and swaps it without changing the node tree. project scan registers the class, resource create writes the .tres, and node set --value res://….tres links it to a node export typed with that class.

A shared component is the default: the .tres stays linked in every scene file, and an edit of the .tres reaches all of them. For a per-instance copy, choose one of two options:

  • Local to scene (resource set --property resource_local_to_scene --value true): the engine gives each scene instance its own copy when it instantiates the scene, before any _ready; the nodes of one instance share that copy, and a nested resource that is local to scene is copied too. On that copy get_local_scene() returns the scene root and the engine calls _setup_local_to_scene; a duplicate() copy gets neither. The risk: when the node that holds the component is one an inherited scene takes from its base, or the root of an instanced child, a re-save of that scene by any gda write or by the editor stores the copy in its file as an embedded sub_resource. The link to the .tres is lost in that file, a later edit of the .tres does not reach it, and nothing reports it.
  • duplicate() in the owner's script, for example in _ready: the .tres stays linked in every scene file, and the script makes the copy at runtime. The script then owns what the engine owned: a child's _ready runs before its parent's and sees the shared .tres; two nodes of one instance that duplicate separately do not share. duplicate(true) copies an embedded sub-resource but keeps a nested .tres shared, and duplicate_deep(Resource.DEEP_DUPLICATE_ALL) copies the nested .tres too.

Rule of thumb: use duplicate() for a component on a node that the re-save above can reach, and local to scene for a resource the engine must set up per scene. The copy semantics above are the engine's, not a gda guarantee.

Live workflow

A live run needs a main scene. Set application/run/main_scene or pass a valid --scene res://... to daemon start. An explicit res:// scene also bypasses an unresolved uid:// main scene.

  1. Start the daemon with gda daemon start --project game --json. This can install the gda harness and update project.godot; inspect the change. The Engine session starts when a live operation needs it.
  2. Run gda daemon wait-ready --project game --json before read-only diagnostics. Inspect clean_start and startup_diagnostics. A serving session can still have a scene script that failed to compile. A null clean_start means the startup log was unavailable, not that it was clean.
  3. Discover runtime node paths with a bounded game tree --max-depth N or game find query. Narrow with --root; a truncated result or a bounded empty search does not prove absence. Then use game get, game rect, or other live commands on the exact path.
  4. Use input for interaction, diag errors and logger tail for diagnostics, and perf for measurements. Start the daemon with --windowed for rendered UI checks or screen capture; these need a display (Xvfb on a headless host), or an accessible interactive desktop on Windows.
  5. Stop with gda daemon stop. This stops the daemon and its Engine session, but the gda harness stays installed. To remove the gda harness installation, run gda daemon uninstall after daemon stop. A disposable project copy is an optional way to keep the harness out of the source project. You do not need to uninstall before gda export run: it removes the harness for the export and restores the project's prior harness state. Other export routes do not remove it.

For a windowed launch, live_windowed_unavailable means skip rendered checks in this environment. live_windowed_permission_denied means retry outside the restriction before deciding whether the host can render.

After updating gda, stop and start the daemon before using live commands. Repeating daemon start updates the installed harness but does not reload the code in the running game.

A live_timeout discards the Engine session. The next live operation starts a new game, so do not assume that earlier runtime changes still exist.

Input has two injection routes, reported as injection_route. The default input action uses action_state to change the polled action state; it does not send an event to _input, _unhandled_input, or _gui_input. A key or mouse command uses viewport_event to send an event through the viewport. Use input action --as-event only when an event handler must receive that action rather than the mapped key:

InjectionInput.is_action_pressed_input / _unhandled_input_gui_input
input actionyesnono
input action --as-eventnoyesyes (focused Control)
input key of the mapped keynoyesyes (focused Control)

The table describes eligible delivery under normal propagation and consumption rules, not proof that a handler ran. For UI activation, use input mouse-click or input tap to send a complete press/release gesture. A default BaseButton activates on the release; action_mode or subclasses such as MenuButton/OptionButton can activate on press.

In a windowed session, a loss of OS focus after input action releases the held state: the engine releases every pressed input, an injected action state included, when another application or a second windowed session takes the focus, and regaining the focus does not restore it. Press again after such a loss.

To verify an interaction:

  1. Find out whether the game polls input state or handles input events. Select the route from the table.
  2. Find the runtime target with a bounded game tree or game find query.
  3. For key or action-event button activation, the intended Control must hold focus. gda has no focus command; the game gives the Control focus, for example with grab_focus() in its script. Then inject the matching input.
  4. Read the expected game state, for example with game get. This read is the proof. For visible UI effects, also inspect a screen capture of the resulting state. An injected gesture alone does not prove that the intended handler or gameplay action ran.

game rect reports coordinates relative to the Control's canvas. A transformed CanvasLayer or an active Camera2D can make them differ from click coordinates. Do not take click coordinates from the pixels of a viewport capture.

script run runs your script as written. It does not add coordinate conversion, gesture completion, or event timing to the script's own push_input() calls. Your tests must establish those details and the actual UI layout. Input that a script sends is separate from input that gda injects with input commands into an Engine session. See Godot's InputEvent guide.

A screen capture is evidence only when it shows the intended state:

  • Use the --await-* predicate to capture when the relevant state holds. The predicate must represent the visible state. Text kept on a hidden Label is not sufficient.
  • Use --await-events to trigger a short-lived state and capture it in one operation.
  • Use --settle-frames when the game draws the state later. A settle moves the capture later than the predicate's first match. The earlier state can be gone by then.
  • Inspect the image. When timing matters, also inspect the returned frame counters and predicate evidence.
  • Do not assume that one settle count works for every state. Process frames are not a fixed wall-clock duration.

If the game needs structured records in logger tail, resolve the harness by node path and check that the daemon launched the session. Do not refer to the GdaHarness global in game code: a project or export without the harness cannot parse that name.

gdscript
var harness := get_node_or_null("/root/GdaHarness")
if harness != null and harness.is_daemon_launched():
    harness.gda_log("info", "player spawned", {"hp": 100})
else:
    print("player spawned")

常见问题

Gda AI 技能有什么作用?

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.

为什么在 TypingMind 中使用 Gda?

因为您只需安装一次,就能搭配任何模型使用。Gda 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Gda?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/aigengame/godot-agent/tree/main/skills/gda。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Gda?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Gda 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Gda 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Gda AI 技能免费吗?

是的。aigengame 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇