Godot C#
/godot-csharp
Write Godot 4.7 games in C#: node classes and lifecycle, [Export] fields, signals as C# events and calls between C# and GDScript.
- 许可证
- Apache-2.0
- 出品
- GameSkill 出品
所属合集
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
我们测过
在 Godot 4.7.2 .NET 上通过 28/28 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
7: partial classes extending nodes, the PascalCase lifecycle (_Ready/_Process/_PhysicsProcess), [Export] fields, [Signal] delegates as C# events, type-safe node lookup, and calling between C# and GDScript. …
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 19d93f97c9c1,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 节点脚本写成 partial 类 / Node scripts are partial classes
- 生命周期用 PascalCase,delta 是 double / PascalCase lifecycle, double delta
- [Signal] 委托名以 EventHandler 结尾 / Signal delegates end with EventHandler
- Vector2 是结构体,改副本再赋值 / Vector2 is a struct, mutate a copy
- 用 GD.Print,不用 Console.WriteLine / Use GD.Print, not Console.WriteLine
中文指南
这个 skill 做什么
这个 skill 讲在 Godot 4.7 里用 C#/.NET 写游戏代码:partial 类继承节点、PascalCase 生命周期方法(_Ready/_Process/_PhysicsProcess)、[Export] 字段、[Signal] 委托当 C# 事件、GetNode
什么时候用
- 用 C#(.cs 和 .csproj)写 Godot 游戏代码
- 把 GDScript 的写法翻成 C#
- 把 Godot 信号接成 C# 事件
怎么装
下载本页的 ZIP,把 godot-csharp/ 整个文件夹放进 agent 的 skills 文件夹:Claude Code 用 .claude/skills/,Codex、Gemini CLI、OpenCode 用 .agents/skills/,Cursor 用 .cursor/skills/,Copilot 用 .github/skills/,Windsurf 用 .windsurf/skills/,然后重启 agent。也可以直接对 agent 说:Install the skill from https://gameskill.dev/skills/godot-csharp/install.md
最小示例
gameskill/examples/ 是一个 C# 小项目:Beacon.cs 和 Health.cs 是节点脚本,Main.cs 负责生成和计时,spawner.gd 是 GDScript 节点,场景是 beacon.tscn 和 main.tscn。测试在 tests/TestRunner.cs,场景是 tests/test_runner.tscn,截图用 tests/screenshot.gd。
我们怎么测的
总分 28/28。在 Godot 4.7.2 无头模式下跑 16 项检查:export_default 看 [Export] 字段的默认值;getnode_typed 看 GetNodedamage_emits 和 damage_clamps 看受伤时发信号且血量不低于 0;died_once 看死亡信号只发一次;disconnect_stops 看断开订阅后不再收到信号;instance_beacon 看实例化场景并加进树;process_accum 和 accum_is_float 看 _Process 里按 delta 累加且用浮点;gdscript_call 和 gdscript_signal 看 C# 调 GDScript 方法和接 GDScript 信号;signalname_const 和 methodname_const 看用生成的 SignalName/MethodName 常量;freed_invalid 看释放后的对象被正确判为无效;vector_math 和 mathf_clamp 看 Vector2 是结构体要改副本、以及 Mathf.Clamp 的用法。用 Godot 4.7.2 .NET 版和 .NET 8 SDK,先 dotnet build 再无头运行 C# 的测试场景。审查时修了死亡信号测试(初稿用了已经死掉的对象)。结果在 gameskill/test-report.json。
和站内其他 skill 的区别
GodotPrompter 套件里包含 csharp-godot 和 csharp-signals;这个是单独一个 skill,不依赖套件。这里用真实的 Godot .NET 版跑测试,不是只给写法。
搭配
godot-nodes-scenes:场景和节点结构godot-gdscript-headless-testing:GDScript 的无头测试godot-prompter:GodotPrompter 套件里的相关 skill
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/godot-csharp/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-csharp.zip -o /tmp/gameskill-godot-csharp.zip
unzip -oq /tmp/gameskill-godot-csharp.zip -d .claude/skills
rm /tmp/gameskill-godot-csharp.zip包含内容
- Worked steps: A node script: lifecycle, [Export], GetNode<T>; Signals as C# events; Instancing a scene in C#; Interop with GDScript nodes
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
- Written for Godot 4.7
适合
- Writing Godot game code in C# (.cs files, .csproj), needing the Godot .NET build, converting GDScript patterns to C#
- Wiring Godot signals as C# events
试试这条提示词
Convert my player script from GDScript to C# with exported fields and signals.关于这个 Skill
Use C#/.NET in Godot 4.7: partial classes extending nodes, the PascalCase lifecycle (_Ready/_Process/_PhysicsProcess), [Export] fields, [Signal] delegates as C# events, type-safe node lookup, and calling between C# and GDScript. Use when writing Godot game code in C# (.cs files, .csproj), needing the Godot .NET build, converting GDScript patterns to C#, or wiring Godot signals as C# events.
From the godot-csharp SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- A node script: lifecycle, [Export], GetNode
- Signals as C# events
- Instancing a scene in C#
- Interop with GDScript nodes
环境要求
- Godot 4.7
常见问题
肉鸽构筑白标起步工程(Godot 4 + Web + 平衡表)
告别空工程从零搭架子!开箱即玩的白标肉鸽构筑商业起步模板(Godot 4 完整工程 + Web 可玩版):含开局三槽赐福、无交叉 DAG 地图、扇形出牌、Boss 半血锁血、篝火/商店删牌、32 位校验防坏档 SaveStore、中英切换、30 牌/18 遗物/15 怪平衡表与 1,000 局 HTML 压测工具。
- 完整 Godot 4.3+ 工程(打开即 F5 运行,内置防坏档原子 SaveStore + 中英实时切换 LocService)
- 零构建 Web HTML5 可玩起步版(扇形手牌、2 帧受击闪白、震屏与 Boss 半血锁血全跑通)
基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
GDScript for Godot 4
Write idiomatic GDScript for Godot 4.7: static typing, the node lifecycle (_ready/_process/_physics_process), @export/@onready/@tool annotations, signals, and await for asynchronous flow.
Godot Signals & Groups
Decoupled Godot 4.7 gameplay with signals and groups: custom signals, Callable connections and broadcasts with call_group.
Godot Resources
Data-driven Godot 4.7 games with custom Resource classes: typed data, .tres files, duplication and threaded loading.
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 45 个2D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
Behavior Trees & Utility AI
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Card Game
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.
相似 skills
Claude Code Game Studios
Turns Claude Code into a full game studio: 49 agents and 72 workflow skills arranged like a real studio hierarchy.
Godogen
Autonomous game development with Claude Code and Codex. Publishes a ready game repo for Godot, Bevy, Babylon.js or three.js.
pixelfx
244 pixel-art effects written as code (fire, explosions, magic, weather, UI, pickups, critters) plus a draft, render, look, refine loop for making new ones; every effect exports a sprite sheet with Aseprite-style JSON for Godot, Unity, Phaser or any engine.
Godot AI
Production-grade MCP server and editor plugin for Godot 4.7+: 46 tools and 120+ operations for scenes, nodes, scripts, UI and more.