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

spritecook-use-assets-in-godot — скилл для Claude Code: спрайты

Переносит спрайт-листы SpriteCook в Godot: собирает ресурс SpriteFrames и узел AnimatedSprite2D. Пригодится, когда анимации уже нарисованы, а в движке их ещё нет.

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

Что делает spritecook-use-assets-in-godot

Скилл описывает два пути. Первый — ручной: агент берёт PNG-спрайт-листы и метаданные, сам создаёт .tres с ресурсом SpriteFrames и добавляет узел AnimatedSprite2D в сцену. Второй — вызов export_godot_character_package через MCP-сервер SpriteCook, который возвращает готовый набор файлов и ссылок на скачивание. Автор советует начинать с ручного: он даёт больше свободы и не требует поднятого MCP-сервера.

Для каждой анимации нужны имя (idle, walk, attack), ширина и высота кадра, число кадров и fps. Кадры нарезаются через AtlasTexture с region = Rect2(i * frame_width, 0, frame_width, frame_height). Важная деталь: брать надо размер кадра из выходного спрайт-листа, а не из исходного ассета — SpriteCook добавляет поля, поэтому 512x512 на входе может дать 640x640 на выходе. Если перепутать, нарезка поедет и анимация рассыплется на полосы.

Файлы складываются в отдельную папку SpriteCook/assets/, чтобы не затирать сцены пользователя. Существующую сцену с персонажем скилл трогает только в части узла анимации, игровую логику не переписывает. После сборки есть чек-лист: пути res:// на месте, frame_count * frame_width совпадает с шириной листа, в Godot 4.x нет предупреждений о пропавших ext_resource.

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

  • собрать SpriteFrames из спрайт-листов SpriteCook
  • добавить AnimatedSprite2D в существующую сцену, не ломая логику
  • нарезать кадры по выходному размеру, а не по исходному ассету
  • получить пакет файлов через MCP-эндпоинт экспорта
  • проверить пути res:// и нарезку перед запуском проекта

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

  • Собери из спрайт-листов SpriteCook ресурс SpriteFrames и узел AnimatedSprite2D для анимаций idle, walk и attack
  • Добавь AnimatedSprite2D в мою сцену игрока, игровую логику не трогай
  • Вызови export_godot_character_package для завершённого run_id и разложи полученные файлы в проект

Как установить spritecook-use-assets-in-godot

1Через Skills CLI (Vercel)

npx skills add SpriteCook/skills --skill spritecook-use-assets-in-godot -a claude-code

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

~/.claude/skills/spritecook-use-assets-in-godot/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/spritecook-use-assets-in-godot/

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

Вопросы о spritecook-use-assets-in-godot

Как установить spritecook-use-assets-in-godot в Claude?

Выполните npx skills add SpriteCook/skills --skill spritecook-use-assets-in-godot -a claude-code. Скилл окажется в ~/.claude/skills/spritecook-use-assets-in-godot/SKILL.md.

Что делает spritecook-use-assets-in-godot?

Превращает спрайт-листы и метаданные SpriteCook в ресурс SpriteFrames и узел AnimatedSprite2D или AnimatedSprite3D в Godot. Работает и вручную, и через MCP-эндпоинт экспорта.

Что нужно подготовить перед запуском скилла?

Для ручного пути — PNG-спрайт-листы, имя анимации, размеры кадра, число кадров, fps и поведение цикла. Для MCP-пути нужен завершённый run_id либо явные animation_asset_ids.

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

SKILL.md · MIT
---
name: spritecook-use-assets-in-godot
description: "Godot workflow for SpriteCook assets. Use when the user wants to turn SpriteCook spritesheet PNGs, animation assets, or character animation runs into Godot SpriteFrames resources and AnimatedSprite2D/AnimatedSprite3D animation nodes. Covers both manual spritesheet-to-Godot setup and the optional SpriteCook MCP Godot export endpoint."
---

# SpriteCook Use Assets In Godot

Use this skill when moving existing SpriteCook assets into Godot. Pair it with `spritecook-workflow-essentials` for safe downloads and asset manifests. Pair it with `spritecook-animate-assets` only when animations still need to be generated first.

