/godot-agent-skills:godot-csharpfrom godot-agent-skills
Provides C#/.NET setup and coding patterns for Godot 4.7, including csproj/SDK config, partial classes, source generators, exports, signals, StringName caching, Variant marshaling, async ToSignal, GDScript interop, and build error handling.
Ships in godot-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Build after every edit: python scripts/cs_build.py returns errors as {file, line, code, msg}. Use --doctor to check the setup and --init to create the csproj and sln exactly like the 4.7 editor does.
The engine runs the last built assembly in .godot/mono/temp/bin/, so build before any smoke run.
C# names: api_lookup.py Node3D.look_at prints Node3D.LookAt(Vector3, Vector3?, bool). C# names also work as queries.
<Project Sdk="Godot.NET.Sdk/4.7.2">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net9.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
</Project>
Godot.NET.Sdk/x.y.z version must equal the engine version. Bump it when you upgrade Godot. net8.0 is the minimum; net9.0+ is allowed. <Nullable>enable</Nullable> is recommended.project.godot needs "C#" in config/features and [dotnet] project/assembly_name. The assembly name must match the csproj name.dotnet add package). Assemblies must be pure managed code, or ship native libraries for every target platform.public partial class Player : CharacterBody3D. The file name must equal the class name (Player.cs). Namespaces are fine. Godot-derived classes must be partial.[GlobalClass] registers the class in the Create dialog and as an exportable Resource type, like GDScript class_name. [Tool] runs the class in the editor.[Export] public float Speed { get; set; } = 5f; plus [ExportGroup("Movement")], [ExportSubgroup], [ExportCategory], [Export(PropertyHint.Range, "0,100,1")] and [ExportToolButton("Bake")] public Callable BakeButton => Callable.From(Bake);.[Signal] public delegate void HitEventHandler(int damage);. The suffix is required. The generator creates event Hit and SignalName.Hit.
Emit with EmitSignal(SignalName.Hit, 5) and connect with enemy.Hit += OnHit;.SignalName.*, MethodName.* and PropertyName.* (generated StringNames) wherever the API wants a name, so you never allocate strings.Position.X = 5 won't compile (CS1612). Write Position = Position with { X = 5 };.Godot disconnects everything when either object is freed, except:
+= to a custom [Signal], when the receiver is freed first, andCallable.From doesn't help.
In both cases, unsubscribe with -= in _ExitTree (keep the delegate in a field for lambdas). Otherwise, emitting into a freed object throws ObjectDisposedException.static readonly StringName. Passing "jump" every frame allocates.System.Collections.Generic for internal logic. Use Godot.Collections.Array<T>/Dictionary<TK,TV> only at the Godot boundary (exports, signals, GDScript calls). Each crossing marshals the data.Vector3[], byte[]) are copied on every API call. Read a mesh array once and work on the copy._Process/_PhysicsProcess hot loops. Prefer GetNode<T>() once in _Ready and keep the result in a field.$"{1.5f}", float.Parse and ToString() follow the OS locale (1,5 in Italian, German, …). Use CultureInfo.InvariantCulture for saves, network data, JSON and UI number formats. (Observed on a 4.7.2 test machine.)run_godot.py smoke errors.GD.Print allocates. Remove it from hot paths, or put it behind #if DEBUG or OS.IsDebugBuild().await ToSignal(GetTree().CreateTimer(1.0), SceneTreeTimer.SignalName.Timeout); awaits a signal on the main thread.Task.Run/WorkerThreadPool, then get back to the main thread with CallDeferred or Callable.From(...).CallDeferred() before you touch nodes._Ready/_Process only through an async void handler, and keep it short. Check IsInstanceValid(this) after awaits.var gd = GetNode("Inventory"); gd.Call("add_item", "sword", 2); var n = gd.Get("count").AsInt32();. Connect to its signals with gd.Connect("changed", Callable.From<int>(OnChanged)).node.Speed, node.Damage(5)). Signals keep their C# names (node.Hit.connect(...)).GD.Load<GDScript>("res://x.gd").New().AsGodotObject().Variant: Variant.From(x), v.As<T>(), v.AsInt32(), v.VariantType. Return Variant from methods GDScript calls dynamically.Patterns, interop and editor/hot-reload notes (compiled by the tests): references/patterns.md.
What SKILL.md sets; muted values are Claude Code's defaults
27 skills in this plugin
/godot-2d2D games in Godot 4.7 - pixel-art and HD setup, TileMapLayer (cells, terrains, custom data, runtime tiles, physics chunking), Parallax2D, Camera2D (limits, smoothing, shake), y-sort and z-index, 2D lights and normal maps, AnimatedSprite2D, one-way platforms, custom drawing, many-sprite performance. Use for platformers, top-down, tile-based or any 2D scene./godot-3d-gameplayBuilding 3D games in Godot 4.7 - third-person and orbit cameras (SpringArm3D), camera-relative movement, lock-on, top-down/RTS/isometric cameras, GridMap + MeshLibrary levels, CSG blockout and baking, modular kit import hints, Path3D rails, interactables, spawners, world-space UI, large worlds and LOD. Use for 3D player controllers, cameras or level building./godot-npx claudepluginhub el4cteo/godot-skills --plugin godot-agent-skillsOther plugins' skills for the same job