gdscript-patterns

Applies GDScript conventions for type hints, signals, exports, and lifecycle methods in Godot 4 projects.

66|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/SummerEngine/summer --skill gdscript-patterns-summerengine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gdscript-patterns
Source: https://github.com/SummerEngine/summer/tree/main/library/skills/gdscript-patterns
Command: npx skills add https://github.com/SummerEngine/summer --skill gdscript-patterns-summerengine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing GDScript that compiles cleanly and integrates with Summer Engine's MCP scene tools requires knowing Godot 4.x conventions and avoiding subtle pitfalls like calling Object introspection methods on script-class references or assigning LabelSettings to Label3D nodes. ## Core Features & Use Cases - Idiomatic GDScript conventions: Enforces type hints, signal definitions, @export properties, @onready usage, and correct lifecycle method selection (_ready, _process, _physics_process). - Anti-pattern detection: Documents parse-time and runtime traps such as has_static_method on preloaded script references, $Path on optional nodes, and LabelSettings misuse on Label3D. - MCP integration guidance: Explains how scripts attach via summer_set_prop, signals connect via summer_connect_signal, and input actions bind via summer_input_map_bind. - Use Case: When building a character controller, use this Skill to write a typed movement script with exported speed values, a health signal system, and _physics_process-based move_and_slide logic that works with MCP scene operations. ## Quick Start Ask the agent to write a GDScript player controller with type hints, exported movement variables, and a health signal following the gdscript-patterns conventions.

Frequently Asked Questions about gdscript-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write idiomatic GDScript with type hints in Godot 4?

Declare types on every variable, such as var health: int = 100 or var velocity: Vector3 = Vector3.ZERO, and type node references like @onready var camera: Camera3D = $Camera3D. Type hints improve editor support and catch errors at parse time.

How do I connect signals in GDScript with Summer MCP tools?

Define the signal at the top of the script, then call summer_connect_signal with the emitter path, signal name, receiver path, and method name. The receiver script must already define the handler method before the connection is made.

Why does has_method fail on a preloaded GDScript class?

has_method and has_static_method are Object instance methods, so calling them on a const ScriptName = preload(...) reference is a parse error. Call the method directly instead; the GDScript parser already validates that it exists at compile time.

When should I use get_node_or_null instead of $NodePath?

Use get_node_or_null when a script is shared across scene variants where a child node may be missing, since @onready var x = $Path errors at scene load before any guard runs. Use $Path only when the node is required for the script to function.

Does Label3D support LabelSettings in Godot 4?

No, LabelSettings only works with the 2D Label control. For Label3D, set font, font_size, outline_size, and outline_modulate directly as properties on the node, noting the field is outline_modulate rather than outline_color.