Skip to content
Skills Library
Design & UX · Building & coding

gimp-sprite-sheets

/gimp-sprite-sheets

Build, diagnose and verify game sprite sheets and texture atlases from loose frames using the gimp MCP server, measuring every rectangle from pixels instead of eyeballing crops. Use when asked to pack frames into a sprite sheet, make a texture atlas, fix a bobbing or sliding animation, align or normalise sprite frames, find a sprite's true bounds or pivot, trim transparent padding, or slice an existing sheet back into frames. Also for "sprite sheet", "spritesheet", "atlas", "frame alignment", "anchor point", "pivot", or auditing a game's art folder for unpacked assets.

Licence
Apache-2.0
Last repository change
27.10.2026

Assessment and security

95/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Build, diagnose and verify game sprite sheets and texture atlases from loose frames using the gimp MCP server, measuring every rectangle from pixels instead of eyeballing crops. Use when asked to pack frames into a sprite sheet, make a texture atlas, fix a bobbing or sliding animation, align or normalise sprite frames, find a sprite's true bounds or pivot, trim transparent padding, or slice an existing sheet back into frames. Also for "sprite sheet", "spritesheet", "atlas", "frame alignment", "anchor point", "pivot", or auditing a game's art folder for unpacked assets.

Triggers from the description

sprite sheetspritesheetatlasframe alignmentanchor pointpivot
Original author description

Build, diagnose and verify game sprite sheets and texture atlases from loose frames using the gimp MCP server, measuring every rectangle from pixels instead of eyeballing crops. Use when asked to pack frames into a sprite sheet, make a texture atlas, fix a bobbing or sliding animation, align or normalise sprite frames, find a sprite's true bounds or pivot, trim transparent padding, or slice an existing sheet back into frames. Also for "sprite sheet", "spritesheet", "atlas", "frame alignment", "anchor point", "pivot", or auditing a game's art folder for unpacked assets.

How it works

  1. Preconditions
  2. 1. Measure every frame
  3. 2. Pack
  4. 3. Verify, which is the step that earns the tool
  5. The metadata trap — a second way to fail after verify passes
  6. 4. Emit the atlas
  7. Going the other way
  8. Reporting
Original SKILL.md headings · 123 lines, 1,096 words
SKILL.md preview
---
name: gimp-sprite-sheets
description: Build, diagnose and verify game sprite sheets and texture atlases from loose frames using the gimp MCP server, measuring every rectangle from pixels instead of eyeballing crops. Use when asked to pack frames into a sprite sheet, make a texture atlas, fix a bobbing or sliding animation, align or normalise sprite frames, find a sprite's true bounds or pivot, trim transparent padding, or slice an existing sheet back into frames. Also for "sprite sheet", "spritesheet", "atlas", "frame alignment", "anchor point", "pivot", or auditing a game's art folder for unpacked assets.
---

# Sprite sheets, measured not guessed

Most sprite-sheet tooling asks a human to type crop rectangles. This server can read the pixels
back, so every rectangle can be measured, and the finished sheet can be checked against the file
that was actually written.

**Never write a crop rectangle you have not measured. Never claim a sheet is correct without
re-measuring the exported file.**

## Preconditions

Call `gimp_status` first. If the `gimp_*` tools are not present at all, the MCP server failed to
start: say so rather than working around it. If the tools are present but the bridge is not
connected, `gimp_launch(mode="headless")` for batch work, or ask the user to click
**Filters > Development > Start Agent Bridge** when they already have GIMP open with work in it.

Never launch a second GIMP alongside a user's running instance without saying so.

## 1. Measure every frame

`gimp_open` each frame, then `gimp_measure(kind="bbox")` on it. Threshold 0 is exact; raise it to
around 8 when anti-aliased fringing should be ignored.

Record per frame, and report the set:

| quantity | derived from bbox | what drift in it causes |
|---|---|---|
| content bounds | `x, y, width, height` | the only honest crop rectangle |
| foot line | `y + height` | the character **bobs** as it animates |
| centre line | `x + width / 2` | the character **slides** sideways |
| canvas size | `gimp_open` result | frames cannot share a grid until they share a canvas |

Foot-line drift above 1 px in a walk or run cycle is a defect. Report it before packing. It is
invisible in a contact sheet and obvious as a column of integers.

Two limits worth stating out loud rather than quietly assuming:

- Foot and centre drift only mean something for **grounded frames of the same subject**. Asteroids,
  particles, projectiles and free-floating props legitimately drift, and calling that a defect is
  wrong.
- **Mixed canvas sizes mean this is a loose sprite collection, not an animation.** It wants an atlas
  of trimmed rectangles, not a uniform grid. Say so instead of forcing a grid onto it.

## 2. Pack

For equal-sized PNG frames, prefer `gimp_run_recipe("sprite_sheet_pack", {"input_paths": [...], "output_path": "out/sheet.png", "columns": 4, "keep_open": true})`. Input order is frame order. This recipe saves a layered XCF and full-cell atlas JSON, reopens the exported PNG, checks exact decoded RGBA pixels and bounds for each cell, and checks unused cells remain transparent. Existing outputs are refused by default. Read its returned bounds, drift and byte counts before reporting success. For mixed-size collections use `gimp_run_recipe("sprite_atlas_pack", {"input_paths": [...], "output_path": "out/atlas.png", "padding": 2, "trim": true})`: it measures alpha bounds, packs the trimmed rectangles with padding, writes the atlas JSON described in step 4 and verifies the exported pixels the same way. Pass `input_layer_ids` instead to pack layers already open in GIMP (layer names become frame keys). Read its `occupancy` and byte counts before reporting. `sprite_sheet_pack` also takes `margin` and `spacing` when an engine or the slicer expects gutters. `measuredPivot` in the JSON is diagnostic; choose a stable loader origin for the animation.

