Master Godot 4 GDScript patterns including signals, scenes
Godot gdscript patterns

Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices.
--- name: godot-gdscript-patterns description: Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices. --- # Godot GDScript Patterns Production patterns for Godot 4.x game development with GDScript, covering architecture, signals, scenes, and optimization. ## When to Use This Skill - Building games with Godot 4 - Implementing game systems in GDScript - Designing scene architecture - Managing game state - Optimizing GDScript performance - Learning Godot best practices
Overview
Production patterns for Godot 4.x game development with GDScript, covering architecture, signals, scenes, and optimization.
Manual install (npx, ZIP)
Claude Code
npx skills add wshobson/agents --skill godot-gdscript-patterns -g -a claude-codeClaude Code (manual)
mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \
| tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/game-development/skills/godot-gdscript-patternsWindows (PowerShell)
New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/5d8e949e4aab9ebeaf3d/godot-gdscript-patterns.zip" -OutFile "$env:TEMP\godot-gdscript-patterns.zip"; Expand-Archive "$env:TEMP\godot-gdscript-patterns.zip" -DestinationPath "$HOME\.claude\skills" -ForceClaude.ai / desktop
Codex, Cursor, other agents
Connects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md2.1 KBreferences/2 files · 18.4 KB
Read the files here
SKILL.md
Show the full text79 lines
Godot GDScript Patterns
Production patterns for Godot 4.x game development with GDScript, covering architecture, signals, scenes, and optimization.
When to Use This Skill
- Building games with Godot 4
- Implementing game systems in GDScript
- Designing scene architecture
- Managing game state
- Optimizing GDScript performance
- Learning Godot best practices
Core Concepts
1. Godot Architecture
Node: Base building block
├── Scene: Reusable node tree (saved as .tscn)
├── Resource: Data container (saved as .tres)
├── Signal: Event communication
└── Group: Node categorization
2. GDScript Basics
class_name Player
extends CharacterBody2D
# Signals
signal health_changed(new_health: int)
signal died
# Exports (Inspector-editable)
@export var speed: float = 200.0
@export var max_health: int = 100
@export_range(0, 1) var damage_reduction: float = 0.0
@export_group("Combat")
@export var attack_damage: int = 10
@export var attack_cooldown: float = 0.5
# Onready (initialized when ready)
@onready var sprite: Sprite2D = $Sprite2D
@onready var animation: AnimationPlayer = $AnimationPlayer
@onready var hitbox: Area2D = $Hitbox
# Private variables (convention: underscore prefix)
var _health: int
var _can_attack: bool = true
func _ready() -> void:
_health = max_health
func _physics_process(delta: float) -> void:
var direction := Input.get_vector("left", "right", "up", "down")
velocity = direction * speed
move_and_slide()
func take_damage(amount: int) -> void:
var actual_damage := int(amount * (1.0 - damage_reduction))
_health = max(_health - actual_damage, 0)
health_changed.emit(_health)
if _health <= 0:
died.emit()
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
| 1 | |
| 2 | name godot-gdscript-patterns |
| 3 | description Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices. |
| 4 | |
| 5 | |
| 6 | # Godot GDScript Patterns |
| 7 | |
| 8 | Production patterns for Godot 4.x game development with GDScript, covering architecture, signals, scenes, and optimization. |
| 9 | |
| 10 | ## When to Use This Skill |
| 11 | |
| 12 | Building games with Godot 4 |
| 13 | Implementing game systems in GDScript |
| 14 | Designing scene architecture |
| 15 | Managing game state |
| 16 | Optimizing GDScript performance |
| 17 | Learning Godot best practices |
| 18 | |
| 19 | ## Core Concepts |
| 20 | |
| 21 | ### 1. Godot Architecture |
| 22 | |
| 23 | |
| 24 | Node: Base building block |
| 25 | ├── Scene: Reusable node tree (saved as .tscn) |
| 26 | ├── Resource: Data container (saved as .tres) |
| 27 | ├── Signal: Event communication |
| 28 | └── Group: Node categorization |
| 29 | |
| 30 | |
| 31 | ### 2. GDScript Basics |
| 32 | |
| 33 | |
| 34 | class_name Player |
| 35 | extends CharacterBody2D |
| 36 | |
| 37 | # Signals |
| 38 | signal health_changed(new_health: int) |
| 39 | signal died |
| 40 | |
| 41 | # Exports (Inspector-editable) |
| 42 | @export var speed: float = 200.0 |
| 43 | @export var max_health: int = 100 |
| 44 | @export_range(0, 1) var damage_reduction: float = 0.0 |
| 45 | @export_group("Combat") |
| 46 | @export var attack_damage: int = 10 |
| 47 | @export var attack_cooldown: float = 0.5 |
| 48 | |
| 49 | # Onready (initialized when ready) |
| 50 | @onready var sprite: Sprite2D = $Sprite2D |
| 51 | @onready var animation: AnimationPlayer = $AnimationPlayer |
| 52 | @onready var hitbox: Area2D = $Hitbox |
| 53 | |
| 54 | # Private variables (convention: underscore prefix) |
| 55 | var _health: int |
| 56 | var _can_attack: bool = true |
| 57 | |
| 58 | func _ready() -> void: |
| 59 | _health = max_health |
| 60 | |
| 61 | func _physics_process(delta: float) -> void: |
| 62 | var direction := Input.get_vector("left", "right", "up", "down") |
| 63 | velocity = direction * speed |
| 64 | move_and_slide() |
| 65 | |
| 66 | func take_damage(amount: int) -> void: |
| 67 | var actual_damage := int(amount * (1.0 - damage_reduction)) |
| 68 | _health = max(_health - actual_damage, 0) |
| 69 | health_changed.emit(_health) |
| 70 | |
| 71 | if _health <= 0: |
| 72 | died.emit() |
| 73 | |
| 74 | |
| 75 | ## Detailed patterns and worked examples |
| 76 | |
| 77 | Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. |
| 78 | |
| 79 |
Details
- Updated
- Sep 21, 2026
- License
- MIT
- Stars on the repo
- ★ 39,857
- Checked
- Source
- wshobson/agents ↗
- Creator
- wshobson · 179 listings
Similar skills
See all →
SkillMaster Unity ECS with DOTS, JobsUnity ecs patterns
SkillGame design principles
SkillGame development orchestrator
SkillPC and console game development principlesPc games
SkillWeb browser game development principlesWeb games
MCPImplementing game systems, optimizing graphics renderingGame developerMore from wshobson
SkillMaster C/.NET backend development patterns for building
SkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliance
SkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Design
SkillMigrate from AngularJS to Angular using hybrid modeAngular migration
SkillUnderstand anti-reversing, obfuscationAnti reversing techniques
SkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patterns