Game UI Sprite Sheet Splitter
Splits a generated game UI sprite sheet or component board into individual transparent PNG elements, writes crop metadata, validates dimensions and alpha channels, and packages all PNG files into a ZIP archive. Use after component breakdown when users ask to cut a combined sprite sheet, isolate every button/icon/card/effect, export single elements, remove a solid background, or deliver a downloadable PNG asset pack.
Install
npx skills add guiguiyan930-source/game-ui-design-workflow --skill game-ui-sprite-sheet-splittergit clone --depth 1 https://github.com/guiguiyan930-source/game-ui-design-workflow.git /tmp/game-ui-design-workflow
mkdir -p ~/.claude/skills
cp -r /tmp/game-ui-design-workflow/skills/game-ui-sprite-sheet-splitter ~/.claude/skills/game-ui-sprite-sheet-splitterPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# 游戏 UI 雪碧图拆分与 PNG 打包
把组件拆解阶段生成的整张雪碧图进一步切成独立透明 PNG,并打包成可下载 ZIP。不要把“生成组件清单”误当成“已经完成像素级切图”。
## 前置条件
读取:
- 已批准的组件拆解结果
- `contracts/style-contract.yaml`
- `contracts/component-contract.yaml`
- `contracts/asset-manifest.yaml`
- `contracts/sprite-contract.yaml`(存在时)
输入雪碧图必须是实际存在的图片文件。若只有提示词或组件列表,先完成组件图生成。
最终单元素 PNG 必须去掉全部文字,包括标题、按钮文案、数字标签、占位文字、水印和说明编号。文字不是组件图形的一部分。
## 适用输入
- 透明背景雪碧图:优先按 Alpha 通道识别。
- 纯色或近似纯色背景:采样四周背景色并移除。
- 同一张图上的按钮、图标、卡片、装饰、特效和角色。
不适合:
- 元素互相遮挡或粘连严重的完整 UI 页面。
- 带复杂场景背景且元素没有间隔的合成图。
- 需要恢复被遮挡像素的素材。
遇到这些情况,应重新生成留有间距的组件雪碧图,而不是强行切割。
## 输入雪碧图规范
组件生图时优先要求:
- 所有元素完整、互不接触、四周留白。
- 统一纯色背景或透明背景。
- 不要文字、编号、水印和说明线。
- 阴影不要跨越到相邻组件。
- 相似状态按固定顺序排列,但不绘制网格线。
- 不要把一个组件拆散成多个远离的碎片。
## 自动拆分
执行:
```bash
python3 scripts/split_sprite_sheet.py <source.png> \
--output-dir <project>/assets/sprites/<pack-id>/items \
--zip <project>/packages/<pack-id>-png.zip \
--mode auto \
--prefix <pack-id>
```
默认行为:
1. 输入有透明通道时按 Alpha 检测。
2. 输入不透明时采样边缘背景色。
3. 合并距离较近的像素区域。
4. 过滤过小噪点。
5. 每个元素增加安全边距。
6. 导出独立透明 PNG。
7. 生成 `sprite-manifest.yaml`。
8. 生成包含 manifest 和全部 PNG 的 ZIP。
## 语义 mapping
自动序号不能作为最终资产名。准备按检测顺序排列的 YAML:
```yaml
items:
- semantic_name: shop-buy-button-normal
component_id: shop-buy-button
category: button
state: normal
slice: {type: 9-slice, margins: [36, 36, 28, 28]}
```
执行时增加:
```bash
--mapping mappings/shop-components.yaml
```Details
- Skill name
game-ui-sprite-sheet-splitter- Repository
- guiguiyan930-source/game-ui-design-workflow
- Path
skills/game-ui-sprite-sheet-splitter/SKILL.md- License
- MIT
- Repo updated
- 5 August 2026
FAQ
What does the Game UI Sprite Sheet Splitter skill do?
Splits a generated game UI sprite sheet or component board into individual transparent PNG elements, writes crop metadata, validates dimensions and alpha channels, and packages all PNG files into a ZIP archive. Use after component breakdown when users ask to cut a combined sprite sheet, isolate every button/icon/card/effect, export single elements, remove a solid background, or deliver a downloadable PNG asset pack.
How do I install the Game UI Sprite Sheet Splitter skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add guiguiyan930-source/game-ui-design-workflow --skill game-ui-sprite-sheet-splitter. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Game UI Sprite Sheet Splitter popular?
It lives in guiguiyan930-source/game-ui-design-workflow, which has 455 GitHub stars and 66 forks.
Related skills
Game UI Asset Pipeline
455guiguiyan930-source/game-ui-design-workflow
Packs semantically named transparent game UI PNG files into an atlas, preserves component states and reviewed 9-slice metadata, and exports deterministic JSON handoff manifests for Godot, Unity, Cocos, or generic consumers. Use after sprite-sheet splitting when users ask for atlas packing, nine-patch metadata, engine delivery, Unity sprites, Godot regions, Cocos frames, or a Game UI Factory production handoff.
Game UI Component Breakdown
455guiguiyan930-source/game-ui-design-workflow
Breaks an approved game UI page or visual style into reusable, individually generated component assets with clean edges, transparent backgrounds where appropriate, stable naming, states, dimensions, prompts, and traceable manifest records. Use for UI slicing, transparent buttons, icons, cards, modals, navigation, characters, props, frames, labels, effects, or development handoff.
Game UI Extension
455guiguiyan930-source/game-ui-design-workflow
Extends a game concept or partial interface into a coherent screen system, player journey, feature flow, prioritized screen inventory, states, edge cases, and implementation-ready screen contracts. Use when users ask to expand an existing game UI, add related pages, audit missing screens, or plan a complete UI ecosystem.
Game UI Workflow
455guiguiyan930-source/game-ui-design-workflow
Orchestrates an end-to-end game UI workflow from game design (GDD), PRD, and UI interaction logic through design specification, screen-system extension, page image generation, component breakdown, sprite-sheet splitting, PNG ZIP packaging, atlas packing, engine JSON handoff, asset registration, and validation. Use when users ask to build, extend, visualize, split, or deliver a coherent multi-screen game UI project rather than one isolated artifact.
Game UI Specification
455guiguiyan930-source/game-ui-design-workflow
Creates and maintains production-oriented game UI specifications and shared visual contracts covering color, typography, layout, geometry, components, interaction states, adaptation, and image-generation constraints. Use when users ask for a game UI design system, visual rules, standardization, or consistent downstream page and asset generation.
Taste
508tryproduck/produck-skills
Use when improving the visual taste, positioning, polish, trust, and conversion clarity of a website or product UI. Runs a category-first visual audit, applies a decisive design pass, and verifies the result with screenshots rather than subjective vibes.
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.