К основному содержанию
скилл CX Codex

layer-sprite-animation — скилл для Claude Code: анимация спрайтов

Скилл layer-sprite-animation для Claude Code помогает собрать спрайты персонажа и циклы анимации для 2D-игры. Он подключается к задачам с idle, walk, attack и другими действиями, а также с видами в четырёх или восьми направлениях.

MIT 1 100 установок ★ 10 обновлён 2026-09-30

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add layerai/skills --skill layer-sprite-animation -a claude-code
Открыть на GitHub

Что делает layer-sprite-animation

Скилл описывает процесс создания набора спрайтов из одного утверждённого дизайна: сначала генерируются ракурсы, затем для каждого создаётся видеоклип, из которого извлекаются кадры. Для сборки и нарезки листа используются pack_sprite_sheet и split_sprite_sheet.

Для направлений применяются модели Layer с поддержкой camera_transform, а для циклов — модели с loop и fixed_duration. Кадры из одного клипа сохраняют общую позицию; если подгонять или обрезать их по отдельности, движение может потерять наклон и вертикальный отскок. При пропаже упомянутого соседнего скилла можно запросить его установку или продолжить работу по схемам инструментов.

Какие задачи решает

  • собрать спрайты персонажа в нескольких направлениях из одного дизайна
  • создать циклы ходьбы, бега или ожидания из видеоклипов
  • извлечь кадры и упаковать их в sprite sheet
  • исправить расхождение внешности и положения персонажа между кадрами

Примеры запросов агенту

  • Сделай цикл ходьбы для этого персонажа в четырёх направлениях.
  • Подготовь спрайты для изометрической игры из утверждённого дизайна.
  • Собери sprite sheet и проверь, почему ноги скользят между кадрами.

Как установить layer-sprite-animation

1Через Skills CLI (Vercel)

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

2Вручную: положить файлы

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

Папка скилла целиком; для одного проекта — .claude/skills/layer-sprite-animation/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о layer-sprite-animation

Как установить layer-sprite-animation в Claude Code?

Выполни npx skills add layerai/skills --skill layer-sprite-animation -a claude-code. Файл скилла появится по пути ~/.claude/skills/layer-sprite-animation/SKILL.md.

Что делает layer-sprite-animation?

Помогает получить спрайты персонажа в разных ракурсах, создать циклы анимации и собрать кадры в sprite sheet.

Как скилл помогает избежать смещения персонажа между кадрами?

Он предлагает извлекать кадры из одного клипа с неподвижной камерой и собирать их без индивидуальной подгонки. Для разных ракурсов нужно использовать исходный утверждённый вид, а не предыдущий ракурс.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →
scenario-sprite-animation scenario-labs Скилл scenario-sprite-animation для Claude Code создаёт и нарезает 2D-анимации для игр: циклы ходьбы, атаки, GIF и VFX. Работает с листами спрайтов, кадрами из видео и готовыми изображениями персонажей. CX Codex +1 1 100установок godot-animation gamedev-skills Скилл godot-animation для Claude Code настраивает анимацию в Godot 4.7 через AnimationPlayer, AnimationTree и твины. Помогает при ошибках воспроизведения клипов, сбоях перехода состояний и зависании анимаций. CX Codex +1 12 900установок sprite-animation nexu-io Скилл sprite-animation генерирует автономный HTML-слайд с пиксельной анимацией, ретро-типографикой и бегущей лентой времени на чистом CSS. CX Codex +1 250установок pixelfx Patch Скилл pixelfx для Claude Code создаёт пиксельные эффекты и анимации спрайтов для игр. Запросите эффект, настройте готовый вариант или подготовьте спрайт-лист для движка. CX Codex +1 ★ 109звёзд репо scenario-chatgpt-pet-update scenario-labs Скилл scenario-chatgpt-pet-update обновляет спрайт-листы питомцев ChatGPT и Codex через Scenario: чинит анимации, меняет цвета и генерирует предпросмотр в GIF. CX Codex +1 592установок blockbench-flipbook-textures jasonjgardner Скилл blockbench-flipbook-textures создаёт анимированные flipbook-текстуры для Blockbench и Minecraft. Переводит сетки кадров в вертикальный PNG с расчётом таймингов. CX Codex +1 281установок

Из того же набора33

Весь набор →
layer-video-continuity Скилл layer-video-continuity для Claude Code помогает собирать многосерийные Layer-видео с общими персонажами, светом и декорациями. Передаёт контекст между сценами трейлеров и игровых катсцен. CX Codex +1 1 100установок layer-talking-characters Скилл layer-talking-characters для Claude Code создаёт говорящих персонажей и синхронизирует движение губ с аудио. Запускается для роликов с ведущим, реклам в стиле UGC, диалогов в трейлерах и замены реплики в готовом видео. CX Codex +1 1 100установок layer-video-direction Скилл layer-video-direction для Claude Code задаёт движение камеры, оптику, свет и тайминг при генерации отдельного шота в Layer. Запускается при постановке кадра или исправлении дрейфа камеры. CX Codex +1 1 100установок layer-environments Скилл layer-environments для Claude Code создаёт игровые фоны, параллаксные слои, панорамы 360° и игровые миры через Layer. Он подключается при создании окружения, настройке зацикливания слоёв или экспорте в Godot и Unity. CX Codex +1 1 100установок layer-vfx Скилл layer-vfx для Claude Code помогает генерировать игровые визуальные эффекты и собирать их в спрайтовые листы. Превращает статичный кадр эффекта в анимацию и нарезает покадровый флипбук для движка. CX Codex +1 1 100установок layer-tilesets Скилл layer-tilesets для Claude Code собирает игровые тайлы по общей сетке. Включается при создании изометрических, шестиугольных и top-down наборов, а также зданий с разными ракурсами. CX Codex +1 1 100установок layer-game-ui Скилл layer-game-ui для Claude Code и Codex настраивает генерацию игрового UI через Layer. Подключается при создании кнопок с 9-slice разметкой, иконок и экспорте UI-китов в движки. CX Codex +1 1 100установок layer-typography Скилл layer-typography для Claude Code рендерит точный текст и фирменные шрифты для изображений. Включается в задачу при добавлении надписей, логотипов и заголовков на графику. CX Codex +1 1 100установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой