Skip to content
ModshelfSubmit

Tool Defense

Tower defense where every enemy is one of Claude's real tool calls

GamesAbove the promptPop-up notesSlash commandDraws only
Tool Defense running in Claude Code

Recorded on Claude Code 2.1.287 in a sandbox. Claude's replies are scripted; everything the mod draws is real.

What it does

Run /defense and a tower-defense board appears above the prompt: a winding road that ends at your base. Every tool call Claude makes sends an enemy down the road the moment the call starts, and the tool decides what it is: Bash sends a fast runner, Edit or Write a slow tank, a web or MCP call a flyer, an Agent a boss, and anything else a scout. Build towers beside the road and stop them before ten reach the base. Between Claude's calls a trickle of scouts keeps the game going.

How to use it

  • /defense opens the board. /defense stop or the close button above it closes it.
  • Click a free cell beside the road to build a tower (25 gold). Click a tower to upgrade it (30, then 50 gold) for more range, damage and fire rate. Kills pay gold and points.
  • A click also gives the board the keyboard: Space or P pauses, R starts over, and Esc hands the keys back to the prompt.
  • Build before you send a prompt. A long turn with lots of tool calls is the real wave.

Good to know

  • When Claude finishes its turn, the status line says "Claude is done", but the game keeps running.
  • From each tool call it reads only the tool's name. Your best score is kept in the mod's own store, and it makes no network calls.
  • It isn't listed in a plugin marketplace. The repo's own installer, npx claude-code-templates@latest --mod games/tool-defense, copies it into your project's .claude/skills/tool-defense/.