Skip to main content
skill CX Codex

layer-sprite-animation — Claude Code skill for sprite animation

The layer-sprite-animation Claude Code skill builds 2D character sprites and animation cycles from an approved design. It applies to idle, walk, attack and other actions, including four- or eight-direction views.

MIT 1,100 installs ★ 10 updated 2026-09-30

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add layerai/skills --skill layer-sprite-animation -a claude-code
Open on GitHub

What layer-sprite-animation does

The skill lays out a workflow for turning one approved character design into directional sprites and animation frames. It creates views, generates a clip for each one, extracts frames, then uses pack_sprite_sheet or split_sprite_sheet to assemble or cut a sheet.

Directional views use Layer models with camera_transform; looping clips need models that support loop and fixed_duration. Frames from one clip share their alignment. Fitting or trimming them one by one can remove the vertical bob from a walk or jump. If a referenced companion skill is unavailable, the workflow says to request its installation or continue using the available tool schemas.

What it helps with

  • create character sprites for several directions from one approved design
  • make idle, walk or run cycles from video clips
  • extract animation frames and assemble a sprite sheet
  • correct changes in a character's appearance or position across frames

Example prompts for the agent

  • Create a walk cycle for this character in four directions.
  • Make sprites for an isometric game from the approved design.
  • Build a sprite sheet and find why the feet slide between frames.

How to install layer-sprite-animation

1Skills CLI (Vercel)

npx skills add layerai/skills --skill layer-sprite-animation -a claude-code

2Manually: put the files in place

~/.claude/skills/layer-sprite-animation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/layer-sprite-animation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about layer-sprite-animation

How do I install layer-sprite-animation in Claude Code?

Run npx skills add layerai/skills --skill layer-sprite-animation -a claude-code. The skill file is placed at ~/.claude/skills/layer-sprite-animation/SKILL.md.

What does layer-sprite-animation do?

It guides the creation of character sprites from multiple views, animation cycles from clips, and sprite sheets from extracted frames.

How does the skill keep frames aligned?

It extracts frames from a single clip with a locked camera and packs them without fitting each frame separately. For new directions, it uses the approved original view rather than deriving each view from the last.

Source text

SKILL.md · MIT
---
name: layer-sprite-animation
description: "Use when animating a hand-painted, vector-style or HD 2D game character with Layer: idle, walk, run, attack, hit or death cycles, 4-direction or 8-direction sprites for a top-down or isometric game, or a character sprite sheet from a single approved design. Also when frames drift off-model, feet slide, or directions do not match. Keywords: sprite animation, animation cycle, walk cycle, idle, attack, 8-direction, 4-direction, turnaround, sprite sheet, flipbook, top-down, isometric."
license: MIT
---

# Layer Sprite Animation

## Overview

A sprite set is one character seen from several directions, doing several things, frame by frame,
and every frame has to be the same character standing on the same spot. Drawing frames one at a time
cannot hold that for HD art: there is too much detail to keep on-model. The reliable route is to
let the model hold identity twice, once across directions with a camera move and once across time
with a video clip, and only then cut frames.

Pixel art is different: its cycles are short and drawn frame by frame, in `layer-pixel-art`. Rigged
skeletal animation (Spine) splits a character into parts instead, in `layer-game-assets`. Generation
mechanics and the spend gate are in the `layer` skill; motion prompting is in `layer-video`.

`pack_sprite_sheet` and `split_sprite_sheet` are named outright below because they are Layer's
deterministic sheet utilities, tools rather than models, with no alternative to discover.

If a sibling skill named here is missing from your available skills, ask the user to install it
(`npx skills add layerai/skills --skill <name>`); unattended, proceed from tool schemas and flag the
gap.

## Quick reference

| Step                    | Tool or input                                                                        |
| ----------------------- | ------------------------------------------------------------------------------------ |
| One approved design     | `text_to_image`, neutral standing pose, isolated, at the game's camera pitch         |
| Directions              | `multi_angle` use case, approved design as source, `camera.yaw_degrees`              |
| Directions share a size | `output_fit`: `FIXED` canvas, `anchor: "BOTTOM_CENTER"`, same on every run           |
| A cycle per direction   | `image_to_video`, the direction still as `first_frame` (and `last_frame` for a loop) |
| Frames                  | The clip's `file_id` in an image slot at `video_frame_seconds`, `batch_size: 1`      |
| The sheet               | `pack_sprite_sheet`, one row per direction                                           |
| An existing sheet       | `split_sprite_sheet` with the grid it was made on, `trim_transparent` off            |

## Directions from one design

Generate and approve one design first, drawn at the game's camera: side view for a platformer,
three-quarter top-down for an RPG. Then make every other direction from it by moving the camera, not
by re-describing the character.

`execute_forge` takes a structured `camera` on models whose `get_base_model` capabilities report
`camera_transform`; filter `list_base_models` with `filter.use_case: "multi_angle"` to find them.
Attach the approved design as the slot the model supports (`init_image` or `reference_image`) and set
`yaw_degrees`: 90 is the right side, 180 the back, 270 the left. Eight directions step by 45. For a
top-down game keep one `pitch_degrees` on every direction, so the set shares a camera.

