# godot-2d-animation

Provides production-tested GDScript patterns for Godot 2D animation, covering AnimatedSprite2D sync, procedural squash and stretch, and skeletal rigs.

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

## What it does

The skill provides reference GDScript implementations for Godot 2D systems, targeting AnimatedSprite2D and AnimationPlayer nodes. It enforces strict rules against deprecated nodes like AnimatedTexture and prohibits controlling a sprite simultaneously from code and AnimationPlayer tracks. The `one_frame_sync_fix.gd` helper handles the one-frame visual glitch: calling `advance(0)` right after `play()` forces the engine to apply sprite transforms alongside properties like `flip_h`. This prevents delayed visual states.

For dynamic game feel, `procedural_squash_stretch.gd` handles velocity deformation and impact landing. Auxiliary scripts like `skeleton_2d_rig_helper.gd` and `procedural_walker_2d.gd` set up FABRIK and TwoBoneIK inverse kinematics. Managing Tweens through `tween_lifecycle_manager.gd` ensures previous tweens are terminated with `kill()`. An AnimationPlayer moving a CharacterBody2D must run on the Physics callback mode, or physics interpolation will stutter.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

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

## When to use it
- eliminate one-frame display glitches when changing animation and `flip_h` simultaneously
- apply procedural squash and stretch based on character physics velocity
- set up two-bone inverse kinematics for 2D character legs
- stop conflicting Tweens from fighting over the same sprite property
- decouple combat hitboxes and metadata from raw SpriteFrames visuals

## Example prompts
- Fix AnimatedSprite2D desync on direction change using one_frame_sync_fix.gd
- Implement procedural squash and stretch for player landing with procedural_squash_stretch.gd
- Configure a 2D skeletal IK leg rig using skeleton_2d_rig_helper.gd

## Similar
- [godot-animation](https://affpapa.org/en/nevibecode/skills/godot-animation.md) — skill · 6700 installs
- [godot-ui-control](https://affpapa.org/en/nevibecode/skills/godot-ui-control.md) — skill · 6700 installs
- [godot-best-practices](https://affpapa.org/en/nevibecode/skills/godot-best-practices.md) — skill · 2100 installs
- [cli-anything-godot](https://affpapa.org/en/nevibecode/skills/cli-anything-godot.md) — skill · 548 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) — 50 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
