tea-x-random/unity-game-skills/unity-animation

Claude Code and agent skill by tea-x-random/unity-game-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Create gameplay-synced 2D sprite or 3D skeletal animation in Unity. Use when actors are static/stiff, enemies slide, towers do not aim/fire, characters lack idle/move/attack/hit/death, bosses lack tells, or pickups need motion. Covers per-role clip catalogs, PixelLab anchor-first pixel sheets, technically validated Tripo rigs and non-pixel pre-render, Animator Controllers, state machines, blend trees, root motion, retargeting, deformation tests, and Animation Events that fire projectiles/damage on the contact frame. Also covers anticipation, follow-through, loop quality, sprite atlases, bone budgets, compression, GPU skinning and mobile culling. Gemini frame strips are concept/fallback because identity drifts.

Install

npx vskill@latest install tea-x-random/unity-game-skills/unity-animation

SKILL.md

The same SKILL.md was published earlier as tea-x-random/unity-game-skills/unity-animation.

Unity animation

Static art reads as a prototype. AAA games are defined by motion — an archer that draws, holds, and looses; an enemy that walks with weight and flinches when hit; a coin that bobs and pops on pickup. Animation is a first-class deliverable for every asset that acts, not optional polish. A perfectly-rendered but static archer fails the bar exactly like a flat-fill background does.

Core rule: every asset that *acts* in the game must be animated, and any action that has a gameplay effect must fire that effect on the correct animation frame. A shoot animation that doesn't release the projectile on the release frame is broken, not decorative.
Pixel-art motion → PixelLab anchor-first. Non-pixel motion → Tripo/Animator. Gemini → concept/reference. Pixel art must be generated at native canvas with unity-pixel-art; do not render Tripo/3D and downscale into pixel sprites. For non-pixel/high-res 2D, Tripo3D rig + pre-render still holds identity across frames. Gemini frame-by-frame generation drifts and is fallback/concept only.

When to use which track

  • Pixel-art sprite animation (PixelLab via `unity-pixel-art`) — the DEFAULT for pixel-art games. Lock one anchor/base sprite, then drive motion with PixelLab's skeleton animation (estimate-skeleton → author per-frame poses → animate-skeleton), rotate for directions, and inpaint for fixes — then slice/build Animation Clips here. Every PixelLab call carries the palette lock (color_image: master palette for anchors, the anchor's extracted sub-palette for derived frames) — a call without it is invalid. Skeleton-driven frames stay structurally consistent (identity, clusters, palette, baseline, silhouette); PixelLab animate-text and image-model frame strips drift and are fallback only.
  • 3D skeletal animation (Tripo) — the DEFAULT for runtime 3D and non-pixel/high-res 2D pre-render. Tripo auto-rigs the model and generates animation cycles; for 3D/2.5D assets import the rig and drive it with an Animator, and for non-pixel 2D/top-down/side games pre-render the rigged + animated model to sprite frames (../unity-3d-generator/references/prerender-2d.md).
  • Frame-by-frame 2D sprite authoring (Gemini frame strips) — FALLBACK only. Use it when Tripo is unavailable (TRIPO_API_KEY MISSING/quota-blocked) or the motion is trivial (a simple bob/tween). Independently generating each frame with an image model drifts — identity changes between frames — so it is never the first choice for real motion.
  • Procedural / tween motion — squash-stretch, bob, anticipation, screen-shake, hit-stop — layered on TOP of (or instead of, for simple props) authored animation. Owned by unity-gameplay-systems game-feel; use it for pickups, button presses, and juice.

Pick per asset: a bobbing coin needs only a tween; a pixel-art archer needs PixelLab anchor-first idle + aim + fire sheets with frame events; a non-pixel/3D archer needs authored idle + aim + fire from Tripo/Animator (pre-rendered to a strip only for non-pixel 2D).

Animation requirement catalog (per asset role)

Enumerate the required clips per asset BEFORE generating — a single static pose is almost never enough. Defaults:

