---
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."
risk: safe
source: community
date_added: "2026-02-27"
---

# Godot GDScript Patterns

Production patterns for Godot 4.x game development with GDScript, covering architecture, signals, scenes, and optimization.

## Use this skill when

- Building games with Godot 4
- Implementing game systems in GDScript
- Designing scene architecture
- Managing game state
- Optimizing GDScript performance
- Learning Godot best practices

## Do not use this skill when

- The task is unrelated to godot gdscript patterns
- You need a different domain or tool outside this scope

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open `resources/implementation-playbook.md`.

## Resources

- `resources/implementation-playbook.md` for detailed patterns and examples.

## Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Playbook samples are separate-file fragments; supply Input Map actions, scene nodes, Player/State subclasses, `die()` and other project-specific helpers before use. The pool requires a CanvasItem-compatible scene root and explicit physics/collision reset: disabling processing/visibility does not prevent every signal callback, so inactive objects must reject hits. Validate initial states and guard asynchronous scene loads/transitions against duplicate requests. Save files require schema/version/range validation and atomic replacement; a hardcoded encryption key in a distributed game is extractable and cannot protect secrets or establish anti-cheat trust. Check save/open/delete failures. Pin the Godot version and use the profiler before claiming gains. See [Godot pause/process modes](https://docs.godotengine.org/en/stable/tutorials/scripting/pausing_games.html).


---
Source attribution: wshobson
Original project: https://github.com/wshobson/agents
License: CC-BY-4.0
License information: https://creativecommons.org/licenses/by/4.0/
Original upstream instructions; downloaded from Mega AI Hub.


# Mega AI Hub resource metadata

Creator / publisher: wshobson
Original project: https://github.com/wshobson/agents
Attribution basis: Historical import commit and explicit upstream port attribution

Fields of work: Development & Engineering
Roles: Game Developer
Specialties: Specialty not specified
Tools: Tool not specified
Country applicability: Country not specified
Classification basis: Dave AI task classification from package title, description, and declared metadata
Instruction SHA-256: ba0c116a09f081ed69bc74e574e6900816e225053916ba46b0ee0d6ad7e51707
Metadata reviewed: 2026-10-27
This metadata supersedes earlier Mega AI Hub catalog attribution. Original instruction and supporting files are preserved.
