Agent skill

Image Remove Background

by godot-fun in godot-fun/gai

Removes image backgrounds and exports transparent PNGs using rembg (U2Net / BiRefNet).

MITAuto-check passedMedia & Creative

Install Image Remove Background

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

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

GitHub CLI
$ gh skill install godot-fun/gai image-remove-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-background .claude/skills/image-remove-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-background
GitHub stars
182
Token cost
~1.5k tokens
SKILL.md length
531 words
Files
1
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Removes image backgrounds and exports transparent PNGs using rembg (U2Net / BiRefNet).

  • Works in 6 steps: Paths — Pass whatever image path the… → One file per run — process one image,… → Pick model — u2net for generic assets;… → …
  • The user wants background removal
  • SKILL.md covers Rules, Setup (first run), Quick Start and Model selection, plus 7 more sections
  • Calls python and git

What it does

Image Remove Background is an agent skill from godot-fun/gai. Removes image backgrounds and exports transparent PNGs using rembg (U2Net / BiRefNet). Use when the user wants background removal, matting, cutout, background cutout, transparent sprites, alpha PNG export, or remove background from a game/UI asset.

Its SKILL.md is about 1.5k 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 Media & Creative, covering Image editing. It works with 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

  • The user wants background removal
  • Background cutout
  • Transparent sprites
  • Alpha PNG export

Example prompts

  • “Use the image-remove-background skill to remove image backgrounds and exports transparent PNGs using rembg (U2Net / BiRefNet)”
  • “/image-remove-background”

Requirements

  • Python 3

