
godot-animation-tree-mastery
Expert patterns for AnimationTree including StateMachine transitions, BlendSpace2D for directional movement, BlendTree for layered animations, root motion, transition conditions, advance expressions, and state machine sub-states. Use for complex character animation systems with movement blending and state management. Trigger keywords: AnimationTree, AnimationNodeStateMachine, BlendSpace2D, BlendSpace1D, BlendTree, transitionrequest, blendposition, advanceexpression, AnimationNodeAdd2, AnimationNodeBlend2, rootmotion.
- Installs
- 419
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-animation-tree-mastery- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads godot-animation-tree-mastery automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
AnimationTree Mastery
Expert guidance for Godot's advanced animation blending and state machines.
NEVER Do
- NEVER call
play()on AnimationPlayer when using AnimationTree — AnimationTree controls the player. Directly callingplay()causes conflicts and jitter. Useset("parameters/transition_request")ortravel()instead. - NEVER forget to set
active = true— AnimationTree is inactive by default. Animations won't play until$AnimationTree.active = true. - NEVER use absolute paths for parameter access — Use relative paths like
"parameters/StateMachine/transition_request". This ensures compatibility when nodes move in the hierarchy. - NEVER leave
auto_advanceenabled for interactive states — It causes immediate transitions. Use it only for automated sequences like combo chains or death-to-respawn. - NEVER use
BlendSpace2Dfor 1D blending — Blending only speed? UseBlendSpace1D. Blending only two states? UseBlend2.BlendSpace2Dis specifically for X+Y directional inputs (strafe). - NEVER update
AnimationTreeparameters every frame without a guard — Setting parameters viaset()every frame regardless of change causes cache invalidation and potential stutter. Check equality first. - NEVER use deep, nested
BlendTreesfor simple logic — Every layer adds CPU overhead. If logic can be handled in aStateMachineor a simple script-drivenBlend2, do it there. - NEVER forget to handle
await get_tree().process_framewhen updating parameters synchronously — Sometimes the tree needs one frame to reconcile state before the next parameter change takes effect. - NEVER rely on
auto_advancefor long cutscenes — If an animation is interrupted,auto_advancecan put the character in a broken state. UseMethod Tracksto signal state completion instead. - NEVER use
Syncgroups for animations with wildly different lengths — It forces one animation to play at an extreme speed. UseTimeScaleor separate layers for mismatching cycles.
Available Scripts
MANDATORY: Read the appropriate script before implementing the corresponding pattern. Do NOT Load references/advanced-graph-recipes.md unless nested combat graphs, IK look-at, or deep BlendTree layering are in scope.
sync_parameter_manager.gd
Guarded AnimationTree parameter writes — prevent redundant set() churn every physics frame.
statemachine_travel_code.gd
Programmatic AnimationNodeStateMachinePlayback via travel() / start().
tree_travel_manager.gd
Trigger: multi-machine travel / request queue. Centralizes travel requests across nested playback paths without calling AnimationPlayer.play().
nested_state_machine.gd
Trigger: locomotion + combat (or air) sub-machines. Nested StateMachine parameter paths and playback handoff.
skeleton_ik_lookat.gd
Trigger: aim/look-at beside the tree. LookAtModifier3D / IK that must not fight bone tracks the tree owns.
reactive_oneshot_vfx.gd
AnimationNodeOneShot for recoil, blinks, and hit reactions.
dynamic_timescale_control.gd
Runtime playback speed for bullet-time or haste multipliers.
advanced_transition_masking.gd
Bone filter masks on Add2/Blend2 for upper/lower body separation.
blendtree_logic_mixing.gd
Interactive combat layer mixing inside BlendTree graphs.
root_motion_animtree_sync.gd
CharacterBody motion extraction from AnimationTree root motion.
sync_group_layering.gd
Sync groups for multi-layer clips that share length (e.g. walk + reload).
nested_tree_architecture.gd
Hierarchical StateMachine / nested parameter path architecture.
runtime_tree_debugging.gd
Visualize current states, travel paths, and blend values at runtime.
animation_event_dispatcher.gd
Method-track → dispatch_event(name, metadata) signal bridge; decouple VFX/audio from graph code.
animation_complexity_manager.gd
Swap tree_root hero vs crowd graph when VisibleOnScreenNotifier3D culls off-screen actors.
Decision Tree (replace inline tutorials)
| Need | Prefer | Script |
|---|---|---|
| Simple clip swap / UI / prop | AnimationPlayer only | Peer godot-animation-player |
| 5+ gameplay states, travel | StateMachine root | statemachine_travel_code.gd, tree_travel_manager.gd |
| Speed only blend | BlendSpace1D | Guarded writes via sync_parameter_manager.gd |
| Strafe / aim X+Y | BlendSpace2D | Same + blend_position |
| Upper-body overlay / combat layer | BlendTree Add2/Blend2/OneShot | blendtree_logic_mixing.gd, reactive_oneshot_vfx.gd |
| Nested combat/air under locomotion | Nested SM | MANDATORY nested_state_machine.gd |
| Look-at / IK | Modifier beside tree | MANDATORY skeleton_ik_lookat.gd |
| Deep graph recipes | references/ | Do NOT Load unless needed → advanced-graph-recipes.md |
Core Concepts (compact): AnimationTree owns an AnimationPlayer via anim_player; root is StateMachine / BlendTree / BlendSpace; parameters use relative "parameters/..." paths; set active = true once in _ready.
@onready var anim_tree: AnimationTree = $AnimationTree
@onready var playback: AnimationNodeStateMachinePlayback = anim_tree.get("parameters/StateMachine/playback")
func _ready() -> void:
anim_tree.active = true
Do not paste full StateMachine/BlendSpace editor walkthroughs — author graphs in the AnimationTree editor, then drive them with the scripts above.
Expert insights (WHY — keep in body)
- Advance conditions vs travel — WHY: bool conditions auto-fire transitions;
travel()is explicit pathing. Use conditions for damage/death events; travel for locomotion intent. - BlendSpace2D cost — WHY: 8-way blending samples multiple clips. Use BlendSpace1D for speed-only; Blend2 for two-state crossfades.
- Parameter guard — WHY: redundant
set()invalidates tree cache every frame. Route writes through sync_parameter_manager.gd. - Method tracks — WHY: gameplay should listen to dispatcher signals, not parse animation names. See animation_event_dispatcher.gd.
Deep recipes (on demand)
| Topic | Reference / script |
|---|---|
| StateMachine / BlendSpace editor recipes | statemachine-and-blendspace.md |
| Nested combat / IK / root motion | advanced-graph-recipes.md |
Reference
Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing work to a peer domain — do not preload the whole lattice.
Official Documentation
- Using AnimationTree — Canonical BlendTree / StateMachine / BlendSpace graph workflow that drives an AnimationPlayer without calling
play()yourself. - Introduction to the animation features — When to graduate from AnimationPlayer-only clips to an AnimationTree for blending, travel, and layered presentation.
- Animation track types — Method and value tracks that fire gameplay events (footsteps, hitboxes) from clips the tree is already blending.
- AnimationTree —
active,tree_root,anim_player, root-motion getters, and theparameters/*path contract used throughout this skill. - AnimationNodeStateMachine — Authoring nested locomotion/combat graphs and wiring transitions before code calls
travel(). - AnimationNodeStateMachinePlayback — Runtime
travel(),start(),get_current_node(), and travel-path inspection for code-driven state changes. - AnimationNodeStateMachineTransition — Advance conditions,
auto_advance, Sync, xfade, and priority rules that prevent sticky or immediate unwanted transitions. - AnimationNodeBlendSpace2D — Directional strafe/aim blending via
blend_position(use BlendSpace1D when only speed is needed). - AnimationNodeBlendTree — Layered Add2/Blend2/OneShot graphs for upper-body aim, combat overlays, and filter masks.
- AnimationNodeOneShot — FIRE/ABORT request enum for recoil, hitreact, and other high-priority non-looping overlays.
- AnimationNodeTimeScale — Per-subtree playback speed for haste, stun, and bullet-time without mutating Engine.time_scale.
- LookAtModifier3D — Skeleton look-at driven beside the tree; see migration-notes.md for
relativedefault change.
Related Skills
Prerequisites
- godot-animation-player — AnimationTree owns playback of clips authored on AnimationPlayer; track layout and ownership must be correct before blending.
- godot-input-handling — Stick/keyboard vectors and actions that feed
blend_position, advance conditions, and travel targets each physics frame. - godot-signal-architecture — Safe wiring for method-track dispatchers and animation-finished style signals without lifecycle leaks.
Complements
- godot-2d-animation — Sheet/cutout and 2D locomotion presentation that still uses AnimationTree BlendSpaces or simple travel graphs.
- godot-state-machine-advanced — Gameplay FSMs that should own intent while AnimationTree owns presentation travel and blends.
- godot-physics-3d — CharacterBody3D / move_and_slide integration for AnimationTree root-motion extraction.
- godot-characterbody-2d — Fixed-timestep 2D locomotion inputs that drive StateMachine travel and BlendSpace positions.
- godot-tweening — Tweening TimeScale or blend amounts when bullet-time and combat mix ramps should be interruptible.
- godot-combat-system — Hitreact/combo layers that consume OneShot requests, upper-body Add2 masks, and nested combat sub-machines.
- godot-debugging-profiling — Profiling and logging discipline when validating travel paths, blend values, and off-screen
activeculling.
Downstream / consumers
- godot-genre-action-rpg — Locomotion + combat stance trees and ability cast OneShots built on these graph patterns.
- godot-genre-fighting — Frame-sensitive combo auto-advance and masked upper-body attacks depend on transition and BlendTree discipline here.
- godot-genre-shooter-fps — Aim/reload overlays, recoil OneShots, and look-at modifiers layered over locomotion BlendSpaces.
Master
- godot-master — Library router and mirrored module entry for cross-skill discovery.
FAQ
What does the godot-animation-tree-mastery skill do?
Expert patterns for AnimationTree including StateMachine transitions, BlendSpace2D for directional movement, BlendTree for layered animations, root motion, transition conditions, advance expressions, and state machine sub-states. Use for complex character animation systems with movement blending and state management. Trigger keywords: AnimationTree, AnimationNodeStateMachine, BlendSpace2D, BlendSpace1D, BlendTree, transitionrequest, blendposition, advanceexpression, AnimationNodeAdd2, AnimationNodeBlend2, rootmotion.
How do I install godot-animation-tree-mastery?
Run npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-animation-tree-mastery in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-animation-tree-mastery/ (personal) or .claude/skills/godot-animation-tree-mastery/ (project).
Which AI agents can use godot-animation-tree-mastery?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is godot-animation-tree-mastery safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains godot-animation-tree-mastery?
It is published by thedivergentai in thedivergentai/game-dev-agentic-skills. It has 419 recorded installs.
More from thedivergentai/game-dev-agentic-skills
godot-master
thedivergentai/game-dev-agentic-skills
Consolidated expert library for professional Godot 4.7+ game and application development. Orchestrates 92 Domain Skills through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms, (9) migrating from 4.6 to 4.7. Primary entry point for ALL Godot development tasks. Keywords: Godot 4.7, AreaLight3D, HDR, Asset Store, godot-master.
godot-shaders-basics
thedivergentai/game-dev-agentic-skills
Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.
godot-2d-animation
thedivergentai/game-dev-agentic-skills
Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animationfinished, animationlooped, framechanged, frameprogress, setframeandprogress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).
godot-ui-theming
thedivergentai/game-dev-agentic-skills
Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.
godot-gdscript-mastery
thedivergentai/game-dev-agentic-skills
Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: statictyping, signalarchitecture, uniquenodes, @onready, classname, signalupcalldown, Callable.bind, typedcollections, awaitsequence.
godot-particles
thedivergentai/game-dev-agentic-skills
Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emissionshape, colorramp, subemitter, oneshot.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.