transparent-cutout-cleanup — скилл для Claude Code: что делает
Удаляет фоновые ореолы и кайму со спрайтов нейросетей, подготавливая чистую альфу для атласов.
npx skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanup -a claude-codeЧто делает transparent-cutout-cleanup
Сгенерированные нейросетями игровые спрайты часто приходят с цветным фоном. Простое вырезание по цвету оставляет рваные края или светлый ореол, который сразу бросается в глаза на тёмных тайлах. Скилл задаёт строгий регламент очистки альфа-канала с контролем полупрозрачных пикселей.
Процесс опирается на нейросетевые модели сегментации вроде InSPyReNet или rembg вместо жёсткого цветового ключа. Инструкция требует устранять дефекты цвета на границе, при необходимости сжимать маску на один пиксел и экспортировать итоговый PNG со straight alpha.
Без проверки под 400% зумом на светлом и тёмном фоне спрайт считается бракованным. Жёсткий цветовой ключ использовать запрещено, потому что он съедает сглаживание.
Какие задачи решает
- Убрать паразитный белый или серый ореол по краям спрайта
- Очистить полупрозрачные пиксели от фонового оттенка
- Сгладить рваные контуры после вырезания фона
- Подготовить пачку ассетов в PNG со straight alpha для упаковщика атласов
Примеры запросов агенту
- Проверь вырезанные спрайты из папки assets на наличие каймы и ореолов
- Очисти альфа-канал у сгенерированного тайла и проверь контур на тёмном фоне
- Удали остатки фонового цвета на полупрозрачных пикселях персонажа
Как установить transparent-cutout-cleanup
1Через Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanup -a claude-code2Вручную: положить файлы
~/.claude/skills/transparent-cutout-cleanup/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/transparent-cutout-cleanup/
1Через Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanup -a codex2Вручную: положить файлы
.agents/skills/transparent-cutout-cleanup/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanup -a cursor2Вручную: положить файлы
.cursor/skills/transparent-cutout-cleanup/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install 0xheycat/isometric-game-skills transparent-cutout-cleanup2Вручную: положить файлы
.github/skills/transparent-cutout-cleanup/SKILL.md1Через Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanup -a gemini-cli2Командой платформы
gemini skills install https://github.com/0xheycat/isometric-game-skills --path skills/transparent-cutout-cleanupВручную: положить файлы
.devin/skills/transparent-cutout-cleanup/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanup -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о transparent-cutout-cleanup
Как установить transparent-cutout-cleanup в Claude Code?
Выполните в терминале команду npx skills add 0xheycat/isometric-game-skills --skill transparent-cutout-cleanup -a claude-code.
Что делает этот скилл?
Он задаёт пошаговый процесс качественной обрезки фона спрайтов: подбор моделей сегментации, удаление каймы, эрозию маски на 1px и экспорт со straight alpha.
Почему нельзя использовать обычный цветовой ключ?
Обычный колор-кей уничтожает сглаживание краёв и делает границы пикселизованными, поэтому правила скилла требуют модели вроде InSPyReNet или rembg.
Исходный текст
SKILL.md · MIT
--- name: transparent-cutout-cleanup description: Use when removing backgrounds from generated sprites to get clean alpha edges with no halo, fringe, or leftover background pixels. license: MIT --- # Transparent Cutout Cleanup ## Overview AI-generated sprites come on a background. Naive removal leaves a colored halo or jagged edge that screams amateur when tiles are placed together. This skill produces clean, premultiplied-safe alpha cutouts. ## When to Use - Any generated sprite needs a transparent background. - Placed sprites show a white/gray halo or fringe. - Edges look jagged or have leftover background color. ## Process 1. Generate on a PLAIN flat background (easier to key out than a busy one). 2. Use a background-removal model (e.g. InSPyReNet / rembg) rather than a hard color key. 3. Inspect edges at 400% zoom for halo or fringe pixels. 4. Defringe / decontaminate edge color so no background tint remains. 5. Erode the alpha by 1px if a faint halo persists. 6. Save as PNG with straight alpha; verify on both light and dark backgrounds. 7. Batch the cleaned sprites for the atlas packer. Pair this with the ComfyUI rembg node in `seamless-isometric-terrain/scripts`. ## Rationalizations (Stop Lying to Yourself) | Excuse | Reality | |---|---| | "A white halo is barely visible" | On a dark tile it is glaring. Defringe every sprite. | | "Hard color-key is faster" | It eats anti-aliased edges and looks jagged. Use a proper matting model. | ## Red Flags - STOP if you catch yourself: - Visible halo/fringe when placed on a contrasting background. - Jagged, aliased cutout edges. - Background color contaminating semi-transparent pixels. ## Verification You are NOT done until every box is checked: - [ ] Edges are clean at 400% zoom on light AND dark backgrounds. - [ ] No background-color contamination on semi-transparent pixels. - [ ] All sprites exported as straight-alpha PNG.
© 0xheycat · MIT · 0xheycat/isometric-game-skills