Install
$ agentstack add skill-godot-fun-godot-framework-image-remove-background ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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](../../rules/skill-dependency-manager.md) — run scripts as documented, install missing tools into .dependency/.
- Run
remove_background.pythrough therembgmanifest entry (.dependency/rembg/.venv/). Never use hostpython,py,python3, or any interpreter outside.dependency/. - Do not hand-write
rembg i/rembg p— use the bundled script. populated: falseforrembgis not a reason to skip. Install first, setpopulated: true, retry the same command.- Pass the input path as-is (chat attachment path,
Downloads/foo.png, project folder, etc.). Output goes to/transparent/by default — no path rewriting.
Setup (first run)
From project root:
.dependency/python/python -m venv .dependency/rembg/.venv
.dependency/rembg/.venv/Scripts/python -m pip install "rembg[cpu]"
GPU (CUDA) — faster batch processing:
.dependency/rembg/.venv/Scripts/python -m pip install "rembg[gpu]"
Register in .dependency/manifest.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 a transparent/ folder under the input path and write outputs there (never overwrites sources):
# Single file → image/sprites/transparent/hero.png
.dependency/rembg/.venv/Scripts/python .cursor/skills/image-remove-background/scripts/remove_background.py image/sprites/hero.png
# Directory batch → image/sprites/hero/transparent/.png
.dependency/rembg/.venv/Scripts/python .cursor/skills/image-remove-background/scripts/remove_background.py image/sprites/hero -r
# e.g. image/sprites/hero/sub/foo.png → image/sprites/hero/transparent/sub/foo.png
Custom output directory:
.dependency/rembg/.venv/Scripts/python .cursor/skills/image-remove-background/scripts/remove_background.py image/sprites/hero \
--output-dir image/sprites/hero_cutout
Model selection
| Model | Use case | |-------|----------| | u2net (default) | General objects, icons, props | | u2netp | Faster / lighter; smaller assets | | isnet-general-use | Higher quality general matting | | birefnet-general | Best general quality (slower) | | birefnet-portrait | Characters / portraits | | u2net_human_seg | Human figures only |
.dependency/rembg/.venv/Scripts/python .cursor/skills/image-remove-background/scripts/remove_background.py image/characters \
--model birefnet-portrait --output-dir image/characters_cutout
Edge quality (alpha matting)
For hair, fur, or soft edges, enable alpha matting:
.dependency/rembg/.venv/Scripts/python .cursor/skills/image-remove-background/scripts/remove_background.py image/portrait.png \
--alpha-matting --output-dir image/portrait_cutout
Defaults
| Option | Default | Notes | |--------|---------|-------| | Output | /transparent/ | Folder is auto-created under the file or directory you pass; use --output-dir for a custom path | | --model | u2net | See table above | | --pattern | *.png | Also matches .jpg, .jpeg, .webp | | --alpha-matting | off | Enable for fine edge detail | | --crop | off | Trim transparent borders after matting | | Overwrite | off | Pass --overwrite to replace existing outputs |
Agent workflow
- Paths — Pass whatever path the user gives or the chat `
path directly. Output lands intransparent/` next to that input. - Trial first — run on 1 image, inspect the
transparent/or--output-dirresult before batch. - Pick model —
u2netfor generic assets;birefnet-portraitfor characters;birefnet-generalwhen quality matters. - Soft edges — try
--alpha-mattingif halos or jagged hair/fur appear. - Sprite sheets — skip
*_sheet.pngby default; process individual frames unless the user asks otherwise. - Already transparent — script still runs; rembg re-mats from visible RGB. Warn user if source already has alpha.
- Revert — delete output folder or
git restoreif needed; sources are never modified.
Troubleshooting
| Issue | Fix | |-------|-----| | rembg missing | Follow Setup; update manifest | | Very slow | Install rembg[gpu]; try --model u2netp | | Jagged edges | --alpha-matting | | Wrong subject removed | Switch model; try birefnet-general | | Leftover background color | Re-run with --alpha-matting; check source contrast | | OOM on large images | Script auto-downscales inputs above 4096 px longest side |
Related
- Flat white/green/magenta AI backgrounds: [image-remove-white-background](../image-remove-white-background/SKILL.md) (prefer over rembg)
- rembg docs: https://github.com/danielgatis/rembg
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: godot-fun
- Source: godot-fun/godot-framework
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.