# Godot Kit -- Prompts Guide

Example prompts to use with Godot Kit skills. Copy any prompt into your AI coding assistant to get targeted, production-quality results from the skill pack.

Each prompt references the specific Godot Kit skills it activates. Your AI assistant will compose the relevant skills automatically when it recognizes the keywords and context.

---

## Getting Started

Simple prompts for first-time users. These cover project setup, basic systems, and common fixes.

### Set up a new Godot 4.x project

> Using the godot-best-practices skill, scaffold a new Godot 4.4 project for a 2D action game. Create the directory structure following the recommended layout (Scenes/, Singletons/, Content/, tests/) and generate a base GameManager autoload with typed signals for game_started, game_paused, and game_over. Include a run_tests.gd script so I can run headless tests from the start.

### Create a player character with a state machine

> Using the godot-gdscript-patterns and godot-best-practices skills, create a CharacterBody2D player controller with a node-based state machine. The player needs Idle, Walk, Jump, and Attack states as separate State scripts. Use full static typing, the "signal up, call down" pattern, and @onready references with %UniqueNode syntax for the AnimationPlayer and Sprite2D. My project is a 2D platformer using Godot 4.x with GDScript.

### Add a health bar HUD

> Using the godot-ui-system skill, create a health bar HUD element for my Godot 4.x game. The bar should use a ProgressBar node styled with the dark translucent panel aesthetic (bg_deep background, health_green fill color, 6-8px corner radius). It needs to react to a HealthComponent signal and include a tween animation that flashes the bar red when damage is taken. Follow the "New HUD Element" hook from the design system.

### Fix a common Godot error

> Using the godot-debugging skill, help me fix this error in my Godot 4.x project: "Attempt to call function 'take_damage' in base 'null instance' on a null instance." The error appears in my Enemy.gd script at the line where I call $Hitbox.get_overlapping_bodies() and then loop through them calling take_damage(). The hitbox is an Area2D child of the enemy. Explain why this happens and show me the corrected code with proper null checks.

### Set up an event bus with typed signals

> Using the godot-gdscript-mastery and godot-best-practices skills, create a global EventBus autoload for my Godot 4.x project. It should have typed signals for player events (spawned, died, health_changed), enemy events (spawned, died), and item events (collected, powerup_activated). Show me how to emit from a child script and connect from a parent following the "signal up, call down" architecture. Include the correct script ordering for the autoload section.

---

## Common Workflows

Day-to-day development patterns for active projects.

### Implement a save/load system

> Using the godot-best-practices and godot-gdscript-patterns skills, build a save/load system for my Godot 4.x game. I need a SaveManager autoload that writes to user:// using JSON with a version field for forward compatibility. The system should save player position, health, inventory (array of resource paths), and current level name. Include a Saveable component script I can attach to any node that implements get_save_data() and load_save_data(). Handle edge cases like missing files, corrupted JSON, and version mismatches.

### Create particle effects for enemy deaths

> Using the godot-particles skill, create a reusable enemy death explosion effect for my 2D Godot 4.x game. Use GPUParticles2D with a ParticleProcessMaterial configured for a burst effect: EMISSION_SHAPE_SPHERE with radius, one_shot enabled, 64 particles, 0.8s lifetime, explosiveness at 0.9, and a color gradient that goes from bright yellow to orange to transparent red. Include the spawning script that positions the effect at the enemy's global_position before emitting, and auto-frees the node after the lifetime expires. Make sure emitting is set to false by default to avoid the premature-emit bug.

### Build a UI screen following the design system

> Using the godot-ui-system skill, create a Settings screen for my Godot 4.x game following the full design system workflow. The screen needs a dark translucent background with the hex grid shader overlay, a title label using text_gold color at font size 36, volume sliders (master, SFX, music) using the HSlider theme style, a resolution dropdown, and a "Back" button. Include the standard tween entrance animation (title slides down, controls stagger from left) and button hover/press feedback with SFX. Follow the "New Menu Screen" hook from the UI system.

### Debug signal connection issues

> Using the godot-debugging and godot-gdscript-mastery skills, help me troubleshoot signal connection problems in my Godot 4.x project. My player's HealthComponent emits a "died" signal but the GameManager never receives it. The connection is made in GameManager._ready() via get_node("/root/Main/Player/HealthComponent").died.connect(_on_player_died). The game crashes intermittently with "Signal 'died' is already connected." Walk me through the debugging steps, explain the likely timing and lifecycle issues, and show me the corrected approach using proper null checks and connection guards.

### Refactor to use static typing

> Using the godot-gdscript-mastery skill, refactor the following GDScript file to use full static typing. Add explicit types to every variable declaration, function parameter, and return type. Replace any untyped `var x = value` with `var x: Type = value`. Replace any `get_node()` calls in _process with cached @onready references. Flag any dictionary access that uses bracket notation without a .get() default. My project targets Godot 4.x and I want the code to pass the type_checker.gd validation script.

