godot-gdscript-mastery
Installation
SKILL.md
GDScript Mastery
Expert guidance for writing performant, maintainable GDScript following official Godot standards.
NEVER Do
- NEVER use dynamic typing for performance-critical code —
var x = 5is 20-40% slower thanvar x: int = 5. Type everything. - NEVER call parent methods from children ("Call Up") — Use "Signal Up, Call Down". Children emit signals, parents call child methods.
- NEVER use
get_node()in_process()or_physics_process()— Caches with@onready var sprite = $Sprite. get_node() is slow in loops. - NEVER access dictionaries without
.get()default —dict["key"]crashes if missing. Usedict.get("key", default)for safety. - NEVER skip
class_namefor reusable scripts — Withoutclass_name, you can't use as type hints (var item: Item). Makes code harder to maintain.
Available Scripts
MANDATORY: Read the appropriate script before implementing the corresponding pattern.
advanced_lambdas.gd
Higher-order functions in GDScript: filter/map with lambdas, factory functions returning Callables, typed array godot-composition, and static utility methods.