Asset roleMinimum clips
Tower / turret (e.g. archer)idle, aim/charge, fire/attack (with projectile-release event), optional upgrade
Enemy / unitspawn, walk/move (loop), attack (with hit event), hurt/flinch, death
Player / heroidle (loop), move/run (loop), jump or primary action (with event), hurt, death/win
Bossthe enemy set + telegraphed attack tells (clear anticipation), phase/enrage
Collectible / pickupidle bob/spin (loop), collect pop (often a tween + VFX)
Projectile / VFXtravel (loop or tween), impact
UIbutton press, reward/win, screen transitions (see unity-ui-designer)

For a tower-defense archer specifically: idle (subtle breathing) → aim (nock + draw, can hold) → fire (loose + recoil) with an Animation Event on the bowstring-release frame that calls the shooting code to spawn the arrow. That sync is what makes it read as a real game.

Track A — 2D sprite animation

For pixel-art games, the default way to get animation frames is unity-pixel-art: create one approved PixelLab anchor sprite, then derive each clip/direction from that anchor at the native pixel canvas. Do not use 3D renders/downscales as pixel-art frames.

For non-pixel/high-res 2D, the default remains Tripo rig + pre-render (../unity-3d-generator/references/prerender-2d.md) when consistency/angles matter.

Generating per-state frame strips directly with Gemini is a FALLBACK — reach for it only when PIXEL_LABS_API_KEY / TRIPO_API_KEY are missing or quota-blocked for the chosen final route, or the motion is trivial (a simple bob). Independently generating each frame with an image model causes identity drift (the character changes between frames), so it is not the first choice for real motion.

Sheet procedure:

  1. Lock an anchor frame first, then derive the strip. For pixel art, the anchor is a PixelLab native-canvas sprite from unity-pixel-art; for non-pixel fallback strips, use an approved reference frame. Run validate_sprite.py + critique_image.py (both with --art-spec <spec> — they FAIL without a resolvable spec; --no-art-spec is exploratory-only) where applicable before expansion.
  2. Generate per-state frame strips with unity-pixel-art for pixel-art projects (master palette / anchor sub-palette as color_image on every call), or with unity-image-generator only for non-pixel fallback/concept strips: request an evenly-spaced horizontal strip of N frames on transparent background, consistent pivot/scale/baseline across frames, one clip per state. Reuse verbatim style tokens and anchor/reference images so frames stay on-model.
  • Frame-count guidance: idle/bob 2–6, walk 6–8, attack/fire 5–10. More frames = smoother but heavier; ease the in-betweens, don't just linearly tween.
  1. Gate pixel strips with the frame-vs-anchor diff (MANDATORY before slicing): unity-pixel-art/scripts/compare_frames_to_anchor.py --anchor <approved_anchor.png> --strip <clip_strip.png> --cols <N> — deterministic palette-membership + baseline/bbox-height + loose silhouette-IoU checks. Exit 1 = repair the failing frame (inpaint / --init-images freeze via unity-pixel-art), never re-roll the whole strip. Eyeballing does not replace this gate.
  2. Extrude/pad the sheet before import to prevent texture bleed: unity-image-generator/scripts/extrude_atlas.py --rows 1 --cols <N> --extrude 2 --padding 2 ...; slice using the manifest's frame rects.
  3. Slice in Unity (Sprite Editor → Grid by Cell Count / Sequence or manifest rects) with a consistent pivot/baseline. Reject sheets where the character visibly changes size or feet/ground contact drift.
  4. Build Animation Clips (one per state). Loop idle/walk at uniform 10–14 fps. Attack/hit clips NEVER use uniform spacing — author per-keyframe times (weight lives in holds, strike frames stay 50–70ms for every weapon): sword 100/60/170/70ms, spear 200/60/220/70, hammer 300/60/330/110 (windup/strike-smear/follow-through/recover). Player windup ≤100ms (anticipation on player input reads as lag); enemy windup held ≥300ms (the tell). "Feels too slow/fast" is ALWAYS a keyframe-time edit here, never a PixelLab regeneration — poses are PixelLab's artifact, timing is Unity's.
  5. Animator Controller with states + transitions driven by parameters/triggers (Speed float, Fire trigger, IsDead bool).
  6. Pack frames into a Sprite Atlas to keep draw calls down.