Workflow steps

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

  1. Paths — Pass whatever image path the user gives or the chat path directly. Output lands in image-remove-background/` next to that file by…
  2. One file per run — process one image, verify the result, then repeat for additional files if needed.
  3. Pick model — u2net for generic assets; birefnet-portrait for characters; birefnet-general when quality matters.
  4. Soft edges — try --alpha-matting if halos or jagged hair/fur appear.
  5. Already transparent — script still runs; rembg re-mats from visible RGB. Warn user if source already has alpha.
  6. Revert — delete output file or git restore if needed; sources are never modified.

What it can do on your machine

Read from SKILL.md and the folder at commit aff659b. 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

    Links to these hosts (documentation or services it may open):

    • github.com

    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 Background loads about 1.5k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 531 words of instructions outside code blocks.

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

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 aff659b, republished under its MIT licence (© godot-fun). 531 words, ~1,472 tokens.

Download SKILL.mdSave it as .claude/skills/image-remove-background/SKILL.md (or your agent's skills folder).
name
image-remove-background
description
Removes image backgrounds and exports transparent PNGs using rembg (U2Net / BiRefNet). Use when the user wants background removal, matting, cutout, background cutout, transparent sprites, alpha PNG export, or remove background from a game/UI asset.

Image Remove Background (rembg)

Remove image backgrounds with AI matting via rembg. Output is RGBA PNG with transparent background — ready for Godot sprites and UI.

Rules

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

  • Run remove_background.py through the rembg manifest entry (.dependency/rembg/.venv/). Never use host python, py, python3, or any interpreter outside .dependency/.
  • Do not hand-write rembg i / rembg p — use the bundled script.
  • Single file only. Pass one image with --image; directories are not supported.
  • populated: false for rembg 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-background/ by default — no path rewriting.
  • Never overwrite source files. Output lands in image-remove-background/ or --output.

Setup (first run)

From project root:

bash
.dependency/python/python -m venv .dependency/rembg/.venv
.dependency/rembg/.venv/Scripts/python.exe -m pip install "rembg[cpu]"

GPU (CUDA) — faster processing:

bash
.dependency/rembg/.venv/Scripts/python.exe -m pip install "rembg[gpu]"

Register in .dependency/manifest.json:

json
"rembg": {
  "populated": true,
  "bin": ".dependency/rembg/.venv/Scripts/python.exe"
}

Use bin/python on Unix. Model weights download on first run (~hundreds of MB).

Quick Start

Default: create an image-remove-background/ folder beside the input file and write the PNG there (never overwrites sources):

bash
# image/sprites/hero.png → image/sprites/image-remove-background/hero.png
.dependency/rembg/.venv/Scripts/python.exe .ai/image-remove-background/remove_background.py --image image/sprites/hero.png

Custom output path:

bash
.dependency/rembg/.venv/Scripts/python.exe .ai/image-remove-background/remove_background.py --image image/sprites/hero.png -o image/sprites/hero_cutout

Model selection

ModelUse case
u2net (default)General objects, icons, props
u2netpFaster / lighter; smaller assets
isnet-general-useHigher quality general matting
birefnet-generalBest general quality (slower)
birefnet-portraitCharacters / portraits
u2net_human_segHuman figures only
bash
.dependency/rembg/.venv/Scripts/python.exe .ai/image-remove-background/remove_background.py --image image/character.png --model birefnet-portrait

Edge quality (alpha matting)

For hair, fur, or soft edges, enable alpha matting:

bash
.dependency/rembg/.venv/Scripts/python.exe .ai/image-remove-background/remove_background.py --image image/portrait.png --alpha-matting

Defaults

OptionDefaultNotes
--imageRequiredSingle supported image file
Output<image-dir>/image-remove-background/<name>.pngUse -o / --output for custom file or directory
--modelu2netSee table above
--alpha-mattingoffEnable for fine edge detail
--cropoffTrim transparent borders after matting

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

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

Agent Workflow

  1. Paths — Pass whatever image path the user gives or the chat <image_files> path directly. Output lands in image-remove-background/ next to that file by default.
  2. One file per run — process one image, verify the result, then repeat for additional files if needed.
  3. Pick model — u2net for generic assets; birefnet-portrait for characters; birefnet-general when quality matters.
  4. Soft edges — try --alpha-matting if halos or jagged hair/fur appear.
  5. Already transparent — script still runs; rembg re-mats from visible RGB. Warn user if source already has alpha.
  6. Revert — delete output file or git restore if needed; sources are never modified.

Agent Notes

  1. Use the bundled script, not hand-written rembg CLI commands.
  2. Missing rembg venv → populate .dependency/ per skill-dependency-manager, retry same command.
  3. Do not copy, move, or replace the source with cutout output — tell the user where the output file is.
  4. Flat white/green/magenta AI backgrounds → prefer image-remove-white-background over rembg.
  5. Need trim borders after matting → image-trim.

Troubleshooting

IssueFix
rembg missingFollow Setup; update manifest
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
Very slowInstall rembg[gpu]; try --model u2netp
Jagged edges--alpha-matting
Wrong subject removedSwitch model; try birefnet-general
Leftover background colorRe-run with --alpha-matting; check source contrast
OOM on large imagesScript auto-downscales inputs above 4096 px longest side

CLI

Copy-paste commands: cli/image-remove-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-background of godot-fun/gai.

Open the folder on GitHubat commit aff659b

Compare with similar skills

Image Remove 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 Background compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Image Remove Background this skillgodot-fun/gai182—~1.5kAutomated safety check: PassMIT
Fal AI Generationwitnesstodark/mr-mak-workspace336—~1kAutomated safety check: NotesMIT
Stable Diffusion with DiffusersOrchestra-Research/AI-Research-SKILLs13k6 repos~3.2kAutomated safety check: PassMIT
Krita CLI HarnessHKUDS/CLI-Anything52k—~931Automated safety check: PassApache-2.0
Image Processingjezweb/claude-skills1.1k—~1.8kAutomated safety check: PassMIT
UAV Trajectory Overlay from VideoXXLiu-HNU/visualize_uav_trajectory242—~535Automated safety check: PassGPL-3.0

Similar skills

  • Fal AI Generation

    witnesstodark/mr-mak-workspace

    Generate and edit images, create video, audio, 3D assets or material maps through fal.ai MCP or the Python queue client.

    336 GitHub stars~1k tokensUpdated 2 days ago
    Media & CreativeAuto-check: notes
  • Stable Diffusion with Diffusers

    Orchestra-Research/AI-Research-SKILLs

    Generates and edits images with Stable Diffusion through Hugging Face Diffusers, covering text-to-image, image-to-image, inpainting, SDXL and custom pipelines.

    13k GitHub starsUsed in 6 repos~3.2k tokens
    Media & CreativeAuto-check passed
  • Krita CLI Harness

    HKUDS/CLI-Anything

    Drives Krita from the command line to create projects, add layers, apply filters, resize the canvas and export images, with JSON output for agents.

    52k GitHub stars~931 tokensUpdated 16 days ago
    Media & CreativeAuto-check passed
  • Image Processing

    jezweb/claude-skills

    Process images for web development — resize, crop, trim whitespace, convert formats (PNG/WebP/JPG), optimise file size, generate thumbnails, create OG card images.

    1.1k GitHub stars~1.8k tokensUpdated 2 days ago
    Media & CreativeAuto-check passed
  • UAV Trajectory Overlay from Video

    XXLiu-HNU/visualize_uav_trajectory

    Composites several moments from real drone footage into one still with ghost trails, then lays out paper figures and an editable PowerPoint file.

    242 GitHub stars~535 tokensUpdated 11 days ago
    Media & CreativeAuto-check passed
  • Photo Abstract Editorial

    kwhi6693-web/photo-abstract-editorial

    A skill your agent uses when one or more photographs must become adaptive photo-plus-abstraction editorial compositions while source facts, spatial relationships, and strict photo preservation…

    112 GitHub stars~870 tokensUpdated 1 mo ago
    Media & CreativeAuto-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 Background

What does Image Remove Background do?

Removes image backgrounds and exports transparent PNGs using rembg (U2Net / BiRefNet). Image Remove Background is an agent skill from godot-fun/gai. Removes image backgrounds and exports transparent PNGs using rembg (U2Net / BiRefNet).

When should I use Image Remove Background?

Image Remove Background fits situations like: the user wants background removal; background cutout; transparent sprites; alpha PNG export.

How do I install Image Remove Background in Claude Code?

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

How do I install Image Remove Background in Codex?

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

Can I use Image Remove 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-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-background, .gemini/skills/image-remove-background, .github/skills/image-remove-background and .opencode/skills/image-remove-background in your project.

What does Image Remove Background need to run?

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

Does Image Remove Background access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Image Remove 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 Background use?

Image Remove 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 Background use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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 Background?

Skills that share tags, products or a category with Image Remove Background: Fal AI Generation (witnesstodark/mr-mak-workspace, 336 stars), Stable Diffusion with Diffusers (Orchestra-Research/AI-Research-SKILLs, 13k stars), Krita CLI Harness (HKUDS/CLI-Anything, 52k stars) and Image Processing (jezweb/claude-skills, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Image Remove 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 8, 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.