Prefer the manual path first: most agents can create the Godot animation resource directly from SpriteCook spritesheets, which gives more freedom and avoids extra MCP server work. Use the MCP export endpoint second when the user wants SpriteCook to return a packaged set of files.

## Choose A Path

1. **Manual Godot setup, preferred:** Use SpriteCook animation spritesheets plus metadata to create a Godot `SpriteFrames` resource and an `AnimatedSprite2D` node yourself.
2. **MCP packaged export:** Call `export_godot_character_package` to get prebuilt text files and asset downloads, then materialize the returned manifest.

## Manual AnimatedSprite2D Setup

Use this path when the agent has downloaded SpriteCook animation outputs, has explicit animation asset IDs, or can access spritesheet URLs and frame metadata. The goal is only to make the spritesheets usable as a Godot animation component, not to build gameplay, controllers, playground scenes, or complete demo levels unless the user explicitly asks for those.

Required per animation:

- PNG spritesheet URL or local file.
- Animation name such as `idle`, `walk`, `attack`, `jump`, `fall`, `hurt`, or `death`.
- Frame width, frame height, frame count, and fps.
- Loop behavior. Loop locomotion/idles; usually do not loop `attack`, `hurt`, or `death`.

Important: use the output spritesheet frame size, not the original source asset size. Detailed animations may return larger frames because SpriteCook adds margin, for example a 512x512 source can produce 640x640 frames.

### File Layout

For a new package inside an existing Godot project, use a contained folder and avoid overwriting the user's existing scenes:

```text
SpriteCook/
  assets/
    player_idle.png
    player_walk.png
    player_attack.png
    player_frames.tres
```

If the user already has a scene, add or update only the `AnimatedSprite2D` node and its `sprite_frames` reference.

### Create SpriteFrames

Create a `.tres` `SpriteFrames` resource that references each spritesheet as a `Texture2D` ext_resource and creates one `AtlasTexture` sub_resource per frame.

For each frame `i`, use:

```gdresource
region = Rect2(i * frame_width, 0, frame_width, frame_height)
```

The resource shape is:

```gdresource
[gd_resource type="SpriteFrames" load_steps=<resource_count> format=3]

[ext_resource type="Texture2D" path="res://SpriteCook/assets/player_idle.png" id="idle_sheet"]

[sub_resource type="AtlasTexture" id="AtlasTexture_idle_0"]
atlas = ExtResource("idle_sheet")
region = Rect2(0, 0, 64, 64)

[resource]
animations = [{
"frames": [{"duration": 1.0, "texture": SubResource("AtlasTexture_idle_0")}],
"loop": true,
"name": &"idle",
"speed": 8.0
}]
```

Generate all frames, not only frame 0. If there are multiple animations, append each animation object to the `animations` array. Set `speed` to the SpriteCook `animation_fps`.

### Add AnimatedSprite2D

Add an `AnimatedSprite2D` node to the target scene, or create a minimal scene containing only the animation node when no target scene exists:

```gdscene
[gd_scene load_steps=2 format=3]

[ext_resource type="SpriteFrames" path="res://SpriteCook/assets/player_frames.tres" id="frames"]

[node name="AnimatedSprite2D" type="AnimatedSprite2D"]
sprite_frames = ExtResource("frames")
animation = &"idle"
autoplay = "idle"
```

If the user's scene already has a character/player node, attach the `AnimatedSprite2D` as a child and leave gameplay logic alone.

### Manual Verification

- Confirm every spritesheet path in `.tres` exists under `res://`.
- Confirm `frame_count * frame_width == spritesheet_width` for horizontal sheets.
- Confirm the target scene contains an `AnimatedSprite2D` and references the SpriteFrames resource.
- Open the project in Godot 4.x and check for missing ext_resource warnings.
- Preview the `AnimatedSprite2D` animations in Godot and verify frame slicing/playback.

## MCP Packaged Export

Use this path when the user wants SpriteCook to return a complete package manifest, or when a completed character animation `run_id` is available and state inference from presets is useful. Even when using the endpoint, focus on the returned SpriteFrames/AnimatedSprite setup unless the user asks for demo scenes.

Call `export_godot_character_package`.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `run_id` | string | null | Completed character animation run ID. Prefer this when available because SpriteCook can infer animation states from presets |
| `animation_asset_ids` | string[] | null | Explicit animation asset IDs when no run ID is available |
| `character_name` | string | null | Optional name used in export metadata |
| `state_hints_by_asset_id` | object | null | Optional mapping from asset ID to animation state |

