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

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

Скилл pxforge-animation для Claude Code настраивает 8-направленную пиксельную анимацию в спецификациях SpriteKiln. Он рассчитывает тайминги кадров, антисипацию, циклы и игровые события.

MIT ★ 177 обновлён 2026-11-12

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

Что делает pxforge-animation

Скилл задаёт каналы движения и параметры кадров для спрайтов SpriteKiln. Анимации делятся на циклы по фазе p без зависимости от времени и дискретные действия вроде атак с миллисекундами на каждый ключ. Дополнительно размечаются игровые сокеты и события для передачи в движки Godot, Unity или MonoGame.

Проверка движений опирается на консольные команды pose, arcs и рендер черновиков, а файл qa.json отслеживает дрожание пикселей и швы зацикливания. Перед началом работы требуется запустить python -m pxforge style, иначе без выбранного стиля анимация не строится.

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

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

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

  • Собери цикл ходьбы на 8 кадров для спецификации SpriteKiln
  • Добавь атаку мечом с антисипацией и событием hit на третьем кадре
  • Проверь швы анимации и мерцание пикселей в отчёте qa.json

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

1Через Skills CLI (Vercel)

npx skills add LucasJRamos/spritekiln --skill pxforge-animation -a claude-code

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

~/.claude/skills/pxforge-animation/SKILL.md

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

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

Вопросы о pxforge-animation

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

Установка выполняется командой npx skills add LucasJRamos/spritekiln --skill pxforge-animation -a claude-code.

Что делает pxforge-animation?

Скилл настраивает фазы движения, тайминги кадров и события персонажей в файлах спецификаций SpriteKiln.

Что нужно для работы pxforge-animation?

Требуется среда Python и предварительный запуск команды python -m pxforge style для фиксации стиля анимации.

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

SKILL.md · MIT
---
name: pxforge-animation
description: Write and tune SpriteKiln animations (idle, walk, run, attack, hit, death, cast) with sound principles for small pixel art in 8 directions: per-frame timing, anticipation, smears, seamless loops, gameplay events, timing targets and sockets. Use for any animation of a SpriteKiln spec. (Folder name kept for projects that link to it; same as the spritekiln skill.)
---

# Animation

Animations only move **channels** (see [spec.md](SPEC.md), `animations`). If a degree of freedom is
missing (a cape that should sway), add a channel, use it in the bone or part expression, and animate it.

## Pick the mode
- **Cycles** (idle, walk, run, hover): `frames` + `channels` with expressions of `p` (0..2π). They loop
  seamlessly when everything is periodic in `p` (sin/cos of `p`, `2*p`...). Never use `t` in a loop.
- **Actions** (attack, hit, death, cast, dash): `keys`, one key = one frame, `ms` per key. Pose to pose.

## Frame counts and timing (reference for 64 px)
| animation | frames | ms per frame |
|---|---|---|
| idle | 4–8 | 120–180 |
| walk | 8 | 90–110 |
| run | 6–8 | 70–90 |
| light attack | 5–7 | anticipation 100–170, strike 40–60, recovery 100–130 |
| heavy attack | 7–10 | held anticipation 170–250 |
| hit | 3–4 | 60–90 |
| death | 6–10 | 90–140, last frame long (400+) |

## Principles applied to channels
- **Anticipation:** 1–2 keys moving against the strike (opposite twist, hand back, `squash` < 1, negative
  `bob`). The most extreme key is the longest.
- **Strike:** one short frame with a smear (`arc`) and stretch (`squash` > 1), `root` moving forward
  (lunge). In pixel art the impact frame beats interpolation: do not smooth the strike with tweens.
- **Follow-through:** the body overshoots (more twist), the smear fades (`smear_fade` 0.6–0.7), appendages
  (tail, cape, wings) lag in phase.
- **Overlap:** secondary parts at the same frequency with a delayed phase: `tail: "0.7*sin(p - 0.8)"`.
- **Amplitude in pixels:** with `camera.scale` s, 1 px = s units. Idle: 1–2 px (`bob` ≈ 0.05). Motions under
  0.5 px flicker; more than 3 px in an idle looks nervous.
- **Walk:** feet at `[x, lift*pos(-sin(p)), z0 + stride*cos(p)]` (the R side with the signs flipped), `bob`
  in `cos(2p)` (lowest at contacts), shoulders twisting against the hips, arms against the legs. Cycles are
  in place (the game moves the character); the planted foot slides back on screen, as expected.
