Agent skill

Image Remove White Background

by godot-fun in godot-fun/gai

Removes solid-color backgrounds (white, green 00FF00, magenta FF00FF) from a single AI-generated image using color key and border flood fill — not AI matting.

MITAuto-check passedGame Development

Install Image Remove White Background

skills CLI
$ npx skills add godot-fun/gai --skill image-remove-white-background -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install godot-fun/gai image-remove-white-background --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/godot-fun/gai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/image-remove-white-background .claude/skills/image-remove-white-background && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
image-remove-white-background
GitHub stars
182
Token cost
~2k tokens
SKILL.md length
688 words
Files
1
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Removes solid-color backgrounds (white, green 00FF00, magenta FF00FF) from a single AI-generated image using color key and border flood fill — not AI matting.

  • Works in 6 steps: Pick skill — flat solid background →… → Paths — Pass whatever path the user… → One file per run — process one image,… → …
  • Rembg over-removes foreground
  • SKILL.md covers Rules, Setup (first run), Quick Start and Presets, plus 6 more sections
  • Calls python and git

What it does

Image Remove White Background is an agent skill from godot-fun/gai. Removes solid-color backgrounds (white, green 00FF00, magenta FF00FF) from a single AI-generated image using color key and border flood fill — not AI matting. Use when rembg over-removes foreground, for flat white/green/magenta backgrounds, color key cutout, white-background cutout, green screen, or chroma key before Godot sprite import.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering Game development. It works with Godot and Python. The repository describes itself as: A lightweight AI agent and skill workflow framework built with Godot. The licence is MIT.

When your agent uses it

  • Rembg over-removes foreground
  • For flat white/green/magenta backgrounds
  • Color key cutout
  • White-background cutout

