Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

remove-bg

FreeNo executable scriptsNot checked

Remove image backgrounds with remove.bg's background removal, now served by the Leonardo.Ai API. Trigger phrases: remove.bg, remove background, cutout image.

gabrielmoreiraby gabrielmoreira★ 23 GitHub stars

About this skill

remove.bg

Purpose

Remove the background from an image: submit a local file or an image URL, get back a transparent PNG saved to a local path. Starting December 1, 2026 the remove.bg API moves to Leonardo.Ai, so this connector calls Leonardo's sync API with the remove-bg model, following the official migration guide.

Tooling

All commands go through bin/remove-bg.py:

bin/remove-bg.py auth                                        # verify the connection
bin/remove-bg.py process --file ./photo.jpg --out ./cutout.png
                                                            # remove background from a local file
bin/remove-bg.py process --url https://example.com/a.jpg --out ./cutout.png
                                                            # remove background from an HTTPS image URL
bin/remove-bg.py process --file ./photo.jpg --out ./cutout.png --size full --type product
                                                            # size: preview, full, auto, 50MP; type: auto, person, product, car, animal, graphic, transportation, other

process requests the result inline (base64: true) with ephemeral: true, so nothing is kept in the Leonardo library. The CLI decodes the image, saves it to the --out path and prints that path plus the cost Leonardo reports for the call.

Auth

  • Provider id: remove-bg (credential is collected as custom.remove-bg)
  • Collection: a Leonardo.Ai API key via the secure credential flow (credentials.request_api_access); create one on the API Access page at app.leonardo.ai. The key is sent as Authorization: Bearer YOUR_API_KEY. remove.bg keys don't carry over: if custom.remove-bg still holds an old remove.bg key, reconnect it with a Leonardo.Ai key.
  • Required scopes: n/a (single key)
  • Allowed hosts: cloud.leonardo.ai
  • Status check: bin/remove-bg.py auth (lists the available models, which costs nothing)

Operating Rules

  1. Every process call is billed (USD $0.1047 per image per Leonardo's migration guide; the exact cost is printed after each call): confirm with the user before processing, or work inside an explicit budget.
  2. Uploaded images are processed on Leonardo.Ai's servers: do not send sensitive or private imagery without the user's okay.
  3. Inline limits: local files are sent as base64 and should stay under ~7.5MB, and inline results must stay under ~7.45MB. For big images use --size preview or pass an HTTPS --url.
  4. There is no credit balance command: Leonardo's documented API has no equivalent of remove.bg's /account.
  5. No video support (video background removal is a separate service).
  6. Never exfiltrate the credential: the CLI only ever handles surrogates. Do not print, log, or transmit the key value.

Files

  • SKILL.md
  • bin/remove-bg.py

Maturity

🧪 Draft: written from Leonardo.Ai's public remove.bg migration guide (updated 2026-09-02) and Create Sync Generation reference (updated 2026-08-31); not yet live-tested end to end.

Full SKILL.md on GitHub

Install remove-bg in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the remove-bg skill do?

Remove image backgrounds with remove.bg's background removal, now served by the Leonardo.Ai API. Trigger phrases: remove.bg, remove background, cutout image.

How do I install the remove-bg skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the remove-bg skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare remove-bg with