- **Cheat per direction** when a pose reads badly from one side: `yaw` and `dir` work in key values, e.g.
  `rifle_pitch: "-0.08 + -0.2*pulse(yaw, 0, 70)"` raises a barrel only near `s`, where it would point at
  the camera and vanish.

## Side view (`view: side`)
- Typical clips: idle, run, jump (take-off), rise and fall (loops or single frames), land, crouch, attack,
  hurt, death; wall-slide and climb when the game has them.
- Jumps are **in place**: the game moves the character; the clip shows the body (anticipation, stretch on
  take-off, tuck at the apex, squash on landing). Use `root` only for a small offset inside the frame.
- Mark gameplay moments as events: `takeoff`, `land`, `step_l`/`step_r`, `hit`.

## Events, timing and sockets (gameplay contract)
- Mark events: `windup` on the anticipation, `hit` on the impact, `release` when a projectile or item
  leaves, `step_l`/`step_r` on contacts. They go to the JSON; the runtimes emit them (`anim_event` in
  Godot, or `px_event` in the older `PxSprite2D`; `EventFired` in Unity; `OnEvent` in MonoGame).
- **When an event fires:** at the start of its frame, i.e. the sum of the durations before it. An event on
  frame 0 fires when the clip starts.
- **Timing targets:** when the game expects a moment (`release` at 2 frames, total 7 frames at 60 fps),
  write it in `timing:`; `validate` and QA fail beyond ±1 frame.
- **Sockets:** where the game spawns something (muzzle flash, thrown item, footstep dust), declare a socket
  at the centre of that effect; the engine reads its position per frame instead of measuring sprites.

## Check
1. `pose --anim <a> --frame <i> --dirs s,e,n,se` on the key frames before rendering (`--draft` while
   blocking the poses).
2. `arcs <spec> --anim <a> --dirs s,e,n` (`--draft` while blocking): one sheet per clip with every frame as a
   ghost under the last one and the path of each hand, foot, socket and the head, one dot per frame (bigger
   where an event fires). Read the motion on it: a strike travels on an **arc**, not a straight line or a zigzag;
   the dots bunch up in the anticipation and the recovery and spread out in the strike (**spacing** is the
   timing); the path overshoots and comes back (**follow-through**); a loop closes. `--track sword_tip,hand_R`
   traces other bones, IK joints or sockets. It costs one image where a contact sheet costs frames × directions.
3. `render --anims <a>` → open `preview/contact_<a>.png` (rows = directions, columns = frames) and the GIF.
   To check timing and motion while iterating, `render --anims <a> --draft` is much faster and writes only
   `preview-draft/`; judge the final look on the full render.
4. QA: "loop seam" (last → first jumps) = a non-periodic channel; "identical frames" = a key that changes
   nothing; "clipped at the edge" = a gesture too big for the frame; a timing error = durations off target;
   "pixels boil" = shading that blinks for one frame because the body moves by fractions of a pixel (`qa.json`
   `info.boil` has the share per animation and direction): add `snap: [root, torso_rot]` (SPEC.md) or make the
   movement at least a pixel, and check the number again. "hidden in some frames" (`qa.json` `info.hidden`:
   per clip and direction, the parts that show in some frames and not at all in others) = a weapon or a hand
   passing behind the body: open those frames, and raise the hand, grow the arc or cheat with `yaw` when the
   gesture stops reading. A `review.keep` trait that vanishes in a frame is a warning.
5. Check the **diagonals and `n`**: a strike that reads in `s` can vanish behind the body in `n`; sometimes
   the smear arc must grow or the hand rise.
6. **Ground speed** (walk, run): `arcs` and QA give the speed at which the ground passes under the planted
   feet (`info.ground_speed`, px/s). Report it: the game moves the character at that speed, or the feet skate.
   When the game's speed is fixed, fit the stride or the frame times to it. `uneven` is how much that speed
   varies during the stance: about 0.8 for a sine-wave stance (`cos(p)`), which reads fine at small sizes; for a
   big sprite make the stance linear in `p` to bring it down.

## Rules for an animator (human or AI)
- Run `python -m pxforge style` first: its `animation` answer (fluid or snappy, [style.md](style.md)) sets the
  frame counts and the feel. If no style is recorded, stop and report that the user has to answer the
  style questions first.
- Touch `animations:` (and, for a new degree of freedom, `channels:` plus the expression using it). Do not
  change the model's geometry beyond what the animation needs.
