Skills

Godot Code Review

Use when reviewing GDScript or C# Godot code, checklist of best practices, common...

Install

npx skills add jame581/GodotPrompter --skill godot-code-review -g -a claude-code -y
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Use when reviewing GDScript or C# Godot code, checklist of best practices, common anti-patterns, and Godot-specific pitfalls. Triggers on "review this script", "check my code", "any issues with this", "what's wrong with this code", including a short pasted snippet.

Godot Code Review

A structured review guide for Godot 4.3+ projects covering GDScript and C#. Work through each checklist section, then produce a review summary using the output template at the end.

Related skills: godot-testing for TDD and test coverage, scene-organization for scene tree best practices, godot-optimization for performance review.


1. Node & Scene Architecture

  • Each scene has a single, clear responsibility (player, enemy, UI widget, etc.)
  • Inheritance chains are shallow, prefer composition via child nodes over deep extends hierarchies
  • Autoloads (singletons) are used sparingly; only truly global state belongs there
  • Node references traverse only to direct children, no get_parent() chains
  • @onready (GDScript) or GetNode<T>() (C#) targets direct children or named paths within the same scene

Anti-pattern, get_parent() chain

# BAD: tight coupling, breaks if the tree changes
func take_damage(amount: int) -> void:
    get_parent().get_parent().get_node("HUD").update_health(health)
// BAD: tight coupling, breaks if the tree changes
public void TakeDamage(int amount)
{
    GetParent().GetParent().GetNode("HUD").Call("UpdateHealth", _health);
}

Fix, emit a signal instead

# GOOD: parent/ancestor listens; child stays decoupled
signal health_changed(new_health: int)

func take_damage(amount: int) -> void:
    health -= amount
    health_changed.emit(health)
// GOOD: parent/ancestor listens; child stays decoupled
[Signal]
public delegate void HealthChangedEventHandler(int newHealth);

public void TakeDamage(int amount)
{
    _health -= amount;
    EmitSignal(SignalName.HealthChanged, _health);
}

2. GDScript Style

Read the whole SKILL.md on GitHub

More in Engineering