# godot-genre-tower-defense

A Godot skill for tower defense work: wave flow, target priorities, path checks and economy balance. Useful once a project outgrows a single turret script.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 303 installs · ★ 893
- Author: thedivergentai
- License: LGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-genre-tower-defense/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-genre-tower-defense

## What it does

The skill frames the genre as a loop: build, wave, defend, reward, harder waves. Most of the file is a list of things it tells the agent never to do. Towers have to fill different roles — aura slow, armor piercing, anti-air, burst sniper, splash damage — and early waves should not feel like filler, so an early-call bonus is expected.

Mazing gets its own section. Before a tower placement is committed, the agent is told to confirm a route to the exit still exists through `NavigationServer2D.map_get_path()`. Baking navigation synchronously is ruled out; `bake_navigation_polygon()` belongs on a worker thread, otherwise placement stutters the frame. Grid math stays in `Vector2i`/`Vector3i` rather than world coordinates.

Performance rules are strict. Calling `get_overlapping_bodies()` every frame is banned in favour of `body_entered`/`body_exited` signals feeding a local target cache. Target priorities use `StringName` values like `&"first"` and `&"strongest"`, acquire searches are throttled across frames, and above 500 projectiles the skill routes them through `PhysicsServer2D/3D` with object pooling. Waves live in `.tres` resources instead of switch statements, and co-op purchases are validated server-side. The repo ships `wave_manager.gd`, `tower.gd` with an FSM, `tower_targeting_system.gd`, `tower_defense_patterns.gd` and `grid_path_validator.gd`, plus reference docs on architecture and mechanics.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-genre-tower-defense -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/godot-genre-tower-defense/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/godot-genre-tower-defense/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-genre-tower-defense -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/godot-genre-tower-defense/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-genre-tower-defense -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-genre-tower-defense/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install thedivergentai/Game-Dev-Agentic-Skills godot-genre-tower-defense
```

2. **Manually: put the files in place**
- File: `.github/skills/godot-genre-tower-defense/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-genre-tower-defense -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/thedivergentai/Game-Dev-Agentic-Skills --path skills/godot-genre-tower-defense
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/godot-genre-tower-defense/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-genre-tower-defense -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-genre-tower-defense/SKILL.md

## When to use it
- define waves as resources instead of a giant switch
- stop players from sealing the exit with towers
- pick a target by priority without scanning every enemy each frame
- keep hundreds of projectiles from stuttering garbage collection
- validate tower purchases on the server in co-op

## Example prompts
- Build the enemy wave with `wave_manager.gd` and a `.tres` resource
- Check with `NavigationServer2D.map_get_path()` that a path to the exit survives this tower placement
- Move target selection in `tower_targeting_system.gd` to FIRST priority using `progress`

## Similar
- [orbit-card](https://affpapa.org/en/nevibecode/skills/orbit-card.md) — skill · 10000 installs
- [cad](https://affpapa.org/en/nevibecode/skills/cad.md) — skill · 14000 installs
- [step-parts](https://affpapa.org/en/nevibecode/skills/step-parts.md) — skill · 11200 installs
- [sdf](https://affpapa.org/en/nevibecode/skills/sdf.md) — skill · 10500 installs
- [urdf](https://affpapa.org/en/nevibecode/skills/urdf.md) — skill · 10500 installs
- [hatch-pet](https://affpapa.org/en/nevibecode/skills/hatch-pet.md) — skill · 3300 installs

From the same set: [thedivergentai/game-dev-agentic-skills](https://affpapa.org/en/nevibecode/by/thedivergentai/game-dev-agentic-skills.md) — 61 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