Valid state hints include `Idle`, `Walk`, `Run`, `Jump`, `Fall`, `IdleDown`, `IdleUp`, `IdleRight`, `WalkDown`, `WalkUp`, `WalkRight`, `RunDown`, `RunUp`, `RunRight`, `Attack`, `Hurt`, and `Death`.

The tool returns:

- `text_files`: write each `{ path, content }` exactly.
- `asset_downloads`: download each signed `url` to its `path`.
- `main_scene`: scene to open or run after Godot imports resources.
- `package_kind`: `character` for a playable setup, or `animation_preview` for a single animation.

Do not assume the MCP server wrote files locally. The agent must create the returned files in the user's Godot project.

Example arguments:

```json
{
  "animation_asset_ids": ["idle-id", "walk-id", "attack-id"],
  "character_name": "Player",
  "state_hints_by_asset_id": {
    "idle-id": "Idle",
    "walk-id": "Walk",
    "attack-id": "Attack"
  }
}
```

After materializing the package, use the same verification checklist as the manual path.

© SpriteCook · MIT · SpriteCook/skills

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

Всё по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →
godot-tweening thedivergentai Скилл с правилами программной анимации в Godot через Tween. Помогает настроить переходы интерфейса, кривые сглаживания и безопасный жизненный цикл твинов. CX Codex +1 475установок godot-3d-world-building thedivergentai Скилл для сборки 3D-уровней в Godot: GridMap с MeshLibrary, CSG-грейбокс, окклюзия и стриминг чанков. Пригодится, когда уровень растёт из прототипа в играбельную сцену. CX Codex +1 536установок godot-gdscript gamedev-skills Помогает писать типизированный код на GDScript 2.0 для Godot 4.7 и обновлять старые скрипты с версии 3.x. Пригодится при отладке логики узлов, сигналов и корутин. CX Codex +1 6 500установок godot-shaders gamedev-skills Скилл учит агента писать canvas_item и spatial шейдеры на Godot Shading Language: анимация по TIME, юниформы, чтение экрана. Пригодится, когда нужен эффект в 2D или 3D без ручного перебора вариантов. CX Codex +1 6 500установок godot-ui Zate Скилл даёт агенту знания о Control-нодах, темах и типовых экранах Godot. Пригодится, когда собираешь меню, HUD или инвентарь. CX Codex +1 2 700установок godot-asset-generator agent-skills Скилл генерирует 2D-спрайты, тайлсеты и интерфейсы через нейросети и готовит их для Godot 4.x. Пригодится при сборке графики для прототипов и спрайтовых игр. CX Codex +1 1 000установок

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

spritecook-generate-sprites Скилл для генерации статичных спрайтов и пиксель-арта через SpriteCook: подбор модели, размеров и стилевых референсов. CX Codex +1 1 200установок spritecook-workflow-essentials Описывает, как агенту вести себя с ассетами SpriteCook: проверять баланс кредитов, хранить манифест, не светить ключи. Ставится рядом с остальными скиллами SpriteCook. CX Codex +1 1 000установок spritecook-animate-assets Скилл для анимации игровых ассетов через SpriteCook MCP: превращает готовый спрайт в короткую пиксельную или детальную анимацию. CX Codex +1 1 000установок spritecook-generate-tilesets Скилл ведёт агента через генерацию тайлсетов в SpriteCook: подбор перспективы, размера тайла и режима краёв, запуск задания и проверка вариаций. CX Codex +1 575установок spritecook-upload-assets Загружает выбранную картинку в библиотеку ассетов SpriteCook через MCP-инструменты и возвращает asset_id для генерации, анимации или правки. CX Codex +1 520установок spritecook-use-presets Скилл подтягивает сохранённые пресеты SpriteCook через MCP и переносит их настройки в генерацию новых ассетов. Нужен, когда важна одинаковая стилистика в серии картинок. CX Codex +1 517установок spritecook-build-ui-kits Собирает игровой UI-кит через MCP-сервер SpriteCook: концепт, листы компонентов, извлечение и финализация. Для меню, HUD, инвентарей и диалогов. CX Codex +1 342установок

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

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