# Transparent Cutout Cleanup

> Use when removing backgrounds from generated sprites to get clean alpha edges with no halo, fringe, or leftover background pixels.

- **Type:** Skill
- **Install:** `agentstack add skill-0xheycat-isometric-game-skills-transparent-cutout-cleanup`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [0xheycat](https://agentstack.voostack.com/s/0xheycat)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [0xheycat](https://github.com/0xheycat)
- **Source:** https://github.com/0xheycat/isometric-game-skills/tree/master/skills/transparent-cutout-cleanup
- **Website:** https://0xheycat.github.io/isometric-game-skills/demo/

## Install

```sh
agentstack add skill-0xheycat-isometric-game-skills-transparent-cutout-cleanup
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [0xheycat](https://github.com/0xheycat)
- **Source:** [0xheycat/isometric-game-skills](https://github.com/0xheycat/isometric-game-skills)
- **License:** MIT
- **Homepage:** https://0xheycat.github.io/isometric-game-skills/demo/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-0xheycat-isometric-game-skills-transparent-cutout-cleanup
- Seller: https://agentstack.voostack.com/s/0xheycat
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
