Analyze Godot scene files (.tscn) for structural issues, performance problems, and optimization opportunities. Use this when the user wants to optimize a scene, check scene structure, or troubleshoot scene-related issues.
This skill analyzes Godot scene files (.tscn) to identify structural issues, performance bottlenecks, and optimization opportunities specific to Godot 4.x projects.
Invoke this skill when the user:
Check for:
Best Practices:
Check for:
Best Practices:
Check for:
_on_NodeName_signal_name conventionBest Practices:
Check for:
Best Practices:
Check for:
Best Practices:
@export for scene-configurable propertiesCheck for:
Best Practices:
Check for:
_process instead of _physics_processBest Practices:
_physics_process for all physics operationsProvide analysis in this structure:
# Scene Optimization Report: [scene_name].tscn
## Summary
- Total nodes: X
- Max depth: X levels
- Issues found: X
- Severity: 🔴 Critical | 🟡 Warning | 🟢 Good
---
## Critical Issues (Must Fix)
1. **[Issue name]** - [Location]
- Problem: [Description]
- Impact: [Performance/maintainability impact]
- Fix: [Specific steps to resolve]
## Warnings (Should Fix)
[Same format]
## Suggestions (Nice to Have)
[Same format]
---
## Scene Statistics
- Node count: X
- Max hierarchy depth: X
- Signal connections: X
- External resources: X
- Script attachments: X
## Overall Assessment
[1-2 paragraph summary of scene quality and recommended next steps]
Godot .tscn files are text-based with this structure:
[gd_scene load_steps=X format=3]
[ext_resource ...]
[sub_resource ...]
[node name="Root" type="NodeType"]
[node name="Child" type="NodeType" parent="Root"]
[connection signal="signal_name" from="NodeA" to="NodeB" method="callback"]
Key sections to parse:
[ext_resource]: External dependencies[sub_resource]: Embedded resources[node ...]: Node definitions with hierarchy[connection ...]: Signal connectionsUser: "Check my Main.tscn scene" User: "Optimize all enemy scenes" User: "Why is my UI scene performing poorly?" User: "Analyze scenes for performance issues"