### Create a resource-based weapon data system

> Using the godot-gdscript-patterns and godot-best-practices skills, design a resource-based weapon system for my Godot 4.x action game. I need a WeaponData resource class with exported fields for name, damage, attack_speed, range, description, icon texture, projectile scene, and attack sound. Then create a Weapon component script that takes a WeaponData export and implements attack(), with a cooldown timer and signal emission for attack_started and attack_hit. Show me how to create .tres files for a sword and a bow, and how to swap weapons at runtime by assigning a different resource.

---

## Advanced

Power-user patterns and complex systems that combine multiple skills.

### Generate a roguelike dungeon using Walker method

> Using the godot-genre-roguelike and godot-best-practices skills, implement a procedural dungeon generator for my 2D roguelike built in Godot 4.x. Use the Walker (drunkard's walk) algorithm with a TileMapLayer, configurable map dimensions (50x50 default), up to 5 concurrent walkers, and 500 max steps. The generator must accept a seeded RandomNumberGenerator so runs are reproducible and shareable. After floor generation, add a post-processing pass that places a spawn point, an exit staircase, and 3-5 enemy spawn markers. Include the RunManager autoload that tracks current_seed, current_floor, and resets state on run start.

### Design an upgrade/relic system with synergies

> Using the godot-genre-roguelike and godot-gdscript-patterns skills, build a relic system for my Godot 4.x roguelike. Each relic is a Resource with an id, name, icon, description, and hook methods: on_pickup, on_damage_dealt, on_kill, and on_floor_start. Create a RelicManager that holds the player's collected relics and calls the appropriate hooks during gameplay events. Implement three example relics: Vampirism (heal 5 HP on kill), Glass Cannon (+50% damage but -25% max HP on pickup), and Lucky Coin (10% chance to double gold on floor start using the seeded RNG). Include a synergy check that detects when the player holds both Vampirism and Glass Cannon and prints a synergy activation message.

### Create a Director AI for dynamic difficulty

> Using the godot-genre-roguelike, godot-gdscript-patterns, and godot-best-practices skills, implement a Director AI system for my Godot 4.x action roguelike. The Director is an autoload that tracks a "tension" float (0.0 to 1.0) based on player health percentage, time since last damage taken, kill streak, and current floor. It exposes a get_spawn_pressure() method that other systems use to decide spawn rates and enemy tier selection. When tension drops below 0.3, it increases spawn frequency. When tension exceeds 0.8, it backs off to let the player recover. Use typed signals for tension_changed and spawn_pressure_updated. Include a debug overlay that shows the current tension value during development builds.

### Set up CI/CD with headless Godot tests

> Using the godot-best-practices and godot-debugging skills, create a GitHub Actions CI workflow for my Godot 4.x project. The workflow should download Godot 4.4 stable, run my headless test suite via "godot --headless --script tests/run_tests.gd", and fail the build if any test returns false. Add a second job that exports a Windows build using the export preset. Include the run_tests.gd test runner script that discovers and executes all test files in the tests/ directory, where each test file exports a "func run() -> bool". Show me how to write a sample test that validates my SaveManager can round-trip save and load data correctly.

### Build a complete component-based entity system

> Using the godot-gdscript-patterns, godot-gdscript-mastery, and godot-best-practices skills, architect a component-based entity system for my Godot 4.x game. I need a HealthComponent (with damage, heal, invincibility frames, and died signal), a HitboxComponent (Area2D that detects HurtboxComponents and emits hit), a HurtboxComponent (receives hits and forwards damage to HealthComponent), and a MovementComponent (handles velocity, acceleration, and friction for CharacterBody2D). Each component must use full static typing, have a class_name, and communicate via signals only. Show me how to compose them on a Player scene and an Enemy scene, with the parent scripts connecting the signals.

### Integrate MCP servers for a runtime validation workflow

> Using the omega-gdscript-expert and mcp-server-index skills, set up a validation workflow for my Godot 4.x project. I want to use the gopeak MCP server to run the project headlessly, capture runtime errors from the editor log, and verify that a specific scene loads without errors. Then use context7 to confirm the correct API signatures for any nodes I am unsure about, and godot-asset-library to check whether an existing addon solves my pathfinding problem before I write a custom solution. Walk me through the MCP dispatch rules and show me the sequence of tool calls for this full validation loop.

---

## Tips for Writing Your Own Prompts

When you write custom prompts, keep these patterns in mind:

1. **Name the skills explicitly.** Start with "Using the [skill-name] skill" so the AI activates the right knowledge.
2. **State your Godot version.** Always mention "Godot 4.x" or the specific minor version you target.
3. **Describe your project context.** A one-sentence description of your game type (2D platformer, tower defense, roguelike) helps the AI tailor its output.
4. **Ask for specific deliverables.** "Create a script" is better than "help me with enemies." Name the files, classes, and signals you expect.
5. **Mention constraints.** If you need static typing, a specific node type, or compatibility with an existing autoload, say so up front.