Generate every direction from the **original** front view, never from the previous direction, so
errors do not stack. Symmetric characters often need only five of eight directions, since engines
commonly mirror the left-facing ones; ask whether the game does before paying for all eight.

Set the same `output_fit` on every direction run: `canvas: "FIXED"`, one `width` and `height`, and
`anchor: "BOTTOM_CENTER"`, which stands every sprite on the same point. Without it, each direction
comes back at its own size and the character changes height when it turns. Run the approved front
view through the same model once with `camera` omitted (which keeps its view) and the same
`output_fit`, so the front shares the canvas too.

## Cycles from a clip

Animate each approved direction with `image_to_video`, passing it as `first_frame`. For a cycle that
repeats (idle, walk, run), filter for `loop` and `fixed_duration` and pass the same still as
`last_frame` too, so the motion returns to its start. One-shot actions (attack, hit, death) take
`first_frame` only.

The prompt has three jobs: the action, **in place**, and a still camera. "Walks in place, a full
stride cycle, body does not travel across the frame. Locked-off camera, plain flat background."
A character that walks out of frame cannot become a cycle.

## Frames out of the clip

Any image slot accepts a video `file_id` and takes one frame of it at `video_frame_seconds` (or
`video_frame`: `first`, `middle`, `last`). Pull evenly spaced frames, typically six to eight for a
walk, into a `background_removal` run each, at `batch_size: 1` since the default is four.

Frames from one locked-camera clip are already registered to each other. Pack them as they are:
`pack_sprite_sheet` centres each frame in one cell size without rescaling, so a registered cycle
stays registered. Do not refit or trim cycle frames one by one: anchoring each frame's bottom
erases a jump and makes a walk's bob vanish. When cutting an existing sheet with
`split_sprite_sheet`, leave `trim_transparent` off for the same reason.

## Worked example

"An 8-frame walk for our knight in four directions, for a top-down RPG."

1. The approved three-quarter front view has a `file_id`.
2. `list_base_models` with `filter.use_case: "multi_angle"`; `get_base_model` on the first result to
   confirm `camera_transform` and which slot it takes. Three runs at `yaw_degrees` 90, 180, 270,
   one shared `pitch_degrees`, and the same `output_fit: {canvas: "FIXED", width: 512, height: 512,
anchor: "BOTTOM_CENTER"}`. Approve one of each.
3. `list_base_models` with `filter.use_case: "image_to_video"` and
   `filter.capabilities: {loop: true, fixed_duration: true}`. Four clips, each direction as both
   `first_frame` and `last_frame`, prompted to walk in place.
4. Thirty-two frame runs (eight per clip) on a `background_removal` model.
5. Price all of it before the first run: three direction runs, four clips, thirty-two frame runs,
   each kind estimated as the run it will be. This will clear 20 CUs; ask and wait for an explicit
   yes.
6. Execute in that order, polling at `poll_interval_seconds`. Review each direction's frames
   together and redo any clip whose character drifted.
7. `pack_sprite_sheet` with all thirty-two `file_id` values in direction order, `columns: 8`.

## Common mistakes

- Drawing frames one at a time for HD art, so the character drifts.
- Generating each direction from the previous one instead of the original.
- Different camera pitch per direction.
- Leaving `output_fit` off, so the character changes size when it turns.
- A walk that travels across the frame instead of in place.
- Trimming or bottom-anchoring cycle frames individually, which erases the bob and jumps.
- Leaving `batch_size` at four on per-frame runs.
- Paying for eight directions when the engine mirrors three of them.

© layerai · MIT · layerai/skills

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set33

The whole set →
layer-video-continuity The layer-video-continuity skill for Claude Code maintains visual continuity across multi-shot Layer video generations. It carries characters, lighting, and action across cutscenes or trailers. CX Codex +1 1,100installs layer-talking-characters layer-talking-characters — a Claude Code skill for generating character speech and matching lip movements to audio. It handles presenter clips, UGC-style ads, cutscene dialogue, and new lines synced to existing footage. CX Codex +1 1,100installs layer-video-direction layer-video-direction — a skill for Claude Code directs camera motion, lenses, framing, and pacing for single video shots on Layer. Runs when choreographing shot generation or resolving camera drift. CX Codex +1 1,100installs layer-environments The layer-environments Claude Code skill creates game backgrounds, parallax layers, 360° panoramas, and worlds with Layer. It runs for environment art, looping or aligning layers, and exports to Godot or Unity. CX Codex +1 1,100installs layer-vfx layer-vfx — a skill for Claude Code designs game visual effects and compiles them into sprite sheets. Generates isolated spell bursts, explosions, or loops and unpacks video clips into engine-ready flipbooks. CX Codex +1 1,100installs layer-tilesets The layer-tilesets Claude Code skill builds game tiles on a shared grid. It activates for isometric, hex, and top-down tilesets, including buildings shown from several sides. CX Codex +1 1,100installs layer-game-ui layer-game-ui — a skill for Claude Code and Codex that structures game UI generation via Layer. Generates 9-slice buttons, aligns icon sets, and exports kits directly to Unity or Godot. CX Codex +1 1,100installs layer-typography The layer-typography skill for Claude Code renders exact text and brand fonts onto visual assets. Runs when adding titles, logos, and captions to generated graphics. CX Codex +1 1,100installs

Project sponsors

Companies that keep this analytics open