godot-4-migration
Specialized guide for updating Godot 3 projects to Godot 4. Covers language changes and specific features.
What it does
This guide helps you update your game made in Godot 3 to Godot 4. It explains changes in code writing (GDScript 2.0), how to use animations (Tweens), and how to declare variables that appear in game settings (exports).
When to use it
- ✓When you are updating a game from Godot 3 to Godot 4.
- ✓When your game's code stops working after the update.
- ✓When you need to change how animations work.
Example of what to ask your AI
“How do I update how I declare configuration variables in Godot 4?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The AI compares old Godot 3 code with the new Godot 4 rules, showing examples of how to rewrite specific parts of your game, like animations and variable declarations.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill godot-4-migrationOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/godot-4-migration/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Godot 4 Migration Guide
Overview
A critical guide for developers transitioning from Godot 3.x to Godot 4. This skill focuses on the major syntax changes in GDScript 2.0, the new Tween system, and export annotation updates.
When to Use This Skill
- Use when porting a Godot 3 project to Godot 4.
- Use when encountering syntax errors after upgrading.
- Use when replacing deprecated nodes (like
Tweennode vscreate_tween). - Use when updating
exportvariables to@exportannotations.
Migration procedure
Work in a backed-up branch or copy. Choose an exact Godot 4 version, validate conversion before changing files, and inspect converter gaps, renamed nodes, shaders, physics, plugins and export targets. Test scenes and saved games before replacing the working Godot 3 build. Examples below are fragments in an appropriate Node script; Enemy must be a declared project type.
Official guide: Upgrading to Godot 4.
Key Changes
1. Annotations (@)
Godot 4 uses @ for keywords that modify behavior.
export var x->@export var xonready var y->@onready var ytool->@tool(at top of file)
2. Setters and Getters
Properties now define setters/getters inline.
Godot 3:
var health setget set_health, get_health
func set_health(value):
health = value
Godot 4:
signal health_changed(health: int)
var health: int = 100:
set(value):
health = value
emit_signal("health_changed", health)
get:
return health
3. Tween System
The Godot 3 Tween node was removed in Godot 4. Use create_tween() in code.
Godot 3:
$Tween.interpolate_property(...)
$Tween.start()
Godot 4:
var tween = create_tween()
tween.tween_property($Sprite, "position", Vector2(100, 100), 1.0)
tween.parallel().tween_property($Sprite, "modulate:a", 0.0, 1.0)
4. Signal Connections
String-based connections are discouraged. Use callables.
Godot 3:
connect("pressed", self, "_on_pressed")
Godot 4:
pressed.connect(_on_pressed)
Examples
Example 1: Typed Arrays
GDScript 2.0 supports typed arrays for type checking; measure performance rather than assuming a speedup.
# Godot 3
var enemies = []
# Godot 4
var enemies: Array[Node] = []
func _ready():
for child in get_children():
if child is Enemy:
enemies.append(child)
Example 2: Awaiting Signals (Coroutines)
yield is replaced by await.
Godot 3:
yield(get_tree().create_timer(1.0), "timeout")
Godot 4:
await get_tree().create_timer(1.0).timeout
Best Practices
- ✅ Do: Use
@export_range,@export_file, etc., for better inspector UI. - ✅ Do: Type all variables (
var x: int) for performance gains in GDScript 2.0. - ✅ Do: Use
super()to call parent methods instead of.function_name(). - ❌ Don't: Use string names for signals (
emit_signal("name")) if you can use the signal object (name.emit()).
Troubleshooting
Problem: "Identifier 'Tween' is not a valid type."
Solution: Godot 4 uses a Tween object returned by create_tween(), not a scene node or a SceneTreeTween type. Use var tween: Tween = create_tween() in a Node context.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
FAQ
What are 'exports'?
These are variables you can configure directly in Godot's tools without changing the code. In Godot 4, they use '@export'.
What changed with animations (Tweens)?
In Godot 3, you used a node called 'Tween'. In Godot 4, you create animations directly in code using 'create_tween()'.
Why doesn't my code with 'yield' work anymore?
'yield' has been replaced by 'await' in Godot 4. You need to swap one word for the other in your code.
Details
Original description by the author
Specialized guide for migrating Godot 3.x projects to Godot 4 (GDScript 2.0), covering syntax changes, Tweens, and exports.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3152
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC