# godot-characterbody-2d

A Godot 4 skill with ready-made CharacterBody2D controllers: platformer feel, top-down controls, wall jumps, dashes and one-way platforms.

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

## What it does

The skill hands the agent a set of rules plus GDScript files for locomotion on `CharacterBody2D`. You get a platformer controller built around coyote time, a jump buffer and acceleration with friction, along with separate scripts for variable jump height, wall cling and wall jump, dash with invincibility frames, air drift and a ceiling bonk reset. For top-down games the recipes for 8-way and tank controls sit in `references/movement-recipes.md`.

Most of the guidance is written as things not to do. Do not scale `velocity` by delta before calling `move_and_slide()`, do not steer a body by assigning `global_position`, and do not keep applying gravity while `is_on_floor()` is true. Drop-through platforms get their own recipe: mark the platform collider as one-way and toggle collision layers or masks for a physics tick, rather than shifting the player downward.

Start from `scripts/expert_physics_2d.gd`. Wall, dash, stair, enemy-pooling and pixel-art rounding scripts are added on top once that controller exists, and its acceleration loops don't belong in the scene file afterwards. The code targets Godot 4, since it relies on `move_and_slide()`, `is_on_floor()` and `get_slide_collision`.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

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

## When to use it
- build platformer controls with coyote time and a jump buffer
- make jump height depend on how long the button is held
- let the player drop through one-way platforms without teleporting
- add wall sliding and a wall jump
- keep movement speed independent of frame rate

## Example prompts
- Build the `CharacterBody2D` controller with coyote time and a jump buffer, starting from `scripts/expert_physics_2d.gd`
- Wire the dash with invincibility frames from `dash_state_controller.gd` into my existing controller
- Set up one-way platforms with collision layers so the hero can drop down with down plus jump

## 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
