[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KRAE7EXTREKYZ9XPWAAZCZ":3,"skill-same:01M6KRAE7EXTREKYZ9XPWAAZCZ":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M6KRAE7EXTREKYZ9XPWAAZCZ","godot-project-setup",null,"Use when creating a new Godot 4.x project — scaffolds recommended directory structure, project settings, autoloads, and .gitignore","jame581\u002FGodotPrompter","jame581","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21112138?v=4","01M6KR3KEQ9Z30WVJRR2E2ZVXE","Jan Mesarč","01M6KR3KJVRMPDSMASQPBCBVK3",964,"MIT","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-project-setup\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"project","godot project setup","project setup","setup","godot","gitignore","use","project settings","structure","scaffolds","directory","settings","godot 4","new","when","2026-11-10 10:12:30",false,"---\nname: godot-project-setup\ndescription: Use when creating a new Godot 4.x project — scaffolds recommended directory structure, project settings, autoloads, and .gitignore\n---\n\n# Godot Project Setup\n\nThis skill scaffolds a new Godot 4.3+ project with recommended directory structure, project settings, autoloads, and version control configuration.\n\n> **Related skills:** **scene-organization** for structuring scene trees, **event-bus** for the EventBus autoload pattern, **save-load** for the SaveManager autoload pattern.\n\n## Recommended Directory Structure (Split Layout)\n\nThe 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.\n\n```\nres:\u002F\u002F\n├── assets\u002F\n│   ├── audio\u002F\n│   │   ├── music\u002F\n│   │   └── sfx\u002F\n│   ├── fonts\u002F\n│   ├── shaders\u002F\n│   ├── sprites\u002F\n│   │   ├── characters\u002F\n│   │   ├── environment\u002F\n│   │   └── ui\u002F\n│   └── textures\u002F\n├── scenes\u002F\n│   ├── autoloads\u002F\n│   ├── characters\u002F\n│   ├── environment\u002F\n│   ├── levels\u002F\n│   ├── screens\u002F\n│   └── ui\u002F\n├── scripts\u002F\n│   ├── autoloads\u002F\n│   ├── characters\u002F\n│   ├── components\u002F\n│   ├── resources\u002F\n│   └── ui\u002F\n├── resources\u002F\n│   ├── items\u002F\n│   ├── levels\u002F\n│   └── themes\u002F\n└── addons\u002F\n```\n\n**Why split layout?**\n- Assets managed by artists can be updated without touching script directories.\n- Glob patterns in export presets are simpler (`assets\u002F**` stays separate from `scripts\u002F**`).\n- Easier to configure `.gitattributes` binary rules per directory.\n- Scales to teams where artists and programmers work in different areas.\n\n## Alternative: Co-Located Structure\n\nFor solo projects or small teams, keep scenes and scripts together by feature. Easier to move a feature wholesale; harder to apply binary `gitattributes` rules.\n\n```\nres:\u002F\u002F\n├── assets\u002F\n│   ├── audio\u002F\n│   ├── fonts\u002F\n│   └── textures\u002F\n├── entities\u002F\n│   ├── player\u002F\n│   │   ├── player.tscn\n│   │   ├── player.gd          # or Player.cs\n│   │   └── player_state.gd\n│   └── enemy\u002F\n│       ├── enemy.tscn\n│       └── enemy.gd\n├── levels\u002F\n│   ├── level_01\u002F\n│   │   ├── level_01.tscn\n│   │   └── level_01.gd\n│   └── main_menu\u002F\n│       ├── main_menu.tscn\n│       └── main_menu.gd\n├── systems\u002F\n│   ├── inventory\u002F\n│   └── dialogue\u002F\n├── autoloads\u002F\n├── resources\u002F\n└── addons\u002F\n```\n\n## .gitignore\n\n```gitignore\n# Godot editor data — never commit\n.godot\u002F\n\n# Export artifacts\n*.apk\n*.aab\n*.ipa\n*.exe\n*.x86_64\n*.x86_32\n*.arm32\n*.arm64\n*.pck\n*.zip\nexport\u002F\n\n# C# \u002F Mono build output\n.mono\u002F\n.import\u002F\nbin\u002F\nobj\u002F\n*.csproj.user\n*.sln.user\n*.user\n\n# IDE and OS files\n.vs\u002F\n.vscode\u002Fsettings.json\n.idea\u002F\n*.swp\n.DS_Store\nThumbs.db\n\n# GodotPrompter (if used in-project)\n.godot-prompter-cache\u002F\n```\n\n## .gitattributes\n\nNormalize line endings for text files and mark binary assets so Git does not attempt text diffs on them.\n\n```gitattributes\n# Default: normalize line endings to LF on commit\n* text=auto eol=lf\n\n# Godot-specific text files\n*.gd text eol=lf\n*.gdshader text eol=lf\n*.gdshaderinc text eol=lf\n*.tscn text eol=lf\n*.tres text eol=lf\n*.godot text eol=lf\n*.cfg text eol=lf\n*.import text eol=lf\n\n# C# source\n*.cs text eol=lf\n*.csproj text eol=lf\n*.sln text eol=lf\n\n# Binary assets — no diff, no merge, no EOL conversion\n*.png binary\n*.jpg binary\n*.jpeg binary\n*.webp binary\n*.svg binary\n*.psd binary\n*.aseprite binary\n*.wav binary\n*.ogg binary\n*.mp3 binary\n*.ttf binary\n*.otf binary\n*.woff binary\n*.woff2 binary\n*.glb binary\n*.gltf binary\n*.blend binary\n*.fbx binary\n*.mp4 binary\n*.ogv binary\n```\n\n## Project Settings\n\nConfigure these in `Project > Project Settings` or directly in `project.godot`.\n\n### Display\n\n| Setting | Recommended value | Notes |\n|---|---|---|\n| `display\u002Fwindow\u002Fsize\u002Fviewport_width` | 1920 | Base resolution — art reference size |\n| `display\u002Fwindow\u002Fsize\u002Fviewport_height` | 1080 | |\n| `display\u002Fwindow\u002Fstretch\u002Fmode` | `canvas_items` | Scales 2D content; use `viewport` for pixel-perfect |\n| `display\u002Fwindow\u002Fstretch\u002Faspect` | `keep` | Adds letterbox\u002Fpillarbox; `expand` fills screen |\n| `display\u002Fwindow\u002Fsize\u002Fresizable` | `true` | Allow window resize on desktop |\n\nFor pixel-art projects use `stretch\u002Fmode = viewport` and `texture_filter = nearest` on the root CanvasItem or globally via `rendering\u002Ftextures\u002Fcanvas_textures\u002Fdefault_texture_filter`.\n\n> **Godot 4.7+:** Projects **newly created** in Godot 4.7 already default `display\u002Fwindow\u002Fstretch\u002Fmode` to `canvas_items` and `display\u002Fwindow\u002Fstretch\u002Faspect` to `expand` (previously `disabled` \u002F `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.\n\n> **Changed in Godot 4.8:** Projects **newly created** in Godot 4.8 keep those two entries and add three more defaults: `gui\u002Fcommon\u002Fauto_focus_strategy = Balloon` (class default `Legacy`), `input_devices\u002Fjoypads\u002Fignore_joypad_on_unfocused_application = true` (class default `false`), and `rendering\u002Flights_and_shadows\u002Fmulti_bounce_occlusion\u002Fenabled = true`. Upgraded projects keep their existing behavior, so set them explicitly if you want the new-project values.\n\n### Input Map\n\nDefine actions in `Project > Project Settings > Input Map` rather than hard-coding key constants. This lets players rebind controls at runtime.\n\n**GDScript — reading input actions:**\n\n```gdscript\n# Good: action-based (rebindable)\nfunc _process(delta: float) -> void:\n    var direction := Input.get_axis(\"move_left\", \"move_right\")\n    if Input.is_action_just_pressed(\"jump\"):\n        _jump()\n\n# Avoid: hard-coded key checks\nfunc _input(event: InputEvent) -> void:\n    if event is InputEventKey and event.keycode == KEY_SPACE:\n        _jump()\n```\n\n**C# — reading input actions:**\n\n```csharp\n\u002F\u002F Good: action-based (rebindable)\npublic override void _Process(double delta)\n{\n    float direction = Input.GetAxis(\"move_left\", \"move_right\");\n    if (Input.IsActionJustPressed(\"jump\"))\n        Jump();\n}\n\n\u002F\u002F Avoid: hard-coded key checks\npublic override void _Input(InputEvent @event)\n{\n    if (@event is InputEventKey key && key.Keycode == Key.Space)\n        Jump();\n}\n```\n\n**Saving and restoring custom bindings at runtime (GDScript):**\n\n```gdscript\nfunc save_bindings() -> void:\n    var config := ConfigFile.new()\n    for action in InputMap.get_actions():\n        if action.begins_with(\"ui_\"):\n            continue  # skip built-in UI actions\n        var events := InputMap.action_get_events(action)\n        config.set_value(\"bindings\", action, events)\n    config.save(\"user:\u002F\u002Fbindings.cfg\")\n\nfunc load_bindings() -> void:\n    var config := ConfigFile.new()\n    if config.load(\"user:\u002F\u002Fbindings.cfg\") != OK:\n        return\n    for action in config.get_section_keys(\"bindings\"):\n        InputMap.action_erase_events(action)\n        for event in config.get_value(\"bindings\", action):\n            InputMap.action_add_event(action, event)\n```\n\n**Saving and restoring custom bindings at runtime (C#):**\n\n```csharp\npublic void SaveBindings()\n{\n    var config = new ConfigFile();\n    foreach (StringName action in InputMap.GetActions())\n    {\n        if (((string)action).StartsWith(\"ui_\"))\n            continue; \u002F\u002F skip built-in UI actions\n        var events = InputMap.ActionGetEvents(action);\n        config.SetValue(\"bindings\", action, events);\n    }\n    config.Save(\"user:\u002F\u002Fbindings.cfg\");\n}\n\npublic void LoadBindings()\n{\n    var config = new ConfigFile();\n    if (config.Load(\"user:\u002F\u002Fbindings.cfg\") != Error.Ok)\n        return;\n    foreach (string action in config.GetSectionKeys(\"bindings\"))\n    {\n        InputMap.ActionEraseEvents(action);\n        var events = (Godot.Collections.Array)config.GetValue(\"bindings\", action);\n        foreach (InputEvent @event in events)\n            InputMap.ActionAddEvent(action, @event);\n    }\n}\n```\n\n## Autoloads\n\nRegister autoloads in `Project > Project Settings > Globals > Autoload`. Autoloads are singleton nodes available globally via their registered name.\n\n### Common Autoloads\n\n| Name | Path | Purpose |\n|---|---|---|\n| `GameManager` | `autoloads\u002Fgame_manager.gd` | Game state, scene transitions, pause |\n| `EventBus` | `autoloads\u002Fevent_bus.gd` | Decoupled signal relay |\n| `AudioManager` | `autoloads\u002Faudio_manager.gd` | Music, SFX, volume control |\n| `SaveManager` | `autoloads\u002Fsave_manager.gd` | Save\u002Fload game data |\n\nKeep autoloads small. Move logic into standalone classes and call them from the autoload.\n\n### Minimal GameManager — GDScript\n\n```gdscript\n# autoloads\u002Fgame_manager.gd\nextends Node\n\nsignal scene_changed(scene_path: String)\nsignal game_paused(is_paused: bool)\n\nvar current_level: String = \"\"\nvar is_paused: bool = false\n\n\nfunc change_scene(path: String) -> void:\n    current_level = path\n    scene_changed.emit(path)\n    get_tree().change_scene_to_file(path)\n\n\nfunc set_paused(paused: bool) -> void:\n    is_paused = paused\n    get_tree().paused = paused\n    game_paused.emit(paused)\n\n\nfunc quit_game() -> void:\n    get_tree().quit()\n```\n\n### Minimal GameManager — C#\n\n```csharp\n\u002F\u002F autoloads\u002FGameManager.cs\nusing Godot;\n\npublic partial class GameManager : Node\n{\n    [Signal]\n    public delegate void SceneChangedEventHandler(string scenePath);\n\n    [Signal]\n    public delegate void GamePausedEventHandler(bool isPaused);\n\n    public string CurrentLevel { get; private set; } = \"\";\n    public bool IsPaused { get; private set; }\n\n    public void ChangeScene(string path)\n    {\n        CurrentLevel = path;\n        EmitSignal(SignalName.SceneChanged, path);\n        GetTree().ChangeSceneToFile(path);\n    }\n\n    public void SetPaused(bool paused)\n    {\n        IsPaused = paused;\n        GetTree().Paused = paused;\n        EmitSignal(SignalName.GamePaused, paused);\n    }\n\n    public void QuitGame() => GetTree().Quit();\n}\n```\n\n### Minimal EventBus — GDScript\n\n```gdscript\n# autoloads\u002Fevent_bus.gd\nextends Node\n\n# Declare all cross-system signals here.\n# Systems emit to EventBus; listeners connect to EventBus.\n\nsignal player_died\nsignal item_collected(item_id: String, quantity: int)\nsignal score_changed(new_score: int)\nsignal level_completed(level_id: String)\n```\n\nNodes connect with:\n\n```gdscript\nEventBus.player_died.connect(_on_player_died)\nEventBus.player_died.emit()\n```\n\n## C# Project Setup\n\n### .csproj\n\nWhen you enable C# support Godot generates a `.csproj`. Keep it minimal and set the target framework as below (Godot 4.5 to 4.7: `net8.0`, `net9.0` for Android; 4.4 has no Android override; 4.3 generated `net6.0`, `net7.0` for Android and `net8.0` for iOS). Godot 4.8 needs `net10.0` everywhere, see the callout below:\n\n```xml\n\u003CProject Sdk=\"Godot.NET.Sdk\u002F4.3.0\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n    \u003CTargetFramework Condition=\" '$(GodotTargetPlatform)' == 'android' \">net9.0\u003C\u002FTargetFramework>\n    \u003CNullable>enable\u003C\u002FNullable>\n    \u003CAllowUnsafeBlocks>true\u003C\u002FAllowUnsafeBlocks>\n    \u003CRootNamespace>MyGame\u003C\u002FRootNamespace>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\nReplace `MyGame` with your project name. Namespaces are free-form; what Godot needs is a class whose name matches its file name (`Player.cs` → `class Player`).\n\n> **Changed in Godot 4.8:** The minimum target framework is **.NET 10**. A new 4.8 C# project gets `net10.0` for every platform, Android included (4.5 to 4.7 wrote `net9.0` for Android). On 4.8 replace each `net8.0` above with `net10.0`; the 4.8 editor also raises an older `TargetFramework` when it opens the project.\n\n### partial class Requirement\n\nEvery C# class that extends a Godot type **must** be declared `partial`. Godot's source generator adds the registration code in a companion partial file.\n\n```csharp\n\u002F\u002F Correct\npublic partial class Player : CharacterBody2D { }\n\n\u002F\u002F Wrong — build error GD0001: missing partial modifier\npublic class Player : CharacterBody2D { }\n```\n\n### Namespace Convention\n\nUse a single root namespace for the project. Sub-namespaces are optional but keep them shallow:\n\n```csharp\nnamespace MyGame.Characters;   \u002F\u002F OK\nnamespace MyGame.UI;           \u002F\u002F OK\nnamespace MyGame.Systems.Inventory.Data.Containers;  \u002F\u002F Too deep — flatten\n```\n\n### Signal Declaration in C#\n\nSignals must use the `[Signal]` attribute with a delegate ending in `EventHandler`:\n\n```csharp\n[Signal]\npublic delegate void HealthChangedEventHandler(int newHealth, int maxHealth);\n\n\u002F\u002F Emit\nEmitSignal(SignalName.HealthChanged, health, maxHealth);\n\n\u002F\u002F Connect\nsomeNode.HealthChanged += OnHealthChanged;\n\n\u002F\u002F Disconnect\nsomeNode.HealthChanged -= OnHealthChanged;\n```\n\n## Project Setup Checklist\n\nUse this checklist after scaffolding a new project to verify everything is in place.\n\n- [ ] Directory structure created (`assets\u002F`, `scenes\u002F`, `scripts\u002F` or co-located layout)\n- [ ] `.gitignore` created and includes `.godot\u002F`, `.mono\u002F`, `bin\u002F`, `obj\u002F`\n- [ ] `.gitattributes` created with LF normalization and binary asset rules\n- [ ] `project.godot` — viewport resolution set (1920x1080 or project target)\n- [ ] `project.godot` — stretch mode configured (`canvas_items` or `viewport`)\n- [ ] Input Map actions defined for all player inputs (no hard-coded key constants)\n- [ ] Autoloads registered: `GameManager`, `EventBus`, `AudioManager`, `SaveManager`\n- [ ] Autoload scripts created under `autoloads\u002F` (or `scripts\u002Fautoloads\u002F`)\n- [ ] Autoloads are process mode `Always` if they must run while paused\n- [ ] For C# projects: `.csproj` targets `net8.0` (Godot 4.4 to 4.7; Android `net9.0` from 4.5) or `net10.0` (Godot 4.8), `RootNamespace` set, `Nullable` enabled\n- [ ] For C# projects: all node scripts use `partial class`\n- [ ] Initial commit on `main` branch before adding game content\n- [ ] The project's agent instructions file (`CLAUDE.md`, or `AGENTS.md` \u002F `GEMINI.md` if that is what the repo maintains) contains a `## GodotPrompter` section with the skill invocation rule — a skill for a new system, the project's code for an existing one (see `godot-prompter:godot-brainstorming` for content)\n- [ ] CI pipeline (optional but recommended): runs `godot --headless --check-only` on GDScript files\n","# Godot Project Setup\n\nThis skill scaffolds a new Godot 4.3+ project with recommended directory structure, project settings, autoloads, and version control configuration.\n\n> **Related skills:** **scene-organization** for structuring scene trees, **event-bus** for the EventBus autoload pattern, **save-load** for the SaveManager autoload pattern.\n\n## Recommended Directory Structure (Split Layout)\n\nThe 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.\n\n```\nres:\u002F\u002F\n├── assets\u002F\n│   ├── audio\u002F\n│   │   ├── music\u002F\n│   │   └── sfx\u002F\n│   ├── fonts\u002F\n│   ├── shaders\u002F\n│   ├── sprites\u002F\n│   │   ├── characters\u002F\n│   │   ├── environment\u002F\n│   │   └── ui\u002F\n│   └── textures\u002F\n├── scenes\u002F\n│   ├── autoloads\u002F\n│   ├── characters\u002F\n│   ├── environment\u002F\n│   ├── levels\u002F\n│   ├── screens\u002F\n│   └── ui\u002F\n├── scripts\u002F\n│   ├── autoloads\u002F\n│   ├── characters\u002F\n│   ├── components\u002F\n│   ├── resources\u002F\n│   └── ui\u002F\n├── resources\u002F\n│   ├── items\u002F\n│   ├── levels\u002F\n│   └── themes\u002F\n└── addons\u002F\n```\n\n**Why split layout?**\n- Assets managed by artists can be updated without touching script directories.\n- Glob patterns in export presets are simpler (`assets\u002F**` stays separate from `scripts\u002F**`).\n- Easier to configure `.gitattributes` binary rules per directory.\n- Scales to teams where artists and programmers work in different areas.\n\n## Alternative: Co-Located Structure\n\nFor solo projects or small teams, keep scenes and scripts together by feature. Easier to move a feature wholesale; harder to apply binary `gitattributes` rules.\n\n```\nres:\u002F\u002F\n├── assets\u002F\n│   ├── audio\u002F\n│   ├── fonts\u002F\n│   └── textures\u002F\n├── entities\u002F\n│   ├── player\u002F\n│   │   ├── player.tscn\n│   │   ├── player.gd          # or Player.cs\n│   │   └── player_state.gd\n│   └── enemy\u002F\n│       ├── enemy.tscn\n│       └── enemy.gd\n├── levels\u002F\n│   ├── level_01\u002F\n│   │   ├── level_01.tscn\n│   │   └── level_01.gd\n│   └── main_menu\u002F\n│       ├── main_menu.tscn\n│       └── main_menu.gd\n├── systems\u002F\n│   ├── inventory\u002F\n│   └── dialogue\u002F\n├── autoloads\u002F\n├── resources\u002F\n└── addons\u002F\n```\n\n## .gitignore\n\n```gitignore\n# Godot editor data — never commit\n.godot\u002F\n\n# Export artifacts\n*.apk\n*.aab\n*.ipa\n*.exe\n*.x86_64\n*.x86_32\n*.arm32\n*.arm64\n*.pck\n*.zip\nexport\u002F\n\n# C# \u002F Mono build output\n.mono\u002F\n.import\u002F\nbin\u002F\nobj\u002F\n*.csproj.user\n*.sln.user\n*.user\n\n# IDE and OS files\n.vs\u002F\n.vscode\u002Fsettings.json\n.idea\u002F\n*.swp\n.DS_Store\nThumbs.db\n\n# GodotPrompter (if used in-project)\n.godot-prompter-cache\u002F\n```\n\n## .gitattributes\n\nNormalize line endings for text files and mark binary assets so Git does not attempt text diffs on them.\n\n```gitattributes\n# Default: normalize line endings to LF on commit\n* text=auto eol=lf\n\n# Godot-specific text files\n*.gd text eol=lf\n*.gdshader text eol=lf\n*.gdshaderinc text eol=lf\n*.tscn text eol=lf\n*.tres text eol=lf\n*.godot text eol=lf\n*.cfg text eol=lf\n*.import text eol=lf\n\n# C# source\n*.cs text eol=lf\n*.csproj text eol=lf\n*.sln text eol=lf\n\n# Binary assets — no diff, no merge, no EOL conversion\n*.png binary\n*.jpg binary\n*.jpeg binary\n*.webp binary\n*.svg binary\n*.psd binary\n*.aseprite binary\n*.wav binary\n*.ogg binary\n*.mp3 binary\n*.ttf binary\n*.otf binary\n*.woff binary\n*.woff2 binary\n*.glb binary\n*.gltf binary\n*.blend binary\n*.fbx binary\n*.mp4 binary\n*.ogv binary\n```\n\n## Project Settings\n\nConfigure these in `Project > Project Settings` or directly in `project.godot`.\n\n### Display\n\n| Setting | Recommended value | Notes |\n|---|---|---|\n| `display\u002Fwindow\u002Fsize\u002Fviewport_width` | 1920 | Base resolution — art reference size |\n| `display\u002Fwindow\u002Fsize\u002Fviewport_height` | 1080 | |\n| `display\u002Fwindow\u002Fstretch\u002Fmode` | `canvas_items` | Scales 2D content; use `viewport` for pixel-perfect |\n| `display\u002Fwindow\u002Fstretch\u002Faspect` | `keep` | Adds letterbox\u002Fpillarbox; `expand` fills screen |\n| `display\u002Fwindow\u002Fsize\u002Fresizable` | `true` | Allow window resize on desktop |\n\nFor pixel-art projects use `stretch\u002Fmode = viewport` and `texture_filter = nearest` on the root CanvasItem or globally via `rendering\u002Ftextures\u002Fcanvas_textures\u002Fdefault_texture_filter`.\n\n> **Godot 4.7+:** Projects **newly created** in Godot 4.7 already default `display\u002Fwindow\u002Fstretch\u002Fmode` to `canvas_items` and `display\u002Fwindow\u002Fstretch\u002Faspect` to `expand` (previously `disabled` \u002F `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.\n\n> **Changed in Godot 4.8:** Projects **newly created** in Godot 4.8 keep those two entries and add three more defaults: `gui\u002Fcommon\u002Fauto_focus_strategy = Balloon` (class default `Legacy`), `input_devices\u002Fjoypads\u002Fignore_joypad_on_unfocused_application = true` (class default `false`), and `rendering\u002Flights_and_shadows\u002Fmulti_bounce_occlusion\u002Fenabled = true`. Upgraded projects keep their existing behavior, so set them explicitly if you want the new-project values.\n\n### Input Map\n\nDefine actions in `Project > Project Settings > Input Map` rather than hard-coding key constants. This lets players rebind controls at runtime.\n\n**GDScript — reading input actions:**\n\n```gdscript\n# Good: action-based (rebindable)\nfunc _process(delta: float) -> void:\n    var direction := Input.get_axis(\"move_left\", \"move_right\")\n    if Input.is_action_just_pressed(\"jump\"):\n        _jump()\n\n# Avoid: hard-coded key checks\nfunc _input(event: InputEvent) -> void:\n    if event is InputEventKey and event.keycode == KEY_SPACE:\n        _jump()\n```\n\n**C# — reading input actions:**\n\n```csharp\n\u002F\u002F Good: action-based (rebindable)\npublic override void _Process(double delta)\n{\n    float direction = Input.GetAxis(\"move_left\", \"move_right\");\n    if (Input.IsActionJustPressed(\"jump\"))\n        Jump();\n}\n\n\u002F\u002F Avoid: hard-coded key checks\npublic override void _Input(InputEvent @event)\n{\n    if (@event is InputEventKey key && key.Keycode == Key.Space)\n        Jump();\n}\n```\n\n**Saving and restoring custom bindings at runtime (GDScript):**\n\n```gdscript\nfunc save_bindings() -> void:\n    var config := ConfigFile.new()\n    for action in InputMap.get_actions():\n        if action.begins_with(\"ui_\"):\n            continue  # skip built-in UI actions\n        var events := InputMap.action_get_events(action)\n        config.set_value(\"bindings\", action, events)\n    config.save(\"user:\u002F\u002Fbindings.cfg\")\n\nfunc load_bindings() -> void:\n    var config := ConfigFile.new()\n    if config.load(\"user:\u002F\u002Fbindings.cfg\") != OK:\n        return\n    for action in config.get_section_keys(\"bindings\"):\n        InputMap.action_erase_events(action)\n        for event in config.get_value(\"bindings\", action):\n            InputMap.action_add_event(action, event)\n```\n\n**Saving and restoring custom bindings at runtime (C#):**\n\n```csharp\npublic void SaveBindings()\n{\n    var config = new ConfigFile();\n    foreach (StringName action in InputMap.GetActions())\n    {\n        if (((string)action).StartsWith(\"ui_\"))\n            continue; \u002F\u002F skip built-in UI actions\n        var events = InputMap.ActionGetEvents(action);\n        config.SetValue(\"bindings\", action, events);\n    }\n    config.Save(\"user:\u002F\u002Fbindings.cfg\");\n}\n\npublic void LoadBindings()\n{\n    var config = new ConfigFile();\n    if (config.Load(\"user:\u002F\u002Fbindings.cfg\") != Error.Ok)\n        return;\n    foreach (string action in config.GetSectionKeys(\"bindings\"))\n    {\n        InputMap.ActionEraseEvents(action);\n        var events = (Godot.Collections.Array)config.GetValue(\"bindings\", action);\n        foreach (InputEvent @event in events)\n            InputMap.ActionAddEvent(action, @event);\n    }\n}\n```\n\n## Autoloads\n\nRegister autoloads in `Project > Project Settings > Globals > Autoload`. Autoloads are singleton nodes available globally via their registered name.\n\n### Common Autoloads\n\n| Name | Path | Purpose |\n|---|---|---|\n| `GameManager` | `autoloads\u002Fgame_manager.gd` | Game state, scene transitions, pause |\n| `EventBus` | `autoloads\u002Fevent_bus.gd` | Decoupled signal relay |\n| `AudioManager` | `autoloads\u002Faudio_manager.gd` | Music, SFX, volume control |\n| `SaveManager` | `autoloads\u002Fsave_manager.gd` | Save\u002Fload game data |\n\nKeep autoloads small. Move logic into standalone classes and call them from the autoload.\n\n### Minimal GameManager — GDScript\n\n```gdscript\n# autoloads\u002Fgame_manager.gd\nextends Node\n\nsignal scene_changed(scene_path: String)\nsignal game_paused(is_paused: bool)\n\nvar current_level: String = \"\"\nvar is_paused: bool = false\n\n\nfunc change_scene(path: String) -> void:\n    current_level = path\n    scene_changed.emit(path)\n    get_tree().change_scene_to_file(path)\n\n\nfunc set_paused(paused: bool) -> void:\n    is_paused = paused\n    get_tree().paused = paused\n    game_paused.emit(paused)\n\n\nfunc quit_game() -> void:\n    get_tree().quit()\n```\n\n### Minimal GameManager — C#\n\n```csharp\n\u002F\u002F autoloads\u002FGameManager.cs\nusing Godot;\n\npublic partial class GameManager : Node\n{\n    [Signal]\n    public delegate void SceneChangedEventHandler(string scenePath);\n\n    [Signal]\n    public delegate void GamePausedEventHandler(bool isPaused);\n\n    public string CurrentLevel { get; private set; } = \"\";\n    public bool IsPaused { get; private set; }\n\n    public void ChangeScene(string path)\n    {\n        CurrentLevel = path;\n        EmitSignal(SignalName.SceneChanged, path);\n        GetTree().ChangeSceneToFile(path);\n    }\n\n    public void SetPaused(bool paused)\n    {\n        IsPaused = paused;\n        GetTree().Paused = paused;\n        EmitSignal(SignalName.GamePaused, paused);\n    }\n\n    public void QuitGame() => GetTree().Quit();\n}\n```\n\n### Minimal EventBus — GDScript\n\n```gdscript\n# autoloads\u002Fevent_bus.gd\nextends Node\n\n# Declare all cross-system signals here.\n# Systems emit to EventBus; listeners connect to EventBus.\n\nsignal player_died\nsignal item_collected(item_id: String, quantity: int)\nsignal score_changed(new_score: int)\nsignal level_completed(level_id: String)\n```\n\nNodes connect with:\n\n```gdscript\nEventBus.player_died.connect(_on_player_died)\nEventBus.player_died.emit()\n```\n\n## C# Project Setup\n\n### .csproj\n\nWhen you enable C# support Godot generates a `.csproj`. Keep it minimal and set the target framework as below (Godot 4.5 to 4.7: `net8.0`, `net9.0` for Android; 4.4 has no Android override; 4.3 generated `net6.0`, `net7.0` for Android and `net8.0` for iOS). Godot 4.8 needs `net10.0` everywhere, see the callout below:\n\n```xml\n\u003CProject Sdk=\"Godot.NET.Sdk\u002F4.3.0\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n    \u003CTargetFramework Condition=\" '$(GodotTargetPlatform)' == 'android' \">net9.0\u003C\u002FTargetFramework>\n    \u003CNullable>enable\u003C\u002FNullable>\n    \u003CAllowUnsafeBlocks>true\u003C\u002FAllowUnsafeBlocks>\n    \u003CRootNamespace>MyGame\u003C\u002FRootNamespace>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\nReplace `MyGame` with your project name. Namespaces are free-form; what Godot needs is a class whose name matches its file name (`Player.cs` → `class Player`).\n\n> **Changed in Godot 4.8:** The minimum target framework is **.NET 10**. A new 4.8 C# project gets `net10.0` for every platform, Android included (4.5 to 4.7 wrote `net9.0` for Android). On 4.8 replace each `net8.0` above with `net10.0`; the 4.8 editor also raises an older `TargetFramework` when it opens the project.\n\n### partial class Requirement\n\nEvery C# class that extends a Godot type **must** be declared `partial`. Godot's source generator adds the registration code in a companion partial file.\n\n```csharp\n\u002F\u002F Correct\npublic partial class Player : CharacterBody2D { }\n\n\u002F\u002F Wrong — build error GD0001: missing partial modifier\npublic class Player : CharacterBody2D { }\n```\n\n### Namespace Convention\n\nUse a single root namespace for the project. Sub-namespaces are optional but keep them shallow:\n\n```csharp\nnamespace MyGame.Characters;   \u002F\u002F OK\nnamespace MyGame.UI;           \u002F\u002F OK\nnamespace MyGame.Systems.Inventory.Data.Containers;  \u002F\u002F Too deep — flatten\n```\n\n### Signal Declaration in C#\n\nSignals must use the `[Signal]` attribute with a delegate ending in `EventHandler`:\n\n```csharp\n[Signal]\npublic delegate void HealthChangedEventHandler(int newHealth, int maxHealth);\n\n\u002F\u002F Emit\nEmitSignal(SignalName.HealthChanged, health, maxHealth);\n\n\u002F\u002F Connect\nsomeNode.HealthChanged += OnHealthChanged;\n\n\u002F\u002F Disconnect\nsomeNode.HealthChanged -= OnHealthChanged;\n```\n\n## Project Setup Checklist\n\nUse this checklist after scaffolding a new project to verify everything is in place.\n\n- [ ] Directory structure created (`assets\u002F`, `scenes\u002F`, `scripts\u002F` or co-located layout)\n- [ ] `.gitignore` created and includes `.godot\u002F`, `.mono\u002F`, `bin\u002F`, `obj\u002F`\n- [ ] `.gitattributes` created with LF normalization and binary asset rules\n- [ ] `project.godot` — viewport resolution set (1920x1080 or project target)\n- [ ] `project.godot` — stretch mode configured (`canvas_items` or `viewport`)\n- [ ] Input Map actions defined for all player inputs (no hard-coded key constants)\n- [ ] Autoloads registered: `GameManager`, `EventBus`, `AudioManager`, `SaveManager`\n- [ ] Autoload scripts created under `autoloads\u002F` (or `scripts\u002Fautoloads\u002F`)\n- [ ] Autoloads are process mode `Always` if they must run while paused\n- [ ] For C# projects: `.csproj` targets `net8.0` (Godot 4.4 to 4.7; Android `net9.0` from 4.5) or `net10.0` (Godot 4.8), `RootNamespace` set, `Nullable` enabled\n- [ ] For C# projects: all node scripts use `partial class`\n- [ ] Initial commit on `main` branch before adding game content\n- [ ] The project's agent instructions file (`CLAUDE.md`, or `AGENTS.md` \u002F `GEMINI.md` if that is what the repo maintains) contains a `## GodotPrompter` section with the skill invocation rule — a skill for a new system, the project's code for an existing one (see `godot-prompter:godot-brainstorming` for content)\n- [ ] CI pipeline (optional but recommended): runs `godot --headless --check-only` on GDScript files\n",{"name":5,"description":7},"master","60c28fdc40706a24576731e9fb3508b9c95258ad","skills\u002Fgodot-project-setup",63,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter","https:\u002F\u002Fgithub.com\u002Fjame581","https:\u002F\u002Fjanmesarc.online\u002F","Software engineer. My biggest passion is game development.","2026-11-14 20:45:49",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add jame581\u002FGodotPrompter --skill godot-project-setup",{"tool":54,"command":55},"bunx","bunx skills add jame581\u002FGodotPrompter --skill godot-project-setup",{"tool":57,"command":58},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill godot-project-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-project-setup\u002FSKILL.md",true,[],[63,80,101,131,155,173],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":34},"01M6KRFE5BR2PSD08ZKDAS66R7","xr-development","Use when building VR\u002FAR\u002FXR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fxr-development\u002FSKILL.md",[],[70,71,33,72,23,73,22,74,31,75,76,25,77,78,79],"xr development","development","deployment","vr","tracking","ar","hand","Meta","applications","quest",{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":34},"01M6KRF8GZTG1TAS506MFBSGFC","web-services","Use when a Godot game calls a web server — HTTPRequest, downloads, REST\u002FJSON APIs, auth headers, WebSocketPeer clients, TLS, retries, and keeping secrets out of the build. Not for game networking\u002FRPCs (multiplayer-basics) or browser export (web-export)","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-services\u002FSKILL.md",[],[87,88,89,90,91,92,93,94,25,33,23,95,96,97,98,99,100],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":112,"publishedAt":34},"01M6KRF38Q4WSKAYFS56PG87T0","web-export","Use when shipping a Godot game to the browser — Web export preset options, threads vs no-threads and COOP\u002FCOEP headers, hosting on itch.io or your own server, PWA, JavaScriptBridge, user:\u002F\u002F persistence, audio and input limits, and load size","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-export\u002FSKILL.md",[107],{"categoryNo":108,"categoryName":109,"taxonomyType":110,"taxonomyTypeDesc":111},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[88,113,114,115,116,117,118,119,96,120,121,33,122,123,124,125,126,127,25,128,129,130],"export","web export","threads","limits","shipping","size","options","hosting","input","Coop","preset","browser","game","io","load","pwa","Audio","server",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":145,"publishedAt":34},"01M6KREYFETEBH62ZTN6EZH2X3","using-godot-prompter","Bootstrap skill — establishes how to find and use GodotPrompter skills, with platform-specific tool mapping","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fusing-godot-prompter\u002FSKILL.md",[137,140],{"categoryNo":138,"categoryName":139,"taxonomyType":110,"taxonomyTypeDesc":111},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":141,"categoryName":142,"taxonomyType":143,"taxonomyTypeDesc":144},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[23,146,147,148,149,25,150,151,152,153,154],"using godot prompter","find","with","bootstrap","tool","platform","mapping","how","how to",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":34},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation","Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[162,163,25,164,165,166,167,168,169,170,171,33,172],"tween animation","Animation","motion","parallel","gameplay","chaining","ui","recipes","common","implementing","sequences",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":34},"01M6KREKGCQMVDV8WX7HWX8BZG","state-machine","Use when building a state machine or refactoring logic into one — enum, node, and resource-based FSM patterns with trade-offs. Not for adding states to an existing one","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fstate-machine\u002FSKILL.md",[],[180,181,182,23,33,183,184,185,186,187,148,25,171,188],"state","state machine","machine","patterns","node","fsm","state machines","trade","trade-offs"]