godot-gdscript-patterns

godot-gdscript-patterns is a skill for Claude Code, Codex from hamzabellouch/agent-skills. It costs 53 tokens per session (2,125 once invoked), scanned A, original, MIT.

A guide to structuring Godot 4 games with GDScript or C#. It explains how to compose reusable game objects, store game data, connect events, manage memory, and profile performance.

In plain words
What is it for?
Use it when designing Godot game systems such as player components, state machines, inventories, save data, events, or performance-sensitive engine code.
Why use it?
It helps prevent tightly coupled game code, deep inheritance trees, unnecessary memory use, and frame-rate problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is get_node("../UI/Label").text = str(score).

Good fit Use it when designing Godot game systems such as player components, state machines, inventories, save data, events, or performance-sensitive engine code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hamzabellouch/agent-skills
agentmods
npx agentmods add skills/hamzabellouch/agent-skills/godot-gdscript-patterns

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for godot-gdscript-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/godot-gdscript-patterns.svg)](https://agentmods.dev/skills/hamzabellouch/agent-skills/godot-gdscript-patterns)
Your own site
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/godot-gdscript-patterns"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/godot-gdscript-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,125 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.02125
Opus 5 $0.00026 $0.01063
Sonnet 5 $0.00011 $0.00425
Haiku 4.5 $0.00005 $0.00213

Measured 4d ago against content hash 2559d3d67356, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

godot-gdscript-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Game Development and Interactive 3D/godot-gdscript-patterns/SKILL.md · 260 lines

How it starts

The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Godot Engine 4.x GDScript Architecture & Patterns

This skill guide provides production-grade architectural patterns, memory management protocols, Node composition strategies, frame budget optimizations, and direct Server API patterns for Godot Engine 4.x applications using GDScript.


1. Architectural Patterns & Node Composition

1.1 Composition over Inheritance (Node Pattern)

In Godot 4.x, avoid deep class inheritance trees (CharacterBody3D -> LivingEntity -> Humanoid -> Player). Instead, use small, modular, self-contained Node components attached to entity roots:

Player (CharacterBody3D)
├── HealthComponent (Node)
├── HitboxComponent (Area3D)
├── InventoryComponent (Node)
└── StateMachine (Node)
    ├── IdleState (Node)
    └── MoveState (Node)

1.2 Custom Resource-Driven Architecture

Godot Resource objects represent scriptable data containers. Leverage Resources for:

  • Shared immutable configuration (Item definitions, Ability stats).
  • Decoupled state persistence (Save games, UI models).
  • Modular behavior strategies (Custom AI behavior algorithms passed as Resource references).

1.3 Signal Bus Pattern (Global Event Conduit)

Decouple disparate systems (e.g., Combat System triggering UI Score Updates) using an Autoload Signal Bus rather than direct node references.

[ Combat System ] ---> emits signal ---> [ Global SignalBus (Autoload) ]
                                                    |
                                                    v
                                         [ UI Score Display Listener ]

2. Memory Management & Lifecycle Protocols

2.1 Object Types: RefCounted vs. Node / Object

Class Type Memory Strategy Lifecycle Method Allocation Overhead
RefCounted Automatic Reference Counting Replaced when reference count hits zero. Very Low
Node / Object Manual Garbage Management Must call queue_free() or free(). High (Node tree overhead)

Read the full file on GitHub · 260 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 260 lines · 53 tokens per session scan A 2559d3d67356

Subscribe to this mod's changes

godot-gdscript-patterns is a skill published in the GitHub repository hamzabellouch/agent-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 2,125 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

godot-csharp

Use C#/.NET in Godot 4.7: partial classes extending nodes, the PascalCase lifecycle (Ready/Process/PhysicsProcess), [Export] fields, [Signal] delegates as C# events, type-safe node lookup, and calling between C# and GDScript. Use when writing Godot game code in C# (.cs files, .csproj), needing the Godot .NET build…

gamedev-skills/awesome-gamedev-agent-skills · 108 tokens

unity-csharp-scripting

Write Unity 6.3 LTS C# gameplay scripts: the MonoBehaviour lifecycle (Awake/OnEnable/Start/Update/FixedUpdate/LateUpdate), GameObject and component access, coroutines, and Inspector serialization. Use when creating or editing .cs scripts in a Unity project, or when the user mentions MonoBehaviour, Start/Update…

gamedev-skills/awesome-gamedev-agent-skills · 92 tokens

unity-vrc-udon-sharp

UdonSharp scripting skill for VRChat SDK 3.10.5 (active and verified target). Use when writing, reviewing, debugging, or migrating UdonSharp C# and UdonBehaviour code. Positive triggers include UdonSharp, NetworkCallable, NetworkCalling, CallingPlayer, Udon network authorization, synced runtime state, a local public…

niaka3dayo/agent-skills-vrc-udon · 184 tokens

refactoring-csharp

Rename and refactor C# symbols in a .NET solution or multi-solution monorepo with a one-shot Roslyn CLI. Use when the user asks to rename a symbol, preview impact, update references across a solution, or refactor shared projects across several solutions.

CodeAlive-AI/ai-driven-development · 60 tokens

unity-csharp-editing

Use when creating or changing Unity C# files, preflighting code, waiting for compilation, writing focused tests, or renaming serialized fields.

german-krasnikov/unity-biome-mcp · 35 tokens

godot-prompter-csharp-godot

Imported GodotPrompter guidance for csharp-godot workflows in game development projects.

bgrenat/godot-game-dev-studio · 30 tokens