Example prompts

  • “Use the image-remove-white-background skill to remove solid-color backgrounds (white, green 00FF00, magenta FF00FF) from a single AI-generated image…”
  • “/image-remove-white-background”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Pick skill — flat solid background → this skill; complex/photo backgrounds → image-remove-background.
  2. Paths — Pass whatever path the user gives or the chat path directly with --image. Output lands in image-remove-white-background/` next to…
  3. One file per run — process one image, verify the result, then repeat for additional files if needed.
  4. Preset — white for existing white-bg AI art; tell user to switch AI prompts to --preset green or --preset magenta going forward.
  5. Tolerance — if halos remain, increase --tolerance by 5–10; if subject edges eat away, decrease it.
  6. Revert — delete output file or git restore; sources are never modified.

What it can do on your machine

Read from SKILL.md and the folder at commit aa1ac71. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Image Remove White Background loads about 2k tokens when it runs. Until then it costs about 93 tokens; SKILL.md has 688 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from godot-fun/gai at commit aa1ac71, republished under its MIT licence (© godot-fun). 688 words, ~2,020 tokens.

Download SKILL.mdSave it as .claude/skills/image-remove-white-background/SKILL.md (or your agent's skills folder).
name
image-remove-white-background
description
Removes solid-color backgrounds (white, green #00FF00, magenta #FF00FF) from a single AI-generated image using color key and border flood fill — not AI matting. Use when rembg over-removes foreground, for flat white/green/magenta backgrounds, color key cutout, white-background cutout, green screen, or chroma key before Godot sprite import.

Image Remove White / Chroma Background

Remove flat solid-color backgrounds with color key + flood fill. Output is RGBA PNG with transparency — ready for Godot sprites and UI.

Unlike image-remove-background (rembg AI matting), this skill only removes pixels that match the key color. It does not guess what is "subject" vs "background", so white clothing, props, and effects are preserved unless they touch the outer background through matching pixels.

Single file only. Pass one image with --image; directories are not supported.

Rules

When this skill applies, read and follow skill-dependency-manager — run scripts as documented, install missing tools into .dependency/.

  • Run remove_white_bg.py through the image-remove-white-background manifest entry (.dependency/image-remove-white-background/.venv/). Never use host python, py, python3, or any interpreter outside .dependency/.
  • Do not hand-write FFmpeg colorkey / ImageMagick commands — use the bundled script.
  • Single file only. Pass one image with --image; directories are not supported.
  • populated: false for image-remove-white-background is not a reason to skip. Install first, set populated: true, retry the same command.
  • Pass the input path as-is (chat attachment path, Downloads/foo.png, project folder, etc.). Output goes to <image-dir>/image-remove-white-background/ by default — no path rewriting; never overwrite sources.

Setup (first run)

From project root:

bash
.dependency/python/python -m venv .dependency/image-remove-white-background/.venv
.dependency/image-remove-white-background/.venv/Scripts/python.exe -m pip install Pillow

Register in .dependency/manifest.json:

json
"image-remove-white-background": {
  "populated": true,
  "bin": ".dependency/image-remove-white-background/.venv/Scripts/python.exe"
}

Use bin/python on Unix.

Quick Start

Both --image is required. Default output: <image-dir>/image-remove-white-background/<image-name>.png

bash
# White AI background (default preset)
.dependency/image-remove-white-background/.venv/Scripts/python.exe .ai/image-remove-white-background/remove_white_bg.py --image image/sprites/hero.png

# Green screen (#00FF00) — recommended for future AI generation
.dependency/image-remove-white-background/.venv/Scripts/python.exe .ai/image-remove-white-background/remove_white_bg.py --image image/sprites/hero.png --preset green

# Magenta screen (#FF00FF)
.dependency/image-remove-white-background/.venv/Scripts/python.exe .ai/image-remove-white-background/remove_white_bg.py --image image/sprites/hero.png --preset magenta

Custom output path:

bash
.dependency/image-remove-white-background/.venv/Scripts/python.exe .ai/image-remove-white-background/remove_white_bg.py --image image/sprites/hero.png -o image/sprites_cutout/

Presets

PresetKey colorDefault toleranceBest for
white (default)#FFFFFF25AI images with pure/near-white backgrounds
green#00FF0040Green-screen AI prompts (recommended)
magenta#FF00FF40Magenta-screen AI prompts

Custom key color:

bash
.dependency/image-remove-white-background/.venv/Scripts/python.exe .ai/image-remove-white-background/remove_white_bg.py --image image/foo.png --color F0F0F0 --tolerance 20

Modes

ModeBehavior
global (default)Removes all pixels matching the key color. Best when the subject has no same-color interior details to preserve.
bothUnion of border and center — removes background connected to edges or to the center.
borderFlood fill from image edges only — keeps isolated white areas not reachable from edges or center (e.g. white shirt interior).
centerFlood fill from the image center outward — removes key-color regions reachable from the middle.
bash
# Center-out flood (interior white holes)
.dependency/image-remove-white-background/.venv/Scripts/python.exe .ai/image-remove-white-background/remove_white_bg.py --image image/foo.png --mode center

# Edge + center without removing every white pixel
.dependency/image-remove-white-background/.venv/Scripts/python.exe .ai/image-remove-white-background/remove_white_bg.py --image image/foo.png --mode both

Defaults

OptionDefaultNotes
--imageRequiredSingle supported image file
Output<image-dir>/image-remove-white-background/<name>.pngUse -o / --output for custom file or directory
--presetwhitegreen / magenta for chroma-screen AI art
--modeglobalUse border or both when same-color interior details must be preserved
--tolerancepreset-specificRaise if background remnants remain; lower if foreground edges erode
--feather2Gaussian soft edge on alpha; 0 for hard edges
--cropoffTrim transparent borders after keying

Supported inputs: .png, .jpg, .jpeg, .webp, .bmp, .gif, .tif, .tiff, .avif, .ico.

Show full SKILL.md (291 more words)Show less

Agent Workflow

  1. Pick skill — flat solid background → this skill; complex/photo backgrounds → image-remove-background.
  2. Paths — Pass whatever path the user gives or the chat <image_files> path directly with --image. Output lands in image-remove-white-background/ next to that input.
  3. One file per run — process one image, verify the result, then repeat for additional files if needed.
  4. Preset — white for existing white-bg AI art; tell user to switch AI prompts to --preset green or --preset magenta going forward.
  5. Tolerance — if halos remain, increase --tolerance by 5–10; if subject edges eat away, decrease it.
  6. Revert — delete output file or git restore; sources are never modified.

Troubleshooting

IssueFix
image-remove-white-background missingFollow Setup; update manifest
Missing --imageBoth --image and a file path are required
Directory passed to --imageRun once per file; this skill accepts image files only
Output already existsDelete the existing output or choose a different -o path
Background remnants (gray fringe)Increase --tolerance; try --feather 3
Subject edges erodedDecrease --tolerance; ensure --mode border
White clothing removedSwitch to --mode border or --mode both; avoid global for characters with white details
Green spill on subject edgesLower --tolerance; increase --feather slightly
Interior holes stay opaqueTry --mode center if the hole matches the key color at the image center; try --mode both for edge + center; otherwise --mode global only if safe, or fix in an editor
Center mode does nothingCenter pixel is not key color (subject sits in the middle) — use border, both, or split sprite sheets per frame
Wrong colors in JPEGPrefer PNG from AI export; raise tolerance slightly for compression artifacts
Wrong interpreterMust use .dependency/image-remove-white-background/.venv/Scripts/python.exe

CLI

Copy-paste commands: cli/image-remove-white-background.md

© godot-fun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/image-remove-white-background of godot-fun/gai.

Open the folder on GitHubat commit aa1ac71

Compare with similar skills

Image Remove White Background next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Image Remove White Background compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Image Remove White Background this skillgodot-fun/gai182—~2kAutomated safety check: PassMIT
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
Godot E2ERandallLiuXin/GodotMaker5501 repos~3.9kAutomated safety check: PassCustom licence
GdtoolkitRandallLiuXin/GodotMaker5501 repos~2.2kAutomated safety check: PassCustom licence
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
Godot UI Integrationzimo-xiao-zheng/godot-ui-integration277—~1.5kAutomated safety check: PassMIT

Similar skills

  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Godot E2E

    RandallLiuXin/GodotMaker

    Write and run E2E (end-to-end) game tests using the godot-e2e framework.

    550 GitHub starsUsed in 1 repo~3.9k tokens
    Testing & QAAuto-check passed
  • Gdtoolkit

    RandallLiuXin/GodotMaker

    Lint and format GDScript files using gdtoolkit (gdlint + gdformat).

    550 GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • Godot UI Integration

    zimo-xiao-zheng/godot-ui-integration

    Build or revise Godot UI from an approved design, separated art, or a visual reference when scene structure, gameplay binding, and runtime visual verification all matter.

    277 GitHub stars~1.5k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot Wechat Minigame Adapter

    godothub/godot-minigame

    Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout.

    187 GitHub stars~1.5k tokensUpdated 23 days ago
    Game DevelopmentAuto-check passed

More from godot-fun/gai

All 36 skills in this repo
  • AI Text To Speech

    godot-fun/gai

    Zero-shot text-to-speech with voice cloning via IndexTTS2 (index-tts).

    182 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Audio Denoise

    godot-fun/gai

    Reduces background noise in a single audio file using FFmpeg afftdn.

    182 GitHub stars~465 tokensUpdated today
    Auto-check passed
  • Audio Fade

    godot-fun/gai

    Applies fade-in and fade-out at the start and end of a single audio file using FFmpeg.

    182 GitHub stars~652 tokensUpdated today
    Auto-check passed
  • Normalizes a single audio file to consistent LUFS loudness with true-peak limiting using FFmpeg.

    182 GitHub stars~684 tokensUpdated today
    Auto-check passed
  • Standardizes a single audio file to 44100 or 48000 Hz and exports 16-bit PCM WAV using FFmpeg.

    182 GitHub stars~638 tokensUpdated today
    Auto-check passed
  • Audio Split

    godot-fun/gai

    Splits a single audio file into two segments (part 1 before the split point, part 2 after) using FFmpeg.

    182 GitHub stars~554 tokensUpdated today
    Auto-check passed

Works with

Questions about Image Remove White Background

What does Image Remove White Background do?

Removes solid-color backgrounds (white, green 00FF00, magenta FF00FF) from a single AI-generated image using color key and border flood fill — not AI matting. Image Remove White Background is an agent skill from godot-fun/gai. Removes solid-color backgrounds (white, green 00FF00, magenta FF00FF) from a single AI-generated image using color key and border flood fill — not AI matting.

When should I use Image Remove White Background?

Image Remove White Background fits situations like: rembg over-removes foreground; for flat white/green/magenta backgrounds; color key cutout; white-background cutout.

How do I install Image Remove White Background in Claude Code?

Run `npx skills add godot-fun/gai --skill image-remove-white-background -a claude-code`. Or copy the skill folder (.agents/skills/image-remove-white-background in godot-fun/gai) into .claude/skills/image-remove-white-background in your project. Claude Code loads it when a task matches its description.

How do I install Image Remove White Background in Codex?

Run `npx skills add godot-fun/gai --skill image-remove-white-background -a codex`. Or copy the skill folder (.agents/skills/image-remove-white-background in godot-fun/gai) into .agents/skills/image-remove-white-background in your project. Codex loads it when a task matches its description.

Can I use Image Remove White Background in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add godot-fun/gai --skill image-remove-white-background -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/image-remove-white-background, .gemini/skills/image-remove-white-background, .github/skills/image-remove-white-background and .opencode/skills/image-remove-white-background in your project.

What does Image Remove White Background need to run?

Going by SKILL.md and its folder, Image Remove White Background needs the command-line tools its instructions call (python and git). Our summary lists: Python 3.

Does Image Remove White Background access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Image Remove White Background safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Image Remove White Background use?

Image Remove White Background is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Image Remove White Background use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Image Remove White Background?

Skills that share tags, products or a category with Image Remove White Background: 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars), Godot E2E (RandallLiuXin/GodotMaker, 550 stars), Gdtoolkit (RandallLiuXin/GodotMaker, 550 stars) and Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Image Remove White Background?

godot-fun (a GitHub organization) maintains it in godot-fun/gai, which has 182 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on October 9, 2026.

Source: godot-fun/gai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.