Cell size is the shared canvas size. Choose the column count so the sheet stays within 2048 px on
both axes where the frame count allows, since older mobile GPUs cap there.

```python
sheet = Gimp.Image.new(cw * cols, ch * rows, Gimp.ImageBaseType.RGB)
bg = Gimp.Layer.new(sheet, "sheet", cw * cols, ch * rows,
                    Gimp.ImageType.RGBA_IMAGE, 100.0, Gimp.LayerMode.NORMAL)
sheet.insert_layer(bg, None, 0)
bg.fill(Gimp.FillType.TRANSPARENT)
# ... insert each frame as a layer, then set_offsets(col * cw, row * ch) ...
merged = sheet.merge_visible_layers(Gimp.MergeType.CLIP_TO_IMAGE)
if not merged.has_alpha():
    merged.add_alpha()
```

**Never use `Gimp.Image.flatten()`.** It removes the alpha channel and composites onto the
background colour. The resulting sheet looks entirely correct as a thumbnail and is fully opaque.
This is the single most likely way to ship a broken sheet from this server.

## 3. Verify, which is the step that earns the tool

Re-open the **exported PNG** and measure the alpha bounds inside each cell rectangle. Compare
against the per-frame bounds from step 1.

Anything other than an exact match is a failure. Report which frames moved; do not paper over it.
Confirm the foot line is identical across every cell.

Do not skip this because the pack obviously worked. The `flatten()` bug above produces a
plausible-looking sheet and is caught **only** here: every cell measures as the full cell rectangle
instead of its real bounds.

## The metadata trap — a second way to fail after verify passes

`Gimp.file_save`'s default PNG export writes a thumbnail plus `pHYs`/`tIME`/`bKGD` metadata chunks
that the original loose files never had. Verify only checks pixels, so a sheet can pass it and still
be a worse network payload than the files it replaced: a real-world pack of 8 frames measured 94.1KB
against 88.1KB for the loose files it was meant to replace. Export through `file-png-export` directly
with `bkgd`, `phys`, `time` and `include-thumbnail` off and `compression=9` instead of the plain
`Gimp.file_save` dispatcher: same pixels, smaller file, in that case below the loose total.

**"Fewer requests" and "fewer bytes" are two different claims, and packing only guarantees the
first one.** Before calling a pack a win, diff the actual exported byte count against the sum of
what it replaces, not just the pixel count. Report both numbers to whoever asked for the pack.

## 4. Emit the atlas

Standard atlas JSON, with the trim rectangle and the pivot both measured rather than assumed:

```
frame              = { cell_x + bbox.x, cell_y + bbox.y, bbox.w, bbox.h }
spriteSourceSize   = { bbox.x, bbox.y, bbox.w, bbox.h }
sourceSize         = { cell_w, cell_h }
pivot.x            = centre_x / cell_w
pivot.y            = foot_y   / cell_h
```

A grounded character's origin belongs at its feet, not at `0.5, 0.5`. That pivot is a measured
number, which is the entire point of doing this here rather than by eye.

Finish by telling the user the exact loader call for what you produced. For a uniform grid that is a
spritesheet load with `frameWidth`/`frameHeight`; for trimmed rectangles it is an atlas load against
the JSON.

## Going the other way

`gimp_run_recipe("sprite_sheet_slice", ...)` cuts an existing sheet back into individual frames,
skipping fully transparent cells. Use it to inspect or re-normalise a sheet somebody else built,
then measure the frames and re-pack.

## Reporting

Show the measured table. State drift in pixels. State the verification verdict plainly: either every
frame is byte-identical in place, or name the frames that moved. If the source frames were
misaligned, say the sheet was built from misaligned frames rather than implying the pack fixed them.
Files in this package (2)
  • SKILL.md 7 KB
  • agents/openai.yaml 1 KB

Versions

The database has no other skills named gimp-sprite-sheets.

Database snapshot: 13.11.2026 · package version 3a7326d8a6d2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100gpt-image-sprite-sheet
    Make 2D game sprite sheets with GPT Image 2.6 on varg and turn them into game-ready files: a strict 4×4 sheet spec (16 frames, equal cells, fixed scale and ground line; credited to @SSSS_CRYPTOMAN, translated from Japanese), then scripts/slice.sh cuts the sheet into frames, keys…
  • 100sprite-frames
    Make or redo a game character's sprite frames and effect sheets with an AI image tool (Codex or ChatGPT draws, Claude directs) - the design talk from reference pictures, a frame plan, a paste-ready prompts file, drawing rounds, then checking, fitting and approving every frame…
  • 100layer-pixel-art
    Use when making pixel art with Layer: sprites, retro game characters, pixel icons, pixel tiles, or a sprite sheet and walk cycle. Also when generated pixel art comes back blurry, anti-aliased, or at the wrong grid size, and when packing separate frames into a sheet or cutting an…
  • 100scenario-sprite-animation
    Use when animating 2D game art with Scenario: walk, idle or attack cycles in 4 or 8 directions, isometric sprite sheets, animated GIFs, frame-by-frame pixel art animation, VFX loops such as fire or smoke, looping a sprite seamlessly, animating an existing character image, a full…
  • 90image-sprite-sheet
    Use when the task is to generate, slice, and validate sprite sheets with consistent cell geometry.
  • 86sprite-sheet-slicing
    Use when splitting a sprite sheet into individual assets.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.