$npx -y skills add thedivergentai/GD-Agentic-Skills --skill godot-genre-metroidvaniaExpert blueprint for Metroidvanias including ability-gated exploration (locks/keys), interconnected world design (backtracking with shortcuts), persistent state tracking (collectibles, boss defeats), room transitions (seamless loading), map systems (grid-based revelation), and ab
| 1 | ## Godot 4.7 Baseline |
| 2 | |
| 3 | - Expert patterns in this skill target **Godot 4.7+** (stable, 2026-06-18). |
| 4 | - Consult the [Godot 4.7 migration guide](https://docs.godotengine.org/en/4.7/tutorials/migrating/upgrading_to_godot_4.7.html) when upgrading projects from 4.6. |
| 5 | - **NEVER** assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes. |
| 6 | |
| 7 | # Genre: Metroidvania |
| 8 | |
| 9 | Expert blueprint for Metroidvanias balancing exploration, progression, and backtracking rewards. |
| 10 | |
| 11 | ## NEVER Do (Expert Anti-Patterns) |
| 12 | |
| 13 | ### World Design & Exploration |
| 14 | - NEVER allow "Soft-Locks" where a player is trapped; if they enter via a one-way path ("valve"), they MUST be able to leave using current abilities. Always design **fail-safe escape routes**. |
| 15 | - NEVER create empty dead ends; if a player backtracks to a remote area, they MUST be rewarded with a collectible, lore, or currency. Empty rooms are design failures. |
| 16 | - NEVER make backtracking purely repetitive; as the player gains movement (Dash/Teleport), traversal through old areas MUST become faster. **Open shortcuts** to bypass long, early routes. |
| 17 | - NEVER hide the critical path without "crumbs"; use distinct **Landmarks**, unique lighting, or environmental storytelling to build the player's mental map. |
| 18 | - NEVER design abilities that serve only one purpose; strictly implement dual-use traversal and combat functionality (e.g., a "Dash" that crosses gaps and dodges attacks). |
| 19 | |
| 20 | ### Persistence & Mapping |
| 21 | - NEVER forget to save **persistent room state**; if a player opens a chest or defeats a boss, that state MUST remain saved when they leave and return. |
| 22 | - NEVER load interconnected rooms synchronously via `load()`; strictly use `ResourceLoader.load_threaded_request()` for seamless transitions. |
| 23 | - NEVER track global progression within localized room scripts; strictly use **Autoload Singletons** for global ability flags and world state. |
| 24 | - NEVER use floating-point types for grid coordinates (minimaps/fog); strictly use `Vector2i` to prevent precision jitter. |
| 25 | - NEVER manipulate the SceneTree directly from a background loading thread; strictly use `call_deferred()`. |
| 26 | |
| 27 | ### Physics & Controls |
| 28 | - NEVER calculate jump arcs or dashes inside `_process()`; strictly use `_physics_process()` to prevent stutter. |
| 29 | - NEVER multiply `CharacterBody2D` velocity by `delta` before `move_and_slide()`; the engine handles this internally. |
| 30 | - NEVER poll `is_action_just_pressed()` inside `_physics_process()` for buffering; strictly capture events in `_unhandled_input()`. |
| 31 | - NEVER use standard strings for high-frequency ability checks; strictly use `StringName` (&"dashing") for pointer-speed comparisons. |
| 32 | - NEVER iterate through every node to broadcast updates; strictly use `SceneTree.call_group()` for efficient mass communication. |
| 33 | - NEVER delete active room/player nodes via `free()`; strictly use `queue_free()` to avoid segmentation faults. |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | ## 🛠 Expert Components (scripts/) |
| 38 | |
| 39 | ### Original Expert Patterns |
| 40 | - [minimap_fog.gd](scripts/minimap_fog.gd) - Grid-based fog of war that tracks visited rooms and persists via global save data. |
| 41 | - [progression_gate_manager.gd](scripts/progression_gate_manager.gd) - Central manager for ability-gated progression (Locks/Keys) and world persistence. |
| 42 | |
| 43 | ### Modular Components |
| 44 | - [platformer_jump_buffer.gd](scripts/platformer_jump_buffer.gd) - Modular coyote time and jump buffering for high-fidelity movement. |
| 45 | - [background_room_streamer.gd](scripts/background_room_streamer.gd) - Thread-safe background room preloading using `ResourceLoader`. |
| 46 | - [safe_scene_switcher.gd](scripts/safe_scene_switcher.gd) - Deferred scene transition pattern for stable cross-room world-state switching. |
| 47 | - [minimap_fog_revealer.gd](scripts/minimap_fog_revealer.gd) - Vector2i-based fog-of-war clearing logic synced to player position. |
| 48 | - [persistent_progression_system.gd](scripts/persistent_progression_system.gd) - Autoload pattern for tracking global ability/collectible flags. |
| 49 | - [ability_state_machine.gd](scripts/ability_state_machine.gd) - Optimized `StringName` pattern matching for traversal/combat states. |
| 50 | - [fast_wall_detector.gd](scripts/fast_wall_detector.gd) - Direct `PhysicsServer` queries for performance-optimized wall detection. |
| 51 | - [save_station_broadcast.gd](scripts/save_station_broadcast.gd) - Group-based entity resetting and healing logic on save interaction. |
| 52 | - [decoupled_hazard_logic.gd](scripts/decoupled |