Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when creating a new Godot 4.x project — scaffolds recommended directory structure, project settings, autoloads, and .gitignore
.claude/skills/jame581-godot-project-setup/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 132% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 118% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 184% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 50% | 0% |
This skill scaffolds a new Godot 4.3+ project with recommended directory structure, project settings, autoloads, and version control configuration.
> Related skills: scene-organization for structuring scene trees, event-bus for the EventBus autoload pattern, save-load for the SaveManager autoload pattern.
The split layout separates assets, scenes, and scripts into distinct top-level directories. This scales well for medium-to-large projects and makes it easy to find resources by type.
res://
├── assets/
│ ├── audio/
│ │ ├── music/
│ │ └── sfx/
│ ├── fonts/
│ ├── shaders/
│ ├── sprites/
│ │ ├── characters/
│ │ ├── environment/
│ │ └── ui/
│ └── textures/
├── scenes/
│ ├── autoloads/
│ ├── characters/
│ ├── environment/
│ ├── levels/
│ ├── screens/
│ └── ui/
├── scripts/
│ ├── autoloads/
│ ├── characters/
│ ├── components/
│ ├── resources/
│ └── ui/
├── resources/
│ ├── items/
│ ├── levels/
│ └── themes/
└── addons/Why split layout?
assets/** stays separate from scripts/**)..gitattributes binary rules per directory.For solo projects or small teams, keep scenes and scripts together by feature. Easier to move a feature wholesale; harder to apply binary gitattributes rules.
res://
├── assets/
│ ├── audio/
│ ├── fonts/
│ └── textures/
├── entities/
│ ├── player/
│ │ ├── player.tscn
│ │ ├── player.gd # or Player.cs
│ │ └── player_state.gd
│ └── enemy/
│ ├── enemy.tscn
│ └── enemy.gd
├── levels/
│ ├── level_01/
│ │ ├── level_01.tscn
│ │ └── level_01.gd
│ └── main_menu/
│ ├── main_menu.tscn
│ └── main_menu.gd
├── systems/
│ ├── inventory/
│ └── dialogue/
├── autoloads/
├── resources/
└── addons/gitignore# Godot editor data — never commit .godot/ # Export artifacts *.apk *.aab *.ipa *.exe *.x86_64 *.x86_32 *.arm32 *.arm64 *.pck *.zip export/ # C# / Mono build output .mono/ .import/ bin/ obj/ *.csproj.user *.sln.user *.user # IDE and OS files .vs/ .vscode/settings.json .idea/ *.swp .DS_Store Thumbs.db # GodotPrompter (if used in-project) .godot-prompter-cache/
Normalize line endings for text files and mark binary assets so Git does not attempt text diffs on them.
gitattributes# Default: normalize line endings to LF on commit * text=auto eol=lf # Godot-specific text files *.gd text eol=lf *.gdshader text eol=lf *.gdshaderinc text eol=lf *.tscn text eol=lf *.tres text eol=lf *.godot text eol=lf *.cfg text eol=lf *.import text eol=lf # C# source *.cs text eol=lf *.csproj text eol=lf *.sln text eol=lf # Binary assets — no diff, no merge, no EOL conversion *.png binary *.jpg binary *.jpeg binary *.webp binary *.svg binary *.psd binary *.aseprite binary *.wav binary *.ogg binary *.mp3 binary *.ttf binary *.otf binary *.woff binary *.woff2 binary *.glb binary *.gltf binary *.blend binary *.fbx binary *.mp4 binary *.ogv binary
Configure these in Project > Project Settings or directly in project.godot.
| Setting | Recommended value | Notes | |---|---|---| | display/window/size/viewport_width | 1920 | Base resolution — art reference size | | display/window/size/viewport_height | 1080 | | | display/window/stretch/mode | canvas_items | Scales 2D content; use viewport for pixel-perfect | | display/window/stretch/aspect | keep | Adds letterbox/pillarbox; expand fills screen | | display/window/size/resizable | true | Allow window resize on desktop |
For pixel-art projects use stretch/mode = viewport and texture_filter = nearest on the root CanvasItem or globally via rendering/textures/canvas_textures/default_texture_filter.
> Godot 4.7+: Projects newly created in Godot 4.7 already default display/window/stretch/mode to canvas_items and display/window/stretch/aspect to expand (previously disabled / keep), so only aspect needs changing if you want keep's letterboxing. Projects created on older versions keep their existing values — set both explicitly when upgrading.
Define actions in Project > Project Settings > Input Map rather than hard-coding key constants. This lets players rebind controls at runtime.
GDScript — reading input actions:
gdscript# Good: action-based (rebindable) func _process(delta: float) -> void: var direction := Input.get_axis("move_left", "move_right") if Input.is_action_just_pressed("jump"): _jump() # Avoid: hard-coded key checks func _input(event: InputEvent) -> void: if event is InputEventKey and event.keycode == KEY_SPACE: _jump()
C# — reading input actions:
csharp// Good: action-based (rebindable) public override void _Process(double delta) { float direction = Input.GetAxis("move_left", "move_right"); if (Input.IsActionJustPressed("jump")) Jump(); } // Avoid: hard-coded key checks public override void _Input(InputEvent @event) { if (@event is InputEventKey key && key.Keycode == Key.Space) Jump(); }
Saving and restoring custom bindings at runtime (GDScript):
gdscriptfunc save_bindings() -> void: var config := ConfigFile.new() for action in InputMap.get_actions(): if action.begins_with("ui_"): continue # skip built-in UI actions var events := InputMap.action_get_events(action) config.set_value("bindings", action, events) config.save("user://bindings.cfg") func load_bindings() -> void: var config := ConfigFile.new() if config.load("user://bindings.cfg") != OK: return for action in config.get_section_keys("bindings"): InputMap.action_erase_events(action) for event in config.get_value("bindings", action): InputMap.action_add_event(action, event)
Saving and restoring custom bindings at runtime (C#):
csharppublic void SaveBindings() { var config = new ConfigFile(); foreach (StringName action in InputMap.GetActions()) { if (((string)action).StartsWith("ui_")) continue; // skip built-in UI actions var events = InputMap.ActionGetEvents(action); config.SetValue("bindings", action, events); } config.Save("user://bindings.cfg"); } public void LoadBindings() { var config = new ConfigFile(); if (config.Load("user://bindings.cfg") != Error.Ok) return; foreach (string action in config.GetSectionKeys("bindings")) { InputMap.ActionEraseEvents(action); var events = (Godot.Collections.Array)config.GetValue("bindings", action); foreach (InputEvent @event in events) InputMap.ActionAddEvent(action, @event); } }
Register autoloads in Project > Project Settings > Autoload. Autoloads are singleton nodes available globally via their registered name.
| Name | Path | Purpose | |---|---|---| | GameManager | autoloads/game_manager.gd | Game state, scene transitions, pause | | EventBus | autoloads/event_bus.gd | Decoupled signal relay | | AudioManager | autoloads/audio_manager.gd | Music, SFX, volume control | | SaveManager | autoloads/save_manager.gd | Save/load game data |
Keep autoloads small. Move logic into standalone classes and call them from the autoload.
gdscript# autoloads/game_manager.gd extends Node signal scene_changed(scene_path: String) signal game_paused(is_paused: bool) var current_level: String = "" var is_paused: bool = false func change_scene(path: String) -> void: current_level = path scene_changed.emit(path) get_tree().change_scene_to_file(path) func set_paused(paused: bool) -> void: is_paused = paused get_tree().paused = paused game_paused.emit(paused) func quit_game() -> void: get_tree().quit()
csharp// autoloads/GameManager.cs using Godot; public partial class GameManager : Node { [Signal] public delegate void SceneChangedEventHandler(string scenePath); [Signal] public delegate void GamePausedEventHandler(bool isPaused); public string CurrentLevel { get; private set; } = ""; public bool IsPaused { get; private set; } public void ChangeScene(string path) { CurrentLevel = path; EmitSignal(SignalName.SceneChanged, path); GetTree().ChangeSceneToFile(path); } public void SetPaused(bool paused) { IsPaused = paused; GetTree().Paused = paused; EmitSignal(SignalName.GamePaused, paused); } public void QuitGame() => GetTree().Quit(); }
gdscript# autoloads/event_bus.gd extends Node # Declare all cross-system signals here. # Systems emit to EventBus; listeners connect to EventBus. signal player_died signal item_collected(item_id: String, quantity: int) signal score_changed(new_score: int) signal level_completed(level_id: String)
Nodes connect with:
gdscriptEventBus.player_died.connect(_on_player_died) EventBus.player_died.emit()
When you enable C# support Godot generates a .csproj. Keep it minimal and set the target framework to net8.0:
xml<Project Sdk="Godot.NET.Sdk/4.3.0"> <PropertyGroup> <TargetFramework>net8.0</TargetFramework> <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net8.0</TargetFramework> <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework> <Nullable>enable</Nullable> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <RootNamespace>MyGame</RootNamespace> </PropertyGroup> </Project>
Replace MyGame with your project name. The namespace must match across all C# scripts to avoid registration errors.
Every C# class that extends a Godot type must be declared partial. Godot's source generator adds the registration code in a companion partial file.
csharp// Correct public partial class Player : CharacterBody2D { } // Wrong — will not register with Godot public class Player : CharacterBody2D { }
Use a single root namespace for the project. Sub-namespaces are optional but keep them shallow:
csharpnamespace MyGame.Characters; // OK namespace MyGame.UI; // OK namespace MyGame.Systems.Inventory.Data.Containers; // Too deep — flatten
Signals must use the [Signal] attribute with a delegate ending in EventHandler:
csharp[Signal] public delegate void HealthChangedEventHandler(int newHealth, int maxHealth); // Emit EmitSignal(SignalName.HealthChanged, health, maxHealth); // Connect someNode.HealthChanged += OnHealthChanged; // Disconnect someNode.HealthChanged -= OnHealthChanged;
Use this checklist after scaffolding a new project to verify everything is in place.
assets/, scenes/, scripts/ or co-located layout).gitignore created and includes .godot/, .mono/, bin/, obj/.gitattributes created with LF normalization and binary asset rulesproject.godot — viewport resolution set (1920x1080 or project target)project.godot — stretch mode configured (canvas_items or viewport)GameManager, EventBus, AudioManager, SaveManagerautoloads/ (or scripts/autoloads/)Always if they must run while paused.csproj targets net8.0, RootNamespace set, Nullable enabledpartial classmain branch before adding game contentCLAUDE.md, or AGENTS.md / GEMINI.md if that is what the repo maintains) contains a ## GodotPrompter section with the skill invocation rule (see godot-prompter:godot-brainstorming for content)godot --headless --check-only on GDScript files| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | pass→pass | 10,400 | 6,039 | -42% | 1 | 1 | 0% | 1,623 | 4,602 | +184% | 0 | 0 | — |
case-01 | fail→pass | 17,693 | 6,499 | -63% | 1 | 1 | 0% | 3,111 | 4,836 | +55% | 0 | 0 | — |
case-02 | pass→pass | 18,306 | 7,254 | -60% | 1 | 1 | 0% | 3,338 | 4,991 | +50% | 0 | 0 | — |
case-03 | pass→pass | 18,494 | 8,789 | -52% | 1 | 1 | 0% | 3,476 | 5,409 | +56% | 0 | 0 | — |
case-05 | pass→pass | 14,017 | 9,862 | -30% | 1 | 1 | 0% | 2,435 | 5,373 | +121% | 0 | 0 | — |
case-06 | pass→pass | 7,909 | 3,735 | -53% | 1 | 1 | 0% | 1,356 | 4,155 | +206% | 0 | 0 | — |
case-07 | pass→pass | 8,098 | 5,515 | -32% | 1 | 1 | 0% | 1,392 | 4,524 | +225% | 0 | 0 | — |
case-08 | pass→pass | 9,639 | 3,996 | -59% | 1 | 1 | 0% | 1,522 | 4,190 | +175% | 0 | 0 | — |
case-09 | pass→pass | 6,959 | 3,129 | -55% | 1 | 1 | 0% | 1,151 | 4,088 | +255% | 0 | 0 | — |
case-10 | pass→pass | 13,350 | 5,916 | -56% | 1 | 1 | 0% | 2,330 | 4,666 | +100% | 0 | 0 | — |
case-11 | pass→pass | 13,262 | 10,697 | -19% | 1 | 1 | 0% | 2,589 | 5,303 | +105% | 0 | 0 | — |
case-12 | pass→pass | 10,934 | 4,118 | -62% | 1 | 1 | 0% | 1,753 | 4,299 | +145% | 0 | 0 | — |
case-13 | pass→pass | 16,794 | 12,851 | -23% | 1 | 1 | 0% | 2,782 | 5,787 | +108% | 0 | 0 | — |
case-14 | pass→pass | 10,948 | 9,224 | -16% | 1 | 1 | 0% | 1,917 | 5,291 | +176% | 0 | 0 | — |
case-15 | pass→pass | 13,965 | 13,198 | -5% | 1 | 1 | 0% | 2,353 | 6,267 | +166% | 0 | 0 | — |
case-16 | pass→pass | 3,863 | 2,686 | -30% | 1 | 1 | 0% | 576 | 3,999 | +594% | 0 | 0 | — |
case-17 | fail→pass | 12,276 | 5,012 | -59% | 1 | 1 | 0% | 1,951 | 4,526 | +132% | 0 | 0 | — |
case-18 | pass→pass | 7,573 | 6,096 | -20% | 1 | 1 | 0% | 1,298 | 4,631 | +257% | 0 | 0 | — |
case-19 | pass→pass | 4,428 | 3,599 | -19% | 1 | 1 | 0% | 740 | 4,198 | +467% | 0 | 0 | — |
case-20 | pass→pass | 15,477 | 6,618 | -57% | 1 | 1 | 0% | 2,404 | 4,583 | +91% | 0 | 0 | — |
case-21 | pass→pass | 12,977 | 6,908 | -47% | 1 | 1 | 0% | 2,420 | 4,899 | +102% | 0 | 0 | — |
case-22 | fail→pass | 13,276 | 4,854 | -63% | 1 | 1 | 0% | 2,003 | 4,374 | +118% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.