# godot-animation-tree-mastery

Guides AI coding agents through Godot AnimationTree setups, StateMachine graphs, and blend spaces. Useful when building character movement and combat layers.

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

## What it does

This skill instructs the agent on structuring Godot's `AnimationTree` without fighting the engine. Calling `play()` directly on `AnimationPlayer` disrupts tree execution and creates visible jitter, so runtime transitions must use `travel()` or relative parameter paths like `"parameters/StateMachine/playback"`. The rules also require setting `$AnimationTree.active = true` explicitly during `_ready`.

A core focus is avoiding CPU overhead and cache invalidation. Writing parameters through `set()` every physics frame without checking for value changes causes stutter, which `sync_parameter_manager.gd` resolves with guarded updates. The guidelines steer directional inputs into `BlendSpace2D`, reserve `BlendSpace1D` for linear speed, and direct layered upper-body actions into `Blend2` or `Add2` nodes.

The repository includes dedicated GDScript templates for complex needs. Files like `nested_state_machine.gd` handle sub-machines for combat, while `root_motion_animtree_sync.gd` transfers root motion into `CharacterBody`. For long-running sequences, relying on `auto_advance` is prohibited to avoid corrupted character states when animations get interrupted.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

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

## When to use it
- configure state transitions with `AnimationNodeStateMachinePlayback`
- blend directional movement in `BlendSpace2D` nodes
- isolate upper-body animations using bone filter masks
- transfer root motion data into `CharacterBody` movement
- prevent redundant parameter writes to stop cache drops

## Example prompts
- Set up an AnimationTree for my 3D character using BlendSpace2D for strafing and travel() for state transitions
- Refactor my attack animations to use a nested state machine without direct AnimationPlayer play() calls
- Create an upper-body aiming overlay using BlendTree and bone masking

## Similar
- [godot-csharp](https://affpapa.org/en/nevibecode/skills/godot-csharp.md) — skill · 5900 installs
- [godot-animation](https://affpapa.org/en/nevibecode/skills/godot-animation.md) — skill · 6700 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
- [godot-mcp-enhanced](https://affpapa.org/en/nevibecode/mcp/godot-mcp-enhanced.md) — MCP server · ★ 103
- [spritecook-use-assets-in-godot](https://affpapa.org/en/nevibecode/skills/spritecook-use-assets-in-godot.md) — skill · 555 installs

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
