godot-4-migration
Qué hace
Esta guía te ayuda a actualizar tu juego hecho en Godot 3 a Godot 4. Explica los cambios en la forma de escribir código (GDScript 2.0), cómo usar las animaciones (Tweens) y cómo declarar variables que aparecen en la configuración del juego (exports).
Cuándo usarla
- ✓Cuando estás actualizando un juego de Godot 3 a Godot 4.
- ✓Cuando el código de tu juego deja de funcionar después de la actualización.
- ✓Cuando necesitas cambiar la forma en que funcionan las animaciones.
Link de la skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/godot-4-migration/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Cómo declaro las variables de configuración en Godot 4?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La IA compara el código antiguo de Godot 3 con las nuevas reglas de Godot 4 y muestra ejemplos de cómo reescribir partes específicas de tu juego, como las animaciones y la declaración de variables.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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.
Preguntas frecuentes
¿Qué son los 'exports'?
Son variables que puedes configurar directamente en las herramientas de Godot sin cambiar el código. En Godot 4 se usan con '@export'.
¿Qué cambió con las animaciones (Tweens)?
En Godot 3 se usaba un nodo llamado 'Tween'. En Godot 4 creas las animaciones directamente en el código con 'create_tween()'.
¿Por qué mi código con 'yield' ya no funciona?
En Godot 4, 'yield' se ha sustituido por 'await'. Tienes que cambiar una palabra por la otra en tu código.
Detalles
Descripción original del autor
Specialized guide for migrating Godot 3.x projects to Godot 4 (GDScript 2.0), covering syntax changes, Tweens, and exports.
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #4766
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
00-andruia-consultant
48 milAyuda a tu agente a iniciar o mejorar proyectos de IA. Analiza código, sugiere herramientas y crea planes de acción en español.
007
48 milPermite que tu agente realice auditorías de seguridad y modelado de amenazas. Es útil para proteger proyectos contra ataques y vulnerabilidades.
10-andruia-skill-smith
48 milAyuda a tu agente a crear o mejorar herramientas de IA. Define cómo funcionan, escribe la documentación y valida la estructura.
20-andruia-niche-intelligence
48 milPermite que tu agente cree un resumen de un sector específico. Es útil para entender su contexto, normas, patrones de uso y riesgos, usando fuentes fiables.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.