tower-defense
Designs tower defense games in any engine: lane and maze pathing, wave pacing, targeting priorities, armoured and flying counters, and the gold economy, with a wave-curve checker. Use for a Bloons- or Kingdom Rush-like, or late waves that are impossible or trivial or a dominant tower.
Install / Use
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill tower-defenseInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OtherSupported Platforms
Our assessment of tower-defense
tower-defense scores 94/100 on our quality scale, 37th of 330 Other skills we index (top 12%).
Its SKILL.md is 6.5 KB long, well organised into 16 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
With 8,904 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 4 days ago, so tower-defense is actively maintained.
- Our last check on 2026-11-16 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
tower-defense compared with similar skills
All 4 of these similar skills score higher than tower-defense; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| tower-defense (this skill)by gamedev-skills | 94 | 8.9k | 4d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.md |
| x402by browser-use | 100 | 121.0k | 3d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
Frequently asked questions
- How do I install tower-defense?
- Run
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill tower-defense. The install tabs above show the steps for each supported agent. - Which AI agents does tower-defense work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is tower-defense safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is tower-defense still maintained?
- The repository was last updated 4 days ago, so tower-defense is actively maintained.
Skill content
View source on GitHubname: tower-defense description: > Build a tower defense: enemies pathing along lanes, wave spawning, towers that auto-target and fire, an economy, and lives. Use for a tower-defense/wave-defense game, or balancing waves and economy.
Tower Defense
A playbook for tower defense — enemy pathing, wave spawning, tower targeting, and the economy that ties them together. This is a compositional skill: it orchestrates pathing, AI, and UI into a TD loop. It does not re-teach pathfinding; it defines the systems and the balance levers (DPS vs. HP vs. income) that decide whether a TD is tense or trivial.
When to use
- Use when building a game where the player places towers that automatically attack waves of enemies following a path, spends earned currency to expand/upgrade, and loses if too many enemies leak through.
- Use when designing wave composition/pacing, tower targeting priorities, or the gold economy.
When not to use: the player directly controls a shooter → fps-shooter. Free-form base
building with needs → survival-crafting. For the pathfinding algorithm itself, use game-ai.
Core loop
Prepare (place/upgrade towers with current gold) → start the wave → enemies path toward the goal while towers auto-fire → earn gold from kills → survive the wave → repeat against a harder one. The tension is a planning puzzle: is my current DPS enough for what's coming, and can I afford the answer?
Must-have systems
- Enemy path — waypoint lanes, or grid + pathfinding for maze TD (refs).
- Wave spawner — timed, scripted sequences of enemy types with per-wave scaling.
- Towers — range, fire rate, damage, projectile/hitscan, splash; placement validity.
- Targeting — per-tower priority (first/last/closest/strongest/weakest) (refs).
- Economy — gold from kills + wave bonuses; tower/upgrade costs; sell refund.
- Lives / leak — enemies reaching the goal cost lives; 0 = game over.
- Wave/prep UI — lives, gold, next-wave preview, start-next-wave control.
Design knobs
| Knob | Effect | Notes | | ------------------------- | ----------------------- | ---------------------------------------- | | Enemy HP growth/wave | upgrade pressure | Geometric ~1.1–1.2× (refs). | | Income vs. HP curves | difficulty | Player should almost afford each wave. | | Tower DPS / range / cost | tower identity | Cheap+wide vs. expensive+tall. | | Targeting priority | optimal placement | Changes play more than raw stats. | | Enemy variety | counters one-build wins | Fast / armored / flying / swarm / boss. | | Leak penalty | stakes | Cost lives and lost bounty. | | Upgrade vs. build economy | strategy depth | Diminishing upgrade returns. | | Wave pacing | tension curve | Spike → breather → spike, not monotonic. |
Patterns
1. Wave spawner (timed, data-driven)
# Pseudocode. A wave is data: a list of (enemy_type, count, spacing). Spawn over time.
wave = [ ("grunt", 10, 0.5), ("runner", 5, 0.3), ("tank", 2, 1.0) ]
def run_wave(wave):
for enemy_type, count, spacing in wave:
for _ in range(count):
spawn_enemy(enemy_type, at=path[0]) # enter at the path start
wait(spacing) # seconds between spawns (use a timer/coroutine)
# wave clears when all spawned enemies are dead or have leaked
2. Tower targeting (filter to range, then pick by priority)
# Pseudocode. "First" (furthest along path) is the standard default for stopping leaks.
def acquire_target(tower, enemies, mode="first"):
in_range = [e for e in enemies if distance(tower.pos, e.pos) <= tower.range]
if not in_range: return None
if mode == "first": return max(in_range, key=lambda e: e.progress) # furthest along path (stop leaks)
if mode == "last": return min(in_range, key=lambda e: e.progress) # least progress (guard the entrance)
if mode == "closest": return min(in_range, key=lambda e: distance(tower.pos, e.pos))
if mode == "strongest":return max(in_range, key=lambda e: e.hp) # burn down tanks first
if mode == "weakest": return min(in_range, key=lambda e: e.hp) # secure kills / last-hit bounty
return in_range[0]
3. "Can this lane hold?" sanity check (DPS vs. HP)
# Pseudocode. One tower's damage to one enemy crossing its range.
tower_dps = tower.damage * tower.fire_rate
time_in_range = tower.range_coverage_length / enemy.speed
damage_dealt = tower_dps * time_in_range
# Lane holds if summed damage_dealt from covering towers >= enemy.hp (per enemy). See refs.
Pitfalls / failure modes
- Enemy HP scales slower than player income/DPS → game trivializes after a few waves. Tune the HP curve against the income curve (refs).
- One dominant tower/strategy → no decisions. Add enemy types that hard-counter builds (armored vs. rapid-fire, flying vs. ground-only) and diminishing upgrade returns.
- Maze TD that can fully block the goal → enemies get stuck/softlock. Forbid placements that sever the path; recompute paths when towers change (refs).
- No next-wave telegraph → specials feel random and unfair. Preview upcoming composition.
- Per-frame movement unscaled by
dt→ speed varies with frame rate. Scale steering bydt. - Leaks only cost lives, not gold → leaking is sometimes optimal. Make leaks lose bounty too.
- Monotonic difficulty ramp → exhausting. Pace spikes and breathers.
Composition (build it from these skills)
- Pathing:
game-aifor A*/flow-field/steering; for fixed lanes, simple waypoint following. - Enemy movement:
godot-2d-movement(or engine equivalent) to move along the path;unity-navmeshfor nav-based pathing. - Map:
godot-tilemap/unity-tilemap-2dfor the grid/lanes;level-designfor map layouts. - Data:
godot-resources/unity-scriptableobjectsto define towers, enemies, and waves as assets. - UI:
game-ui-uxfor HUD layout, scaling, and the build menu;godot-ui-controlfor the concrete widgets (lives, gold, wave preview). - Polish:
audio-designfor fire/hit/leak sound cues.
References
- For path representations (waypoints / A* / flow fields), targeting modes, DPS and economy
math, enemy scaling, and wave pacing, read
references/balancing.md.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
x402
121.0kSet up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
