Provides architectural support and code validation for GDScript, scene files, and Godot project structures.
Install
mkdir -p .claude/skills/godot && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/235" && unzip -o skill.zip -d .claude/skills/godot && rm skill.zipInstalls to .claude/skills/godot
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.Key capabilities
- →Validate .tscn and .tres files using provided Python scripts
- →Implement component-based and signal-driven architectures
- →Generate game systems using predefined code templates
- →Execute CLI commands for project builds, script validation, and headless testing
- →Manage resource-based data structures for items and spells
How it works
The skill provides specialized syntax rules for Godot's text-based file formats and uses CLI tools to validate these files or execute engine-level tasks like builds and imports.
Inputs & outputs
When to use godot
- →Debugging GDScript errors
- →Structuring signal-driven systems
- →Optimizing game resource files
- →Implementing component patterns
- →Refactoring scene logic
About this skill
Godot Engine Development Skill
Specialized guidance for developing games and applications with Godot Engine, with emphasis on effective collaboration between LLM coding assistants and Godot's unique file structure.
Overview
Godot projects use a mix of GDScript code files (.gd) and text-based resource files (.tscn for scenes, .tres for resources). While GDScript is straightforward, the resource files have strict formatting requirements that differ significantly from GDScript syntax. This skill provides file format expertise, proven architecture patterns, validation tools, code templates, and debugging workflows to enable effective development of Godot projects.
When to Use This Skill
Invoke this skill when:
- Working on any Godot Engine project
- Creating or modifying .tscn (scene) or .tres (resource) files
- Implementing game systems (interactions, attributes, spells, inventory, etc.)
- Debugging "file failed to load" or similar resource errors
- Setting up component-based architectures
- Creating signal-driven systems
- Implementing resource-based data (items, spells, abilities)
Key Principles
1. Understand File Format Differences
GDScript (.gd) - Full Programming Language:
extends Node
class_name MyClass
var speed: float = 5.0
const MAX_HEALTH = 100
func _ready():
print("Ready")
Scene Files (.tscn) - Strict Serialization Format:
[ext_resource type="Script" path="res://script.gd" id="1"]
[node name="Player" type="CharacterBody3D"]
script = ExtResource("1") # NOT preload()!
Resource Files (.tres) - NO GDScript Syntax:
[ext_resource type="Script" path="res://item.gd" id="1"]
[resource]
script = ExtResource("1") # NOT preload()!
item_name = "Sword" # NOT var item_name = "Sword"!
2. Critical Rules for .tres and .tscn Files
NEVER use in .tres/.tscn files:
preload()- UseExtResource("id")insteadvar,const,func- These are GDScript keywords- Untyped arrays - Use
Array[Type]([...])syntax
ALWAYS use in .tres/.tscn files:
ExtResource("id")for external resourcesSubResource("id")for inline resources- Typed arrays:
Array[Resource]([...]) - Proper ExtResource declarations before use
3. Separation of Concerns
Keep logic in .gd files, data in .tres files:
src/
spells/
spell_resource.gd # Class definition + logic
spell_effect.gd # Effect logic
resources/
spells/
fireball.tres # Data only, references scripts
ice_spike.tres # Data only
This makes LLM editing much safer and clearer.
4. Component-Based Architecture
Break functionality into small, focused components:
Player (CharacterBody3D)
├─ HealthAttribute (Node) # Component
├─ ManaAttribute (Node) # Component
├─ Inventory (Node) # Component
└─ StateMachine (Node) # Component
├─ IdleState (Node)
├─ MoveState (Node)
└─ AttackState (Node)
Benefits:
- Each component is a small, focused file
- Easy to understand and modify
- Clear responsibilities
- Reusable across different entities
5. Signal-Driven Communication
Use signals for loose coupling:
# Component emits signals
signal health_changed(current, max)
signal death()
# Parent connects to signals
func _ready():
$HealthAttribute.health_changed.connect(_on_health_changed)
$HealthAttribute.death.connect(_on_death)
Benefits:
- No tight coupling between systems
- Easy to add new listeners
- Self-documenting (signals show available events)
- UI can connect without modifying game logic
Using Bundled Resources
Validation Scripts
Validate .tres and .tscn files before testing in Godot to catch syntax errors early.
Validate .tres file:
python3 scripts/validate_tres.py resources/spells/fireball.tres
Validate .tscn file:
python3 scripts/validate_tscn.py scenes/player/player.tscn
Use these scripts when:
- After creating or editing .tres/.tscn files programmatically
- When debugging "failed to load" errors
- Before committing scene/resource changes
- When user reports issues with custom resources
Reference Documentation
Load reference files when needed for detailed information:
references/file-formats.md - Deep dive into .gd, .tscn, .tres syntax:
- Complete syntax rules for each file type
- Common mistakes with examples
- Safe vs risky editing patterns
- ExtResource and SubResource usage
references/architecture-patterns.md - Proven architectural patterns:
- Component-based interaction system
- Attribute system (health, mana, etc.)
- Resource-based effect system (spells, items)
- Inventory system
- State machine pattern
- Examples of combining patterns
Read these references when:
- Implementing new game systems
- Unsure about .tres/.tscn syntax
- Debugging file format errors
- Planning architecture for new features
Code Templates
Use templates as starting points for common patterns. Templates are in assets/templates/:
component_template.gd - Base component with signals, exports, activation:
# Copy and customize for new components
cp assets/templates/component_template.gd src/components/my_component.gd
attribute_template.gd - Numeric attribute (health, mana, stamina):
# Use for any numeric attribute with min/max
cp assets/templates/attribute_template.gd src/attributes/stamina_attribute.gd
interaction_template.gd - Interaction component base class:
# Extend for custom interactions (pickup, door, switch, etc.)
cp assets/templates/interaction_template.gd src/interactions/lever_interaction.gd
spell_resource.tres - Example spell with effects:
# Use as reference for creating new spell data
cat assets/templates/spell_resource.tres
item_resource.tres - Example item resource:
# Use as reference for creating new item data
cat assets/templates/item_resource.tres
Workflows
Workflow 1: Creating a New Component System
Example: Adding a health system to enemies.
Steps:
-
Read architecture patterns reference:
# Check for similar patterns Read references/architecture-patterns.md # Look for "Attribute System" section -
Create base class using template:
cp assets/templates/attribute_template.gd src/attributes/attribute.gd # Customize the base class -
Create specialized subclass:
# Create health_attribute.gd extending attribute.gd # Add health-specific signals (damage_taken, death) -
Add to scene via .tscn edit:
[ext_resource type="Script" path="res://src/attributes/health_attribute.gd" id="4_health"] [node name="HealthAttribute" type="Node" parent="Enemy"] script = ExtResource("4_health") value_max = 50.0 value_start = 50.0 -
Test immediately in Godot editor
-
If issues, validate the scene file:
python3 scripts/validate_tscn.py scenes/enemies/base_enemy.tscn
Workflow 2: Creating Resource Data Files (.tres)
Example: Creating a new spell.
Steps:
-
Reference the template:
cat assets/templates/spell_resource.tres -
Create new .tres file with proper structure:
[gd_resource type="Resource" script_class="SpellResource" load_steps=3 format=3] [ext_resource type="Script" path="res://src/spells/spell_resource.gd" id="1"] [ext_resource type="Script" path="res://src/spells/spell_effect.gd" id="2"] [sub_resource type="Resource" id="Effect_1"] script = ExtResource("2") effect_type = 0 magnitude_min = 15.0 magnitude_max = 25.0 [resource] script = ExtResource("1") spell_name = "Fireball" spell_id = "fireball" mana_cost = 25.0 effects = Array[ExtResource("2")]([SubResource("Effect_1")]) -
Validate before testing:
python3 scripts/validate_tres.py resources/spells/fireball.tres -
Fix any errors reported by validator
-
Test in Godot editor
Workflow 3: Debugging Resource Loading Issues
When user reports "resource failed to load" or similar errors.
Steps:
-
Read the file reported in error:
# Check file syntax Read resources/spells/problem_spell.tres -
Run validation script:
python3 scripts/validate_tres.py resources/spells/problem_spell.tres -
Check for common mistakes:
- Using
preload()instead ofExtResource() - Using
var,const,funckeywords - Missing ExtResource declarations
- Incorrect array syntax (not typed)
- Using
-
Read file format reference if needed:
Read references/file-formats.md # Focus on "Resource Files (.tres)" section # Check "Common Mistakes Reference" -
Fix errors and re-validate
Workflow 4: Implementing from Architecture Patterns
When implementing a known pattern (interaction system, state machine, etc.).
Steps:
-
Read the relevant pattern:
Read references/architecture-patterns.md # Find the specific pattern (e.g., "Component-Based Interaction System") -
Copy relevant template:
cp assets/templates/interaction_template.gd src/interactions/door_interaction.gd -
Customize the template:
- Override
_perform_interaction() - Add custom exports for configuration
- Add custom signals if needed
- Override
-
Create scene structure following pattern:
[node name="Door" type="StaticBody3D"] script = ExtResource("base_interactable.gd") [node name="DoorInteraction" type="Node" parent="."] script = ExtResource("door_interaction.gd") interaction_text = "Open Door" -
Test incrementally
Unit Testing with GUT
Use GUT (Godot Unit Testing) for testing pure logic — any RefCounted or Resource class that doesn't depen
Content truncated.
When not to use it
- →When editing GDScript files that require standard language syntax
- →When performing complex scene layout tasks better suited for the Godot editor
Prerequisites
Limitations
- →Cannot use GDScript keywords like var or func inside .tres or .tscn files
- →Requires specific ExtResource and SubResource syntax for external and inline references
How it compares
Unlike manual editing, this skill enforces strict serialization rules for .tscn and .tres files to prevent common loading errors and provides automated validation workflows.
Compared to similar skills
godot side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| godot (this skill) | 1,044 | 5mo | Review | Intermediate |
| unreal-engine-cpp-pro | 43 | 4mo | No flags | Advanced |
| clojure-write | 16 | 3mo | No flags | Intermediate |
| llvm-tooling | 1 | 6mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
unreal-engine-cpp-pro
sickn33
Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.
clojure-write
metabase
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
llvm-tooling
gmh5225
Expertise in LLVM tooling development including Clang plugins, LLDB debugger extensions, Clangd/LSP, and LibTooling. Use this skill when building source code analysis tools, refactoring tools, debugger extensions, or IDE integrations.
superpowers-workflow
anthonylee991
Enforces a disciplined workflow for coding, debugging, refactoring, and automation: brainstorm -> plan -> implement with verification (prefer TDD) -> review -> finish. Use for almost any non-trivial change.
cursor-debug-bundle
jeremylongshore
Debug AI suggestions and code generation in Cursor. Triggers on "debug cursor ai", "cursor suggestions wrong", "bad cursor completion", "cursor ai debug". Use when debugging issues or troubleshooting. Trigger with phrases like "cursor debug bundle", "cursor bundle", "cursor".
rust-router
actionbook
CRITICAL: Use for ALL Rust questions including errors, design, and coding. HIGHEST PRIORITY for: 比较, 对比, compare, vs, versus, 区别, difference, 最佳实践, best practice, tokio vs, async-std vs, 比较 tokio, 比较 async, Triggers on: Rust, cargo, rustc, crate, Cargo.toml, 意图分析, 问题分析, 语义分析, analyze intent, question analysis, compile error, borrow error, lifetime error, ownership error, type error, trait error, value moved, cannot borrow, does not live long enough, mismatched types, not satisfied, E0382, E0597, E0277, E0308, E0499, E0502, E0596, async, await, Send, Sync, tokio, concurrency, error handling, 编译错误, compile error, 所有权, ownership, 借用, borrow, 生命周期, lifetime, 类型错误, type error, 异步, async, 并发, concurrency, 错误处理, error handling, 问题, problem, question, 怎么用, how to use, 如何, how to, 为什么, why, 什么是, what is, 帮我写, help me write, 实现, implement, 解释, explain