Godot Gdscript Patterns
925236118/AlphaAgent
Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.
A skill your agent uses when designing scene tree structure — composition vs inheritance, when to split scenes, node hierarchy patterns
$ npx skills add jame581/GodotPrompter --skill scene-organization -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jame581/GodotPrompter scene-organization --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/scene-organization .claude/skills/scene-organization && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "scene-organization" agent skill from https://github.com/jame581/GodotPrompter/tree/master/skills/scene-organization into .claude/skills/scene-organization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "scene-organization", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jame581/GodotPrompter/tree/master/skills/scene-organizationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jame581/GodotPrompter --skill scene-organization -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jame581/GodotPrompter scene-organization --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/scene-organization .agents/skills/scene-organization && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "scene-organization" agent skill from https://github.com/jame581/GodotPrompter/tree/master/skills/scene-organization into .agents/skills/scene-organization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "scene-organization", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jame581/GodotPrompter --skill scene-organization -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jame581/GodotPrompter scene-organization --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/scene-organization .cursor/skills/scene-organization && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "scene-organization" agent skill from https://github.com/jame581/GodotPrompter/tree/master/skills/scene-organization into .cursor/skills/scene-organization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "scene-organization", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jame581/GodotPrompter.git --path skills/scene-organization--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jame581/GodotPrompter --skill scene-organization -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jame581/GodotPrompter scene-organization --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/scene-organization .gemini/skills/scene-organization && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "scene-organization" agent skill from https://github.com/jame581/GodotPrompter/tree/master/skills/scene-organization into .gemini/skills/scene-organization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "scene-organization", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jame581/GodotPrompter scene-organizationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jame581/GodotPrompter --skill scene-organization -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/scene-organization .github/skills/scene-organization && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "scene-organization" agent skill from https://github.com/jame581/GodotPrompter/tree/master/skills/scene-organization into .github/skills/scene-organization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "scene-organization", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jame581/GodotPrompter --skill scene-organization -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jame581/GodotPrompter scene-organization --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/scene-organization .opencode/skills/scene-organization && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "scene-organization" agent skill from https://github.com/jame581/GodotPrompter/tree/master/skills/scene-organization into .opencode/skills/scene-organization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "scene-organization", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
scene-organizationA skill your agent uses when designing scene tree structure — composition vs inheritance, when to split scenes, node hierarchy patterns
Scene Organization is an agent skill from jame581/GodotPrompter. Use when designing scene tree structure — composition vs inheritance, when to split scenes, node hierarchy patterns
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Game Development, covering Game development. It works with Godot. The repository describes itself as: Agentic skills framework for Godot 4.x. Domain-specific skills for AI coding agents (Claude Code, Copilot, Antigravity, Cursor). The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 1e7d79d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript and csharp).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Scene Organization loads about 2.5k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 676 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jame581/GodotPrompter at commit 1e7d79d, republished under its MIT licence (© jame581). 676 words, ~2,533 tokens.
.claude/skills/scene-organization/SKILL.md (or your agent's skills folder).A guide for structuring Godot 4.3+ scene trees: when to split, when to compose, and how nodes should communicate.
Related skills: component-system for composition patterns, event-bus for decoupled communication, godot-brainstorming for scene tree planning, 2d-essentials for TileMapLayer and CanvasLayer organization.
Scenes are building blocks. Each scene encapsulates exactly one concept — a player, an enemy, a health bar, a weapon. A scene should be understandable in isolation, reusable without modification, and replaceable without breaking its neighbors.
One scene = one responsibility. If you struggle to name a scene in two words or fewer, it is probably doing too much.
Player (CharacterBody2D)
├── Sprite2D
├── CollisionShape2D
├── HealthComponent
├── HitboxComponent
├── StateMachine
└── AnimationPlayerHealthComponent, HitboxComponent, and StateMachine are separate .tscn files instantiated as child scenes. Any entity that needs health — enemy, destructible crate, boss — can include HealthComponent without duplicating logic.
GDScript
# health_component.gd
class_name HealthComponent
extends Node
signal health_changed(old_value: int, new_value: int)
signal died
@export var max_health: int = 100
var current_health: int
func _ready() -> void:
current_health = max_health
func take_damage(amount: int) -> void:
if amount <= 0:
return
var old_health := current_health
current_health = max(0, current_health - amount)
health_changed.emit(old_health, current_health)
if current_health == 0:
died.emit()
func heal(amount: int) -> void:
if amount <= 0:
return
var old_health := current_health
current_health = min(max_health, current_health + amount)
health_changed.emit(old_health, current_health)
func is_alive() -> bool:
return current_health > 0C#
// HealthComponent.cs
using Godot;
[GlobalClass]
public partial class HealthComponent : Node
{
[Signal]
public delegate void HealthChangedEventHandler(int oldValue, int newValue);
[Signal]
public delegate void DiedEventHandler();
[Export]
public int MaxHealth { get; set; } = 100;
public int CurrentHealth { get; private set; }
public override void _Ready()
{
CurrentHealth = MaxHealth;
}
public void TakeDamage(int amount)
{
if (amount <= 0)
return;
int oldHealth = CurrentHealth;
CurrentHealth = Mathf.Max(0, CurrentHealth - amount);
EmitSignal(SignalName.HealthChanged, oldHealth, CurrentHealth);
if (CurrentHealth == 0)
EmitSignal(SignalName.Died);
}
public void Heal(int amount)
{
if (amount <= 0)
return;
int oldHealth = CurrentHealth;
CurrentHealth = Mathf.Min(MaxHealth, CurrentHealth + amount);
EmitSignal(SignalName.HealthChanged, oldHealth, CurrentHealth);
}
public bool IsAlive() => CurrentHealth > 0;
}Inheritance suits cases where scenes share structure, not just behavior — when child scenes are variations of the same thing with identical node layout and only a few exported properties differ.
Good candidates:
Enemy → Orc, Goblin — same bones (Sprite2D, CollisionShape2D, HealthComponent, AI), different stats and artWeapon → Sword, Bow — same slot attachment logic, different animations and damage typePickup → HealthPickup, AmmoPickup — same Area2D + CollisionShape2D + animation, different effect on collection| Scenario | Pattern |
|---|---|
| You would copy-paste the entire scene and change a few exported properties | Inheritance |
| You want to mix and match a subset of nodes across different entity types | Composition |
.tscn file [Parent]
/ \
[Child A] [Child B]
\
[Child C]A child node announces that something happened. The parent — or any node that has connected to the signal — decides what to do about it. This keeps children ignorant of their context and fully reusable.
# Child emits; it does not know who is listening
health_component.died.connect(_on_player_died)A parent drives its children by calling their methods directly. The parent owns the reference; the child exposes a clean API and does not need to know about its parent.
# Parent calls into child
$HealthComponent.take_damage(10)
$AnimationPlayer.play("hurt")For communication between scenes that have no ancestor–descendant relationship — e.g., an enemy notifying the HUD — use an Autoload event bus. Emitting on the bus decouples sender from receiver entirely.
# Autoload: EventBus.gd
signal enemy_killed(enemy: Enemy)
# Enemy scene
EventBus.enemy_killed.emit(self)
# HUD scene
EventBus.enemy_killed.connect(_on_enemy_killed)C#
// Pattern 1: Signals travel up (child → parent)
// Child emits; it does not know who is listening.
public partial class Player : CharacterBody2D
{
public override void _Ready()
{
var health = GetNode<HealthComponent>("HealthComponent");
health.Died += OnPlayerDied;
}
private void OnPlayerDied()
{
// Parent reacts — child HealthComponent stays ignorant of context
}
}
// Pattern 2: Method calls travel down (parent → child)
// Parent drives children by calling their methods directly.
public partial class Level : Node2D
{
public override void _Ready()
{
var health = GetNode<HealthComponent>("Player/HealthComponent");
health.TakeDamage(10);
var anim = GetNode<AnimationPlayer>("Player/AnimationPlayer");
anim.Play("hurt");
}
}
// Pattern 3: EventBus travels sideways (peer → peer)
// EventBus.cs — registered as an Autoload singleton named "EventBus"
public partial class EventBus : Node
{
[Signal] public delegate void EnemyKilledEventHandler(Enemy enemy);
}
// Enemy scene — emits on the bus; does not reference HUD
public partial class Enemy : CharacterBody2D
{
private void Die()
{
var bus = GetNode<EventBus>("/root/EventBus");
bus.EmitSignal(EventBus.SignalName.EnemyKilled, this);
QueueFree();
}
}
// HUD scene — subscribes on the bus; does not reference Enemy
public partial class Hud : CanvasLayer
{
public override void _Ready()
{
var bus = GetNode<EventBus>("/root/EventBus");
bus.EnemyKilled += OnEnemyKilled;
}
private void OnEnemyKilled(Enemy enemy)
{
// Update kill counter, score, etc.
}
}Enemy (CharacterBody2D)
├── Visuals
│ ├── Sprite2D
│ └── AnimationPlayer
├── Collision
│ └── CollisionShape2D
├── Components
│ ├── HealthComponent
│ └── HitboxComponent
└── AI
├── NavigationAgent2D
└── StateMachineGroup by concern using plain Node containers (Visuals, Collision, Components, AI). Each sub-group can be collapsed in the editor and worked on independently.
HUD (CanvasLayer)
├── MarginContainer
│ ├── TopBar
│ │ ├── HealthBar
│ │ └── ResourceBar
│ └── BottomBar
│ ├── Hotbar
│ └── MiniMap
└── PauseMenuCanvasLayer ensures HUD elements are always rendered on top. MarginContainer handles safe-area padding. TopBar, BottomBar, and PauseMenu are separate instantiated scenes so each can be edited without opening the root HUD scene.
Level01 (Node2D)
├── TileMapLayer
├── Entities
│ ├── Player (instance)
│ └── Enemies (Node2D)
│ ├── Orc (instance)
│ └── Goblin (instance)
├── Pickups (Node2D)
├── Navigation
│ └── NavigationRegion2D
└── Camera2DThe level scene is a composition root — it owns the layout and spawns instances, but contains no gameplay logic itself. Entities, Pickups, and Navigation are plain Node2D containers used for organizational grouping and to simplify get_children() iteration.
HealthComponent, StateMachine, etc.) are separate .tscn filesget_parent() chainsget_parent().get_parent() or get_node("../../SomeNode") paths in codeVisuals, Components, AI, etc.) for readability© jame581, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/scene-organization of jame581/GodotPrompter.
Open the folder on GitHubat commit 1e7d79d
Scene Organization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Scene Organization this skilljame581/GodotPrompter | 805 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Godot Gdscript Patterns925236118/AlphaAgent | 103 | 10 repos | ~5k | Automated safety check: Pass | MIT | |
| 2D Map and Scene Generator0x0funky/agent-sprite-forge | 4.4k | — | ~2.9k | Automated safety check: Pass | MIT | |
| Godot UI Integrationzimo-xiao-zheng/godot-ui-integration | 285 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Godot Wechat Minigame Adaptergodothub/godot-minigame | 187 | — | ~1.5k | Automated safety check: Pass | MIT | |
| AI Game Art Pipelineybuild-ai/ai-game-art-pipeline-skill | 297 | — | ~1.1k | Automated safety check: Pass | MIT |
925236118/AlphaAgent
Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.
0x0funky/agent-sprite-forge
Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.
zimo-xiao-zheng/godot-ui-integration
Build or revise Godot UI from an approved design, separated art, or a visual reference when scene structure, gameplay binding, and runtime visual verification all matter.
godothub/godot-minigame
Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout.
ybuild-ai/ai-game-art-pipeline-skill
Provider-neutral open-source skill for planning and producing game-runtime art assets and animation: static props/icons, canonical character sheets, combat sprites, 3D/video motion references…
RandallLiuXin/GodotMaker
Runtime debugging and live project inspection via godot-mcp.
jame581/GodotPrompter
Covers Godot 4.3+ 2D systems with GDScript and C# examples: canvas layers, draw order, TileMaps, parallax, lights and shadows, particles and custom drawing.
jame581/GodotPrompter
Covers Godot 4.3+ 3D systems such as materials, lighting, shadows, environment, global illumination, fog, LOD, occlusion culling and decals, with GDScript first and C# second.
jame581/GodotPrompter
Builds a data-driven ability system in Godot 4 from Resources and a component node, with cooldowns, buffs, stat modifiers, gameplay tags and HUD binding.
jame581/GodotPrompter
Covers Godot 4.3+ editor plugins: plugin folders, @tool scripts, the EditorPlugin lifecycle, custom inspectors, dock panels and gizmos, in GDScript and C#.
jame581/GodotPrompter
Covers pathfinding and enemy movement in Godot 4.3 and later: navigation regions, NavigationAgent nodes, steering, behavior trees and patrol routes.
jame581/GodotPrompter
Covers animation in Godot 4.3 and later: AnimationPlayer basics, AnimationTree blend trees and state machines, sprite animation, skeleton IK and code-driven motion.
Works with
Categories
A skill your agent uses when designing scene tree structure — composition vs inheritance, when to split scenes, node hierarchy patterns. Scene Organization is an agent skill from jame581/GodotPrompter.
Scene Organization fits situations like: designing scene tree structure — composition vs inheritance; to split scenes; Node hierarchy patterns.
Run `npx skills add jame581/GodotPrompter --skill scene-organization -a claude-code`. Or copy the skill folder (skills/scene-organization in jame581/GodotPrompter) into .claude/skills/scene-organization in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jame581/GodotPrompter --skill scene-organization -a codex`. Or copy the skill folder (skills/scene-organization in jame581/GodotPrompter) into .agents/skills/scene-organization in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jame581/GodotPrompter --skill scene-organization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scene-organization, .gemini/skills/scene-organization, .github/skills/scene-organization and .opencode/skills/scene-organization in your project.
SKILL.md names no scripts, command-line tools or credentials: Scene Organization is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Scene Organization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Scene Organization: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars), Godot UI Integration (zimo-xiao-zheng/godot-ui-integration, 285 stars) and Godot Wechat Minigame Adapter (godothub/godot-minigame, 187 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jame581 (a GitHub user) maintains it in jame581/GodotPrompter, which has 805 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 9, 2026.
Source: jame581/GodotPrompter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.