wshobson avatar

Godot Gdscript Patterns

Solid patterns for anyone building games in Godot 4 who wants to write maintainable GDScript instead of spaghetti code. Shows you proper state machine architecture, signal-based communication, and resource management patterns that actually scale beyond prototypes. The autoload singleton examples are especially useful for game managers and event buses. Covers the specific GDScript syntax you need like @export decorators, @onready variables, and proper typing. If you're coming from other engines or just starting with Godot, this will save you from common architectural mistakes that make refactoring painful later.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
39
skills.sh installs
18.3K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill godot-gdscript-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Sponsors

Details

Repository
github.com/wshobson/agents
Category
Game Development

More from wshobson/agents

All 174
1github avatargame-enginegithub/awesome-copilotExpert skill for building web-based game engines and games using HTML5, Canvas, WebGL, and JavaScript. Use when asked to create games, build game engines, imple13.4Kskills.sh installs
2jwynia avatargodot-best-practicesjwynia/agent-skillsGuide AI agents through Godot 4.x GDScript coding best practices including scene organization, signals, resources, state machines, and performance optimization.2.1Kskills.sh installs
3mindrally avatarunitymindrally/skillsExpert in Unity and C# game development with performance optimization patterns946skills.sh installs
4mindrally avatargame-developmentmindrally/skillsExpert guidance for game development with C#/Unity, Lua scripting, and best practices for scalable game architecture914skills.sh installs
5zate avatargodot-optimizationzate/cc-godotExpert knowledge of Godot performance optimization, profiling, bottleneck identification, and optimization techniques. Use when helping improve game performance725skills.sh installs
6eachlabs avatargame-asset-generationeachlabs/skillsGenerate game art assets using each::sense AI. Create 2D sprites, character sprite sheets, seamless textures, UI elements, icons, tilesets, loading screens, log586skills.sh installs