Image Sprite Sheet Split
Splits uniform sprite sheet grids into individual frame PNGs using FFmpeg crop. Use when the user wants to split sprite sheets, extract animation frames, divide grid images into cells, cut 4x4 or NxM sheets, slice tilesets, or prepare frames for background removal.
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Image Sprite Sheet Split when an AI agent needs a reusable SKILL.md workflow for this job: Splits uniform sprite sheet grids into individual frame PNGs using FFmpeg crop. Use when the user wants to split sprite sheets, extract animation frames, divide grid images into cells, cut 4x4 or NxM sheets, slice tilesets, or prepare frames for background removal.
When not to use it
Skip Image Sprite Sheet Split when the task is outside the writing category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/image-sprite-sheet-split # Save SKILL.md to ~/.claude/skills/image-sprite-sheet-split/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/image-sprite-sheet-split/SKILL.md. For a shared project, commit the folder at .claude/skills/image-sprite-sheet-split/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Image Sprite Sheet Split skill for this task: Use Image Sprite Sheet Split when this documented workflow matches the task. Confirm any required inputs or files before making changes.
What supports this recommendation?
70/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 77/100
- Practical detail
- 68/100
- Source evidence
- 61/100
- Source signals
- 72/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiinferred
The skill text mentions Gemini or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# Image Sprite Sheet Split
Split **uniform grid sprite sheets** into individual **PNG frames** via FFmpeg crop. Preserves per-cell dimensions and alpha. Does **not** remove backgrounds — run [image-remove-background](../image-remove-background/SKILL.md) on frames afterward if needed.
## Rules
When this skill applies, read and follow [skill-dependency-manager](../skill-dependency-manager.md) — run scripts as documented, install missing tools into `.dependency/`.
- Run `split_frames.py` through the **`python` manifest entry** (`.dependency/python/`). Never use host `python`, `py`, or `python3`. - Do not hand-write FFmpeg crop commands — use the bundled script. - **Single file only.** Pass one sprite sheet with `--image`; directories are not supported. - **Grid size required.** Supply `--grid COLSxROWS` before running (e.g. `4x4`, `6x3`). - `populated: false` is not a reason to skip. Install first, set `populated: true`, retry the same command. - **Never overwrite sources.** Output goes into `<image-dir>/image-sprite-sheet-split/<sheet-stem>/` by default (or under `-o`). - **Never copy or move input images.** Pass the user's actual file path.
## Setup (first run)
1. Ensure `python` and `ffmpeg` are populated in `.dependency/manifest.json` (see skill-dependency-manager).
2. FFmpeg must include `ffprobe` beside `ffmpeg` in the same `bin/` folder.
## Quick Start
**Default: `<image-dir>/image-sprite-sheet-split/<sheet-stem>/`** beside the input sheet:
```bash # 4×4 sheet → image/effects/image-sprite-sheet-split/fire_sheet/fire_sheet_001.png … fire_sheet_016.png .dependency/python/python .ai/image-sprite-sheet-split/split_frames.py --image image/effects/fire_sheet.png --grid 4x4 ```
Custom output root:
```bash .dependency/python/python .ai/image-sprite-sheet-split/split_frames.py --image image/effects/fire_sheet.png --grid 4x4 -o image/effects/frames/ # → image/effects/frames/fire_sheet/fire_sheet_001.png … ```
## Defaults
| Option | Default | Notes | |--------|---------|-------| | `--image` | **Required** | Single sprite sheet image file | | `--grid` | **Required** | **COLSxROWS** (columns first), e.g. `4x4`, `6x3` | | Output | `image-sprite-sheet-split/<stem>/` | Use `-o` / `--output` for a custom root directory |
Frames are exported **row-major** (left→right, top→bottom): `_001`, `_002`, …
Supported inputs: `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`, `.bmp`, `.tif`, `.tiff`, `.avif`, `.ico`.
## When to use
| Good fit | Poor fit | |----------|----------| | Uniform N×M grid (4×4, 3×6, 8×1) | Irregular / free-form layouts | | Gemini or Aseprite-style sheets | Packed texture atlases with variable frame sizes | | Sheets without gutters or border padding | Sheets with grid lines, gutters, or outer padding | | Preparing frames for per-frame background removal | Auto-detecting grid size (must be supplied) |
**rembg on whole sheets removes animation content** — split frames first, then remove backgrounds per frame if needed.
## Agent Workflow
1. **Confirm grid size** — ask or infer from context (`4x4`, `3x6`, etc.). 2. **Trial first** — split one sheet, inspect `image-sprite-sheet-split/<stem>/001.png` and the last frame. 3. **Check warnings** — if image size is not evenly divisible, verify cell crops still look correct. 4. **More sheets** — run once per file with the same grid settings. 5. **Revert** — delete the output folder; sources are never modified.
## Examples
4×4 explosion sheet (2048×2048 → 16 × 512×512):
```bash .dependency/python/python .ai/image-sprite-sheet-split/split_frames.py --image sheet.png --grid 4x4 ```
6×3 sheet:
```bash .dependency/python/python .ai/image-sprite-sheet-split/split_frames.py --image sheet.png --grid 6x3 ```
## Agent Notes
1. Use the bundled script, not hand-written FFmpeg crop commands. 2. Missing Python/FFmpeg → populate `.dependency/` per skill-dependency-manager, retry same command. 3. **Do not copy, move, or replace the source with frame outputs** — tell the user where the output folder is. 4. Need **transparent frames** → split first, then [image-remove-background](../image-remove-background/SKILL.md) on each frame.
## Troubleshooting
| Issue | Fix | |-------|-----| | `FFmpeg not found` | Populate `ffmpeg` in `.dependency/manifest.json` | | Directory passed to `--image` | Run once per sheet; this skill accepts image files only | | Output already exists | Delete the existing frame folder or choose a different `-o` path | | Wrong frame count | Verify `--grid` matches the sheet layout | | Misaligned crops | Sheet may have gutters/padding — this skill expects a clean uniform grid | | Unused pixels warning | Image size is not evenly divisible by the grid; inspect output frames | | Need transparent frames | Split first, then [image-remove-background](../image-remove-background/SKILL.md) on frames |
## CLI
Copy-paste commands: [cli/image-sprite-sheet-split.md](../../../cli/image-sprite-sheet-split.md)
## Related
- Transparent cutouts per frame: [image-remove-background](../image-remove-background/SKILL.md) - Trim frame borders: [image-trim](../image-trim/SKILL.md)
Intended uses
- Use Image Sprite Sheet Split when this documented workflow matches the task.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.