xiaohongshu
xiaohongshu
godot-organize-project
Use when you need to reorganize project folder structure, consolidate similar files, organize resources by type, and create a clean project architecture from current folder chaos. Orchestrates all 3 organization mini-skills: organize-files, organize-assets, and organize-scripts. Each operation ru...
Full skill instructions
This orchestrator runs 3 organization mini-skills in sequence. For individual operations, invoke mini-skills directly.
Purpose: Scan and intelligently reorganize Godot project folder structure for optimal organization and maintainability.
Core Principle: Automatic, non-destructive project reorganization with full git history preservation.
When this skill is invoked, IMMEDIATELY execute the following sequence:
ls project.godot 2>/dev/null && echo "✓ Godot project detected" || echo "✗ Not a Godot project"
If NOT a Godot project:
If IS a Godot project:
Execute in parallel:
# Directory tree
find . -type d -name "." -prune -o -type d -print | head -50
# File count by type
find . -type f \( -name "*.gd" -o -name "*.tscn" -o -name "*.tres" -o -name "*.png" -o -name "*.ogg" \) | wc -l
# Identify problem areas
find . -type f -name "*.gd" | wc -l # Total scripts
find . -type f -name "*.tscn" | wc -l # Total scenes
find . -type f -name "*.tres" | wc -l # Total resources
find . -type d | wc -l # Total directories
# Find orphaned files (files in root or misplaced)
find . -maxdepth 1 -type f \( -name "*.gd" -o -name "*.tscn" -o -name "*.tres" \)
# Detect unorganized directories
find . -type d -exec sh -c 'count=$(find "$1" -maxdepth 1 -type f | wc -l); [ $count -gt 10 ] && echo "$1 ($count files)"' _ {} \;
Detect patterns:
Show the user:
=== Project Structure Analysis ===
Project: [project name]
Current state: DISORGANIZED
Statistics:
- Total directories: X
- Total scripts (.gd): Y
- Total scenes (.tscn): Z
- Total resources (.tres): W
- Orphaned files (root level): N
Issues Detected:
- [ ] Scripts scattered across project
- [ ] Scenes mixed with scripts
- [ ] Resources at top level
- [ ] Assets unorganized
- [ ] No clear hierarchy
Reorganization will:
✓ Create logical directory structure
✓ Group files by type and category
✓ Create components/ subdirectory structure
✓ Organize assets (sprites, audio, fonts, etc.)
✓ Improve IDE navigation
✓ Speed up compilation
✓ Make collaboration easier
Proposed structure:
res://
├─ scenes/
│ ├─ ui/
│ ├─ levels/
│ └─ entities/
├─ scripts/
│ ├─ ui/
│ ├─ gameplay/
│ ├─ utils/
│ └─ managers/
├─ assets/
│ ├─ sprites/
│ ├─ audio/
│ │ ├─ music/
│ │ └─ sfx/
│ ├─ fonts/
│ └─ shaders/
├─ resources/
│ ├─ configs/
│ ├─ data/
│ └─ materials/
└─ components/
├─ timers/
├─ areas/
├─ sprites/
├─ ui/
└─ physics/
Would you like me to:
1. Reorganize project (recommended)
2. Show detailed breakdown first
3. Customize structure before proceeding
4. Cancel
# Analyze what kind of project this is
# Check for existing structure patterns
test -d "scripts" && echo "scripts/ exists"
test -d "scenes" && echo "scenes/ exists"
test -d "assets" && echo "assets/ exists"
test -d "components" && echo "components/ exists"
# Check if already organized
find . -maxdepth 1 -type f \( -name "*.gd" -o -name "*.tscn" \) | wc -l
# If 0: Already organized
# If >5: Needs organization
Create comprehensive file inventory:
# Create inventory of all files with their types
find . -type f \( -name "*.gd" -o -name "*.tscn" -o -name "*.tres" -o -name "*.png" -o -name "*.ogg" -o -name "*.mp3" \) > file_inventory.txt
# Analyze each file:
# - Current location
# - Type (script, scene, resource, asset)
# - Category (ui, gameplay, editor, utils, etc.)
# - Related files (dependencies)
Generate step-by-step plan:
Reorganization Plan:
====================
1. Create directories (20 operations)
2. Move scripts (Y operations)
3. Move scenes (Z operations)
4. Move resources (W operations)
5. Move assets (A operations)
6. Update import settings
7. Verify all references
8. Commit changes
Total operations: X
Estimated time: Auto (user doesn't wait)
Rollback available: YES (complete git history)
mkdir -p res://scripts
mkdir -p res://scenes
mkdir -p res://assets
mkdir -p res://resources
mkdir -p res://components
Based on detected usage patterns:
res://scripts/
├─ ui/ # UI-related scripts
├─ gameplay/ # Game logic scripts
├─ entities/ # Entity scripts (player, enemy, etc.)
├─ managers/ # Singleton managers
├─ utils/ # Utility/helper scripts
├─ editor/ # Editor scripts (if any)
└─ _autoload/ # Autoload scripts
res://scenes/
├─ ui/ # UI screens, menus, HUD
│ ├─ menus/
│ ├─ hud/
│ └─ dialogs/
├─ levels/ # Level/map scenes
├─ entities/ # Reusable entity scenes
│ ├─ player/
│ ├─ enemies/
│ ├─ npcs/
│ └─ props/
└─ _debug/ # Debug/test scenes
res://assets/
├─ sprites/ # 2D graphics
│ ├─ player/
│ ├─ enemies/
│ ├─ ui/
│ ├─ tiles/
│ └─ vfx/
├─ audio/ # Sound files
│ ├─ music/
│ ├─ sfx/
│ └─ voice/
├─ fonts/ # Font files
├─ shaders/ # Shader files
└─ 3d/ # 3D models (if any)
res://resources/
├─ configs/ # Configuration resources
├─ data/ # Game data resources
│ ├─ enemies/
│ ├─ items/
│ └─ dialogue/
├─ materials/ # Material resources
├─ tilesets/ # TileSet resources
└─ theme/ # UI theme resources
res://components/
├─ timers/ # Timer components (from godot-refactoring)
├─ areas/ # Detection area components
├─ sprites/ # Visual component templates
├─ physics/ # Physics body templates
├─ ui/ # UI component templates
└─ audio/ # Audio components
# Create all directories based on analysis
mkdir -p res://scripts/{ui,gameplay,entities,managers,utils,editor,_autoload}
mkdir -p res://scenes/{ui/{menus,hud,dialogs},levels,entities/{player,enemies,npcs,props},_debug}
mkdir -p res://assets/{sprites/{player,enemies,ui,tiles,vfx},audio/{music,sfx,voice},fonts,shaders,3d}
mkdir -p res://resources/{configs,data/{enemies,items,dialogue},materials,tilesets,theme}
mkdir -p res://components/{timers,areas,sprites,physics,ui,audio}
# Create .gitkeep files in empty directories
find res:// -type d -empty -exec touch {}/.gitkeep \;
# Analyze each file and determine category
# Scripts
for file in $(find . -maxdepth 1 -name "*.gd"); do
# Read file content
# Detect if it's ui, gameplay, manager, util, etc.
# Assign to appropriate category
done
# Scenes
for file in $(find . -maxdepth 1 -name "*.tscn"); do
# Analyze scene name and content
# Assign to ui/levels/entities
done
# Resources
for file in $(find . -maxdepth 1 -name "*.tres"); do
# Check resource type
# Assign to configs/data/materials/etc
done
# Assets
for file in $(find . -maxdepth 1 -name "*.png"); do
# Check dimensions and usage
# Assign to sprites/ui/tiles/vfx
done
# Move scripts
mv player.gd res://scripts/entities/
mv ui_manager.gd res://scripts/managers/
mv utils.gd res://scripts/utils/
mv enemy.gd res://scripts/entities/
# Move scenes
mv menu.tscn res://scenes/ui/menus/
mv level_1.tscn res://scenes/levels/
mv player.tscn res://scenes/entities/player/
mv enemy.tscn res://scenes/entities/enemies/
# Move resources
mv game_config.tres res://resources/configs/
mv enemy_data.tres res://resources/data/enemies/
mv player_material.tres res://resources/materials/
# Move assets
mv player_sprite.png res://assets/sprites/player/
mv bg_music.ogg res://assets/audio/music/
mv explosion.png res://assets/sprites/vfx/
# Scan all .gd and .tscn files for hardcoded paths
grep -rn "res://" --include="*.gd" --include="*.tscn" . > path_references.txt
# Update path references in scripts
# Old: load("res://player.gd")
# New: load("res://scripts/entities/player.gd")
# Update path references in scenes
# Old: [ext_resource type="Script" path="res://ui_manager.gd"]
# New: [ext_resource type="Script" path="res://scripts/managers/ui_manager.gd"]
Detect and move to _autoload/:
# In project.godot:
# [autoload]
# EventBus="res://event_bus.gd"
# Move to:
# [autoload]
# EventBus="res://scripts/_autoload/event_bus.gd"
# Update project.godot references
Keep in addons/ directory:
mkdir -p res://addons/
# Don't reorganize addons directory
# Don't reorganize:
# - .gd files in .godot/
# - Imported files
# - Cache files
If component library detected (from godot-refactoring skill):
# Move existing components/ to new location
# components/ → res://components/
# Update parent .tscn files with new paths:
# Old: [ext_resource type="PackedScene" path="res://components/timers/..."]
# New: [ext_resource type="PackedScene" path="res://components/timers/..."]
# Ensure component library structure is respected
# Before reorganization
find . -maxdepth 1 -type f | wc -l
# After reorganization
find . -type f | wc -l
# Should be equal
# Run Godot in headless mode to detect reference errors
godot --headless --quit-after 5 project.godot 2>&1 | grep -i "error\|not found"
# Should report 0 errors
# Check that all scene files are still valid
for scene in $(find . -name "*.tscn"); do
godot --editor -e "$scene" 2>&1 | grep -q "ERROR" && echo "ERROR in $scene"
done
# Should report 0 errors
# Check that all scripts compile
for script in $(find . -name "*.gd"); do
gdscript -c "$script" 2>&1 | grep -q "Error" && echo "ERROR in $script"
done
# Should report 0 errors
git add .
git commit -m "Backup: Pre-reorganization state
All files present before structure reorganization."
(Execute moves from Phase 3)
(Execute reference updates from Phase 3.3)
# Run Godot validation
godot --headless --quit-after 5 project.godot
# Check for errors
# Should see: "All scenes and scripts loaded successfully"
git add .
git commit -m "Refactor: Reorganize project structure for better organization
Project structure reorganization:
- Created logical directory hierarchy
- Organized scripts by category (ui, gameplay, entities, managers, utils)
- Organized scenes (ui, levels, entities)
- Organized assets (sprites, audio, fonts, shaders)
- Organized resources (configs, data, materials)
- Organized components (from godot-refactoring integration)
- Updated all internal path references
- Verified all scenes and scripts load without errors
Benefits:
- Improved IDE navigation and file organization
- Faster compilation and project loading
- Easier collaboration and code discovery
- Clear separation of concerns
- Integrated with godot-refactoring skill
Behavior: UNCHANGED
Visual: UNCHANGED
Performance: UNCHANGED (or improved)
"
git tag reorganize-complete-$(date +%Y%m%d-%H%M%S)
After successful reorganization:
=== Project Reorganization Complete ===
Before:
- Structure: FLAT/CHAOTIC
- Navigation: DIFFICULT
- File discovery: SLOW
After:
- Structure: HIERARCHICAL & LOGICAL
- Navigation: FAST & INTUITIVE
- File discovery: INSTANT
- Build time: Potentially faster
- Collaboration: EASIER
Files organized:
- Scripts: X → scripts/
- Scenes: Y → scenes/
- Resources: Z → resources/
- Assets: W → assets/
- Components: V → components/ (if godot-refactoring detected)
Total migrations: X + Y + Z + W + V
Errors: 0
Warnings: 0
Status: ✓ SUCCESS
Next steps:
1. Reopen project in Godot editor
2. Verify folder structure matches
3. Check that all assets load correctly
4. Continue development on clean structure
This skill pairs perfectly with the godot-refactoring skill:
Run godot-refactoring first → Extracts code-created nodes to modular components
res://components/ directory structureRun project-structure-organizer → Recognizes component structure
Result → Clean, modular, organized project
If reorganization causes issues:
# View commits
git log --oneline | head -5
# Find pre-reorganization commit
git log --oneline | grep "Pre-reorganization"
# Reset to before
git reset --hard <commit_hash>
# Project restored to previous state
User creates new Godot project, adds a few files, then invokes:
User has 1-year-old project with 200 files scattered everywhere:
User runs godot-refactoring skill, creates component library:
res://components/This skill provides complete project structure organization with zero data loss and full rollback capability.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience