ai-behavior-trees-util…
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators)…
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,
Claude Code
$ npx -y skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-csharp --agent claude-code
Codex
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-csharp -a codex -y
Cursor
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-csharp -a cursor -y
Gemini CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-csharp -a gemini-cli -y
GitHub Copilot
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-csharp -a github-copilot -y
OpenCode
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-csharp -a opencode -y
Windsurf
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-csharp -a windsurf -y
name: godot-csharp description: > C# and .NET in Godot 4.7: partial node classes, the PascalCase lifecycle, [Export] and [Signal], signals as C# events, the .csproj and calling GDScript. Use for .cs scripts in Godot, porting GDScript to C#, a failed build, or a failed web or Android export. Not for GDScript (`godot-gdscript`), Unity C# (`unity-csharp-scripting`) or export presets (`godot-export`).
Write Godot game code in C# that the source generators accept, build it from the command line, and check it runs. Targets **Godot 4.7 .NET** with the **.NET 8** SDK (9 for Android). Read the `.csproj` first: its `Sdk="Godot.NET.Sdk/x.y.z"` is the engine version.
1. **Confirm the toolchain.** The project needs the Godot **.NET** editor build (the standard build cannot load C#) and a .NET SDK: `dotnet --list-sdks` should show 8.0 or later, and 9.0 or later if the project exports to Android. 2. **Every script is a `public partial class`** whose name matches its `.cs` file name and that extends a Godot type. The generators that wire `[Export]`, `[Signal]` and method bindings only work on `partial` classes. 3. **Override lifecycle methods in PascalCase** with `double` delta: `_Ready()`, `_Process(double delta)`, `_PhysicsProcess(double delta)`. 4. **Signals:** a `[Signal]` delegate named `XxxEventHandler` becomes the `Xxx` signal, an `Xxx` C# event and `SignalName.Xxx`. Emit with `EmitSignal(SignalName.Xxx, ...)`. 5. **Verify before you finish:**
errors. Godot's runtime does not compile C#, so a headless run uses whatever was built last. (`godot --headless --build-solutions --quit` also builds, through the editor.)
then `grep -nE "SCRIPT ERROR|^ERROR:" run.log`. An unhandled exception in a callback is logged as an `ERROR:` with its stack trace and the game keeps running, so the exit code stays 0.
catches broken script and scene paths in `.tscn` files.
test step.
using Godot;
public partial class Player : CharacterBody2D
{
[Export] public float Speed { get; set; } = 200.0f;
[Export] public float JumpVelocity { get; set; } = -400.0f;
private AnimatedSprite2D _sprite;
public override void _Ready()
{
_sprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
}
public override void _PhysicsProcess(double delta)
{
Vector2 v = Velocity; // struct copy: edit, then assign back
if (!IsOnFloor())
v += GetGravity() * (float)delta;
if (Input.IsActionJustPressed("jump") && IsOnFloor())
v.Y = JumpVelocity;
float dir = Input.GetAxis("move_left", "move_right");
v.X = dir != 0 ? dir * Speed : Mathf.MoveToward(v.X, 0, Speed);
Velocity = v;
MoveAndSlide();
}
}using Godot;
public partial class Health : Node
{
[Signal] public delegate void HealthChangedEventHandler(int current, int max);
private int _hp = 100;
public override void _Ready() => HealthChanged += OnHealthChanged;
public override void _ExitTree() => HealthChanged -= OnHealthChanged;
public void TakeDamage(int amount)
{
_hp = Mathf.Max(_hp - amount, 0);
EmitSignal(SignalName.HealthChanged, _hp, 100);
}
private void OnHealthChanged(int current, int max) => GD.Print($"HP {current}/{max}");
}public partial class Spawner : Node2D
{
private static readonly PackedScene Bullet = GD.Load<PackedScene>("res://bullet.tscn");
public void Shoot(Vector2 at)
{
var b = Bullet.Instantiate<Node2D>();
b.Position = ToLocal(at); // world -> this parent's space, before _Ready runs
AddChild(b);
}
}Node gd = GetNode("Enemy"); // a node with a .gd script
gd.Call("take_damage", 10); // snake_case names, checked at runtime
int score = gd.Get("score").AsInt32();
gd.Connect("died", Callable.From(OnDied));not `partial`, or the project was not rebuilt. The Inspector only shows members from the last successful build.
`CallDeferred`, `Get`, `Set`, `Connect`) use the engine's snake_case names. Pass `MethodName.AddChild` (or `"add_child"`) instead.
C# uses PascalCase and `double`.
name without it.
emitter lived on, and Godot could not disconnect it because the signal is a custom `[Signal]` or the handler is a lambda that captures variables. Unsubscribe with `-=` in `_ExitTree()` (Pattern 2), and check `GodotObject.IsInstanceValid(node)` before using nodes that may be gone.
structs. Copy, change, assign back.
node by its C# names (`node.T
<img src="docs/assets/awesome-gamedev-agent-skills-banner.png" width="820" alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents.
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators)…
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via…
Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person…
Plan, generate, source, normalize, and validate cohesive visual game assets. Use for art direction, style bibles, sprites,…
Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose…
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding —…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.