All skills
thedivergentai avatar

/godot-project-foundations

@57c9225

Expert blueprint for Godot 4 project organization (feature-based folders, naming conventions, version control). Enforces snake_case files, PascalCase nodes, %SceneUniqueNames, and .gitignore best practices. Use when starting new projects or refactoring structure. Keywords project organization, naming conventions, snake_case, PascalCase, feature-based, .gitignore, .gdignore.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-project-foundations

This session only. Nothing lands on disk.

referencesfoundations-deep.md

≈866 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Project Foundations Deep Dive (load on demand)

MANDATORY for naming tables, typed-GDScript migration, and architecture samples beyond bundled scripts. Do not re-inline EventBus / SceneManager code in chat.

Naming conventions (full)

Artifact Convention Example
Files / folders snake_case player_controller.gd
Nodes PascalCase PlayerSprite
Exports snake_case @export var max_health
Private members _ prefix var _current_health
Signals past-tense snake_case signal health_changed
Stable refs %SceneUniqueNames %Hitbox

C# exception: PascalCase class/file match.

Feature folder layout

/project.godot
/common/
/entities/player/
/ui/main_menu/
/levels/
/addons/

Version control

Typed GDScript 2.0 migration

  1. := when RHS type is obvious.
  2. Array[Enemy], Dictionary[StringName, float].
  3. Explicit -> void return types.
  4. as Timer for safe casts.
  5. Project Settings → Debug → GDScript → Untyped Declaration = Warn or Error.

Full guide: godot-gdscript-mastery.

Expert: threaded scene manager

MANDATORY async_resource_loader.gd — do not paste duplicate SceneManager samples.

func load_scene(path: String) -> void:
    if ResourceLoader.load_threaded_request(path) == OK:
        set_process(true)

func _process(_delta: float) -> void:
    var progress := []
    match ResourceLoader.load_threaded_get_status(_target_path, progress):
        ResourceLoader.THREAD_LOAD_IN_PROGRESS:
            progress_updated.emit(progress[0] * 100.0)
        ResourceLoader.THREAD_LOAD_LOADED:
            var scene := ResourceLoader.load_threaded_get(_target_path) as PackedScene
            get_tree().change_scene_to_packed(scene)
            set_process(false)

Expert: global event bus

MANDATORY global_event_bus.gd.

# Publisher: EventBus.player_died.emit()
# Subscriber: EventBus.player_died.connect(_on_player_death)

Expert: project metadata Resource

build_metadata_provider.gd / base_data_resource.gd:

class_name ProjectMetadata extends Resource
@export var version: String = "1.0.0"

static func load_metadata(path: String = "user://metadata.res") -> ProjectMetadata:
    if ResourceLoader.exists(path):
        return ResourceLoader.load(path) as ProjectMetadata
    return ProjectMetadata.new()

Godot 4.7 foundations

  • Asset Store replaces Asset Library for third-party discovery.
  • Default stretch canvas_items + expand — test UI on new projects.

Workflow: new project

  1. project.godot + project_bootstrapper.gd folders.
  2. Godot-aware .gitignore.
  3. README documenting feature-based layout.
  4. Register Autoloads only after ownership decision tree (SKILL.md).

Source: SKILL.md on GitHub

No alerts16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a suite of Godot 4 foundation scripts for project scaffolding, telemetry, and organization. It includes development tools that dynamically create project folders and generate GDScript files from templates based on user-provided inputs. These tools represent a minor indirect injection surface due to a lack of path sanitization, and the script generation is a standard pattern for scaffolding tools.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    1/6 files flagged

Signed by skilld at 57c9225. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-project-foundations