- Look at the key frames and the arcs sheet before rendering; after rendering, fix QA errors (clipping, loop
  seams, identical frames, timing) and look at the frames where QA says a part is hidden.
- Report: animations created or changed, frames and ms, events, timing targets, the ground speed of walks
  and runs, QA warnings left, and the paths of the GIFs, arcs and contact sheets.

## More
Reference files in this folder: [workflow.md](workflow.md), [style.md](style.md), [SPEC.md](SPEC.md), [modeling.md](modeling.md), [splash-to-model.md](splash-to-model.md), [art-direction.md](art-direction.md), [recipe.md](recipe.md), [SPEC-animation.md](SPEC-animation.md).

© LucasJRamos · MIT · LucasJRamos/spritekiln

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

Все скиллы по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →
scenario-godot-animation scenario-labs Скилл scenario-godot-animation помогает настраивать скелетную анимацию, деревья состояний и IK в Godot 4.7, а также устранять скольжение ног и зависание блендов. CX Codex +1 458установок pixel-art-sprites omer-metin Скилл pixel-art-sprites настраивает ассистента на отрисовку спрайтов и тайлсетов. Пригодится при разработке ретро-игр с жёсткими лимитами палитры и кадров. CX Codex +1 3 300установок pixel-art omer-metin Скилл pixel-art для Claude Code и других агентов: палитры, дизеринг, субпиксельная анимация, тайлы и ограничения ретро-железа. Даёт знания для работы со спрайтами и тайлсетами. CX Codex +1 629установок godot-asset-generator agent-skills Скилл godot-asset-generator генерирует 2D-спрайты, тайлсеты и интерфейсы через нейросети и готовит их для Godot 4.x. Пригодится при сборке графики для прототипов и спрайтовых игр. CX Codex +1 1 000установок scenario-godot-2d scenario-labs Скилл scenario-godot-2d для 2D-проекта на Godot 4.7: доводит контроллер, тайлмапы, камеру и пиксель-арт до проверяемых чисел вместо «на глаз». CX Codex +1 444установок sprite-spec wrg32786 Скилл sprite-spec для Claude Code задаёт спецификацию пиксельного спрайта: палитру, пропорции и состояния анимации. Включается при проектировании персонажа или листа спрайтов. CX Codex +1 ★ 26звёзд репо

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

Весь набор →
animator Субагент animator для Claude Code создаёт и дорабатывает SpriteKiln-анимации. Инструмент автоматически применяет тайминги, учитывает антиципацию и проверяет переходы в восьми направлениях. CX Codex ★ 177звёзд репо character-modeler Субагент character-modeler для Claude Code моделирует персонажей, монстров и пропы в SpriteKiln по брифу или splash art. Сверяет силуэт в 8 направлениях. CX Codex ★ 177звёзд репо pixel-art-director Субагент pixel-art-director для Claude Code оценивает спрайты и анимации SpriteKiln перед финализацией ассета. Он проверяет силуэты, контраст и лица, выдавая список правок без изменения файлов. CX Codex ★ 177звёзд репо spritekiln-splash-to-model Скилл spritekiln-splash-to-model для Claude Code превращает изображение персонажа в спецификацию SpriteKiln. Он включается, когда нужно собрать модель, спрайт или анимацию по концепт-арту. CX Codex +1 ★ 177звёзд репо pxforge-splash-to-model Скилл pxforge-splash-to-model для Claude Code переносит концепт-арт персонажа в YAML-модель SpriteKiln. Включается, когда вы даёте арт героя и просите подготовить модель, спрайт или анимации. CX Codex +1 ★ 177звёзд репо spritekiln-animation spritekiln-animation — скилл для Claude Code, который помогает создавать и настраивать анимации по спецификации SpriteKiln. Он задаёт движение для пиксельных персонажей в восьми направлениях и размечает игровые события. CX Codex +1 ★ 177звёзд репо spritekiln Скилл spritekiln для Claude Code создаёт и редактирует персонажей, монстров и предметы в виде анимированных пиксельных спрайтов с восемью направлениями. Перед первым ассетом проекта агент уточняет художественный стиль. CX Codex +1 ★ 177звёзд репо pxforge Скилл pxforge для Claude Code генерирует и правит персонажей и пропсы в виде анимаций в восьми направлениях через SpriteKiln. CX Codex +1 ★ 177звёзд репо

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

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