← ClaudeAtlas

godot-gdscript-patternslisted

Idiomatic GDScript 2.0 for Godot 4 - static typing, the @export, @onready and @tool annotations, node lifecycle callbacks, signals as first-class objects, await, class_name registration, lambdas and typed collections. Use when writing or reviewing .gd files, when porting Godot 3 GDScript, or when deciding between get_node, @onready and dependency injection. Explicitly separates Godot 4 syntax from the Godot 3 forms that look similar and fail.
ibrohim1234567881717/game-dev-ai-skills · ★ 0 · AI & Automation · score 71
Install: claude install-skill ibrohim1234567881717/game-dev-ai-skills
# GDScript Patterns ## Purpose GDScript 2.0 shipped with Godot 4 and is a different language from GDScript 1.x in Godot 3: annotations replaced keyword exports, `await` replaced `yield`, signals became objects rather than strings, and the static type system became strong enough to change performance. This skill gives the idioms that make GDScript fast, refactorable and diff-friendly, and marks every place where a 3.x form would look plausible and be wrong. ## When to use - Writing any new `.gd` file, or editing an existing one. - Reviewing GDScript for typing, lifecycle or signal-handling problems. - Porting a tutorial, snippet or Godot 3 script into a Godot 4 project. - Deciding how a node should reach its collaborators. - Chasing "Invalid call. Nonexistent function" or "Cannot call method on a null value" errors that appear only at runtime. ## When NOT to use - Scene-tree architecture and node ownership questions — `godot-scene-composition`. - Signal topology, event buses and decoupling strategy — `godot-signals-events`. - C# equivalents and cross-language interop — `godot-csharp-integration`. - `@tool` scripts intended to extend the editor UI — `godot-editor-plugins`. (`@tool` basics are covered here; editor plugin structure is not.) ## Required context - **Major version.** `config_version` in `project.godot`. Everything below is Godot 4 unless labelled `3.x`. Establish this via `godot-project-conventions` first. - **Minor version.** `config/features`. Type