# godot-combat-system

A skill that tells the agent how to build hitboxes, damage and i-frames in Godot. Useful for action games, RPGs and fighters.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 507 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-combat-system/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-combat-system

## What it does

The skill lays out how to build a combat system in Godot: hitbox/hurtbox architecture, damage handling through a `DamageData` resource, a health component, combat states, combos, ability cooldowns and floating damage numbers. It ships scripts: `damage_data.gd`, `health_component.gd`, `hitbox_hurtbox.gd`, `hitbox_component.gd`, `combat_system_patterns.gd`, plus `combo_system.gd`, `combat_state.gd`, `damage_popup.gd`, `combat_logger.gd`, `networked_damage_manager.gd` and `hitbox_visualizer.gd`.

Most of the file is a list of things not to do. Damage never gets subtracted from a target's health directly, because that skips armor, resistances and invincibility frames. Hitboxes stay disabled until an animation track or timed code turns them on, otherwise you get ghost hits. Damage types are `enum` and `@export_flags` bitfields, not strings. Hit filtering goes through collision layers and masks, not groups. Hitstun is not faked with `OS.delay_msec()`, since that blocks the OS thread. RigidBody impulses belong in `_physics_process`, not `_process`.

Everything assumes GDScript. Target checks use `has_method(&"take_damage")` and `is`, because the language has no exceptions. Shared stat resources need `duplicate()` per instance, or every enemy ends up sharing one health pool. Abilities are out of scope here: the skill routes them to `godot-ability-system`, composition to `godot-composition`, and FSMs to `godot-state-machine-advanced`.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-combat-system/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-combat-system
```

2. **Manually: put the files in place**
- File: `.github/skills/godot-combat-system/SKILL.md`

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-combat-system -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-combat-system/SKILL.md

## When to use it
- wire up hitboxes and hurtboxes without ghost hits
- apply damage through armor, resistances and crits
- stop multi-hit shapes from ticking every physics frame
- drive the HUD from health signals instead of direct calls
- add a combo buffer and ability cooldowns

## Example prompts
- Build the combat system in Godot: hitbox and hurtbox with Area2D, damage through DamageData and HealthComponent
- Add i-frames after a successful hit and a health_changed signal for the HUD
- Move damage types off strings onto enum and @export_flags in damage_data.gd

## Similar
- [godot-nodes-scenes](https://affpapa.org/en/nevibecode/skills/godot-nodes-scenes.md) — skill · 6400 installs
- [godot-csharp](https://affpapa.org/en/nevibecode/skills/godot-csharp.md) — skill · 5900 installs
- [cli-anything-godot](https://affpapa.org/en/nevibecode/skills/cli-anything-godot.md) — skill · 548 installs
- [godot-best-practices](https://affpapa.org/en/nevibecode/skills/godot-best-practices.md) — skill · 2100 installs
- [godot-prompter](https://affpapa.org/en/nevibecode/plugins/godot-prompter.md) — plugin · ★ 867
- [godot](https://affpapa.org/en/nevibecode/rules/godot.md) — rule · ★ 3579

From the same set: [thedivergentai/game-dev-agentic-skills](https://affpapa.org/en/nevibecode/by/thedivergentai/game-dev-agentic-skills.md) — 51 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
