Skip to content

77 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic launched as Claude Skills), with a router that loads the right skill for your engine and task. Runs in Claude Code, Cursor, Kiro, Codex, Copilot, Gemini CLI and more.

fix(godot): update GDScript typing notes for 4.7 (typed dictionaries, typed-return overrides)

Kiro Crew9215a528329d
diff --git a/skills/godot/godot-gdscript/SKILL.md b/skills/godot/godot-gdscript/SKILL.md
index 2609eb9..44eb9f5 100644
--- a/skills/godot/godot-gdscript/SKILL.md
+++ b/skills/godot/godot-gdscript/SKILL.md
@@ -69,7 +69,7 @@ signal health_changed(current: int, maximum: int) # typed signal params
var health := 100
func take_damage(amount: int) -> void:
- health = max(health - amount, 0)
+ health = maxi(health - amount, 0) # maxi/maxf are typed; max() returns Variant
health_changed.emit(health, 100) # 4.x: emit as a method on the signal
func _ready() -> void:
@@ -116,6 +116,11 @@ func get_first_name(d: Dictionary) -> String:
`_physics_process(delta)`; using `_process` makes motion frame-rate dependent.
- **`class_name` must be unique** project-wide and is required to use the type name in
other scripts or as an Inspector type.
+- **An override stops parsing after upgrading to 4.7** → since 4.7 an overriding method
+ inherits the parent's typed return, so every path must `return` a value (add
+ `return null` at the end if needed). Also new in 4.7: setting one element of a packed
+ array property (`points[0] = v`) no longer calls that property's setter; reassign the
+ whole array if the setter must run.
## References
diff --git a/skills/godot/godot-gdscript/references/annotations-and-typing.md b/skills/godot/godot-gdscript/references/annotations-and-typing.md
index 7261650..2be9958 100644
--- a/skills/godot/godot-gdscript/references/annotations-and-typing.md
+++ b/skills/godot/godot-gdscript/references/annotations-and-typing.md
@@ -40,6 +40,10 @@ Export a typed array of resources (great for data-driven design):
`godot-multiplayer`).
- `@warning_ignore("unused_variable")` — silence a specific parser warning.
- `@static_unload` — allow a script's static variables to unload.
+- `@export_tool_button("Rebuild") var rebuild_action := rebuild` — an Inspector button
+ that calls a `Callable` (4.4+; the script must also be `@tool`).
+- `@export_storage var cache: Array` — saved with the scene/resource but hidden from the
+ Inspector.
## Static typing details
@@ -48,10 +52,15 @@ var a: int = 3 # explicit type
var b := 3 # inferred int via :=
var c: float # typed, defaults to 0.0
var nodes: Array[Node2D] = [] # typed array (element type enforced)
-var scores: Dictionary = {} # Dictionary is untyped in 4.3; typed dicts arrived in 4.4
+var scores: Dictionary[String, int] = {} # typed dictionary (Godot 4.4+)
+var any_data: Dictionary = {} # untyped: keys and values can be anything
func clamp_hp(hp: int) -> int:
return clampi(hp, 0, 100) # clampi/clampf are typed variants
+
+func best_score(name: String) -> int:
+ var s: int = scores.get(name, 0) # get() returns Variant even on a typed dictionary,
+ return s # so `var s := scores.get(...)` fails to parse
```
Typed code is faster because the VM can skip runtime type checks, and the editor can