See references/animation-recipes.md for the clip-build + Animation Event code.

Track B — 3D skeletal animation

  1. Rig + animate via Tripo (unity-3d-generator): auto-rig source geometry, then generate/retarget the needed cycles. Start from a clean T-pose/A-pose reference; action poses commonly break auto-rigs. A successful rig task is not game-ready.
  2. Run technical model QA before import: unity-asset-pipeline/scripts/inspect_3d_asset.py --profile rigged --contract .... Reject bad bind matrices, weights, influences, bone budgets, missing clips, or scale-track warps.
  3. Import the rig as Humanoid (retargetable) or Generic (creatures/turrets); configure the Avatar and emit the realized Unity model-import report.
  4. Animator Controller with state machine + blend trees (e.g. an idle↔move blend on Speed); reuse one controller across compatible rigs.
  5. Animation Events on attack/fire clips call gameplay on the contact/release frame.
  6. Deformation gate: play bind pose, locomotion, attack and the most extreme shipped pose. Check shoulders, hips, wrists, ankles, ground contact, self-intersection, root motion and mesh collapse from the gameplay camera. Screenshots of only the rest pose fail.
  7. Retarget shared humanoid clips only after Avatar and deformation tests pass on each character.

Animation Events — sync motion to gameplay (the critical part)

The action must affect the game on the right frame, not on button-press. Add an Animation Event to the fire/attack clip at the release/contact frame that calls a method on the asset's controller (e.g. OnFireFrame() → spawn arrow; OnHitFrame() → apply damage). This applies to BOTH tracks. Without it you get the classic "the arrow leaves before the bow moves" tell. Code in references/animation-recipes.md.

Game-feel layer (load unity-gameplay-systems)

Layer procedural juice on authored animation: squash-stretch on land/impact, anticipation dip before a jump, screen-shake + hit-stop on heavy hits, ease-out-back on UI/pickup pops, haptics. This is cheap and disproportionately lifts perceived quality — but it complements authored clips, it does not replace an archer's draw-and-loose.

Animation quality bar / scorecard

Score each; fix any that fail before "done":

  • Nothing static that should move — no T-pose/frozen asset where motion is expected (auto-fail).
  • Anticipation & follow-through match the actor — enemy attacks: held ≥0.3s windup tell; player attacks: ≤100ms windup (strike by frame 1–2) with weight sold in a held follow-through. A symmetric evenly-progressing swing fails for BOTH.
  • Smoothness — enough frames / proper interpolation; no visible stutter at gameplay speed.
  • Loops seamless — idle/walk/run cycle with no pop at the loop point.
  • Gameplay sync — projectile/damage fires on the correct frame via an Animation Event.
  • Style & weight consistent across the set (all characters share timing/weight conventions).
  • Readable at gameplay scale — the action reads at the on-screen size and from the game camera.

Mobile performance

  • 2D: pack animation frames into Sprite Atlases; cap frame counts; share clips across similar enemies.
  • 3D: keep bone counts modest; enable animation compression (Optimal/keyframe reduction); consider GPU skinning; reuse one Animator Controller + retargeted humanoid clips across characters.
  • Don't animate offscreen — cull Animators (cullingMode = CullCompletely / disable when not visible).
  • Prefer a few well-timed frames over many redundant ones; bake long procedural motion where possible.

Where this sits

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
7-day trend score
7

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tea-x-random/unity-game-skills/unity-animation/badge)](https://verified-skill.com/skills/tea-x-random/unity-game-skills/unity-animation)

Something wrong with this skill or its page? Tell us.