hashgraph-online/awesome-codex-plugins / plugins/Btike/bulk-bg-remove/skills/bulk-bg-remove
bulk-bg-remove
VerifiedRemove image backgrounds locally and in bulk: one photo, a folder (searched recursively) or many folders, with BiRefNet and lighter models picked to fit the machine. No uploads, no API keys, no per-image cost. Writes lossless transparent PNG/WebP, or shop-ready photos (white or any colour, square, sized, JPEG), to a new "<name>-no-bg" folder next to the input and never touches the originals. Use when the user asks to remove, cut out or erase a background, make a transparent PNG, isolate a product, person, animal or object, prepare product or catalog photos, or replace remove.bg for a batch. Reads JPG, PNG, HEIC, WebP, AVIF, TIFF and BMP.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.6 KB |
| agents/openai.yaml | config | 249 B |
| references/json-events.md | markdown | 6.1 KB |
| references/models.md | markdown | 7.5 KB |
| references/reviewer.md | markdown | 4.7 KB |
| references/troubleshooting.md | markdown | 2.5 KB |
references/reviewer.md
View on GitHub# Reviewing the cut-outs
You review cut-outs with fresh eyes: you did not choose the settings and you
do not run anything. You get review sheets (PNG) from a `bulk-bg-remove` run
and you return which images need another pass, and with what.
## The sheets
Each entry has a label `#n path/of/the/output.png` (relative to the output
folder) and three tiles:
1. the **original** photo (on dark grey),
2. the **cut-out on black**: shows light halos, white fringes and leftover light background,
3. the **cut-out on white**: shows dark fringes, leftover dark background and holes.
Open every sheet with your file-reading tool. The tiles are small: hair and
fur problems often do not show at that size. For **every** cut-out with hair,
fur, feathers, plants or thin parts, open its close-up (the `zoom` for that
`n` in the `review_sheets` event: the cut-out at up to 800 px, on black and on
white) before calling it fine.
An entry labelled `AUDIT` passed the engine's own chroma-key check and is on
the sheet as a spot check. Judge it exactly like the others; if it needs a fix,
say so plainly: it means the check missed something on these photos.
Never judge from the output PNG itself: most viewers, agent file readers
included, ignore transparency and show the original background, because the
engine keeps the colour of transparent pixels untouched.
## What counts as a defect
Judge each cut-out as a shop owner or designer would at normal size on a page:
would they use it as is? Flag only clear defects they would notice; if you
hesitate, it is fine (a second pass can also make a good cut-out worse). Do not flag:
soft hair edges that look natural, a removed contact shadow under a product
(the engine removes shadows by design), reflections that were in the photo,
or clear glass and plastic that keeps the old background inside it (no model
fixes that, product shots on white still look right, and the main report
already warns about glassware).
| Defect | Looks like | Fix to propose |
|---|---|---|
| Colour fringe | a tint of the old background (green, blue, grey) along hair, fur or edges, clearest on white or black | `--clean-edges` |
| Light halo | a thin white or light outline around the subject, on black | `--clean-edges` |
| Thin parts lost | stems, wires, straps, spokes, poles, branches cut off or broken | `--profile complex` |
| Background in gaps | background still inside loops, handles, between spokes, legs or leaves | `--profile complex` |
| Coarse hair | blocky, cut-off or chewed hair edges on a person; strands missing | `--profile complex` |
| Coarse or missing fur on an animal | a cat's or dog's fur chopped, blocky or partly cut away | `--model birefnet-portrait` |
| Background chunk attached | part of a wall, floor, fence, person's arm or prop still attached | `--profile complex`; if the run already used birefnet-general, `--model birefnet-massive` |
| Product part missing | a piece of the product removed (a panel, a cap, a handle) | `--model birefnet-general` |
| Empty or ghost | nothing, or a faint see-through smear | ask the user what to keep |
| Wrong subject | in a group or scene, the wrong thing kept, or several things when one was wanted | ask the user |
| Jagged low-res edges | stair-step edges on a small photo | ask the user for a larger original |
These fixes come from a blind-judged benchmark of 11 models on 80 images
(`models.md`). When a fix names a model or profile the run already used,
propose the next one in the same row, or `ask`.
## Comparing a fix
After a second pass you get the new sheets and the earlier ones. The `n`
numbers start again at 1 on the new sheets: match images by their `label`
(the output path), not by `n`. For each image that was redone, compare the
two cut-outs (open both close-ups, `zoom`) and say which is better. The new one wins only if it is clearly better; otherwise
keep the first.
```json
[{"label": "dog-long-fur.png", "keep": "new", "why": "arm and fence gone"},
{"label": "chairs/wire-chair.png", "keep": "old", "why": "new one lost wire detail"}]
```
## What to return
Return a short summary line, then a JSON array with one object per image that
is not fine (leave out the good ones):
```json
[
{"n": 6, "label": "dog-long-fur.png", "verdict": "fix",
"defect": "handler's arm and a fence post kept", "fix": "--profile complex"},
{"n": 23, "label": "shop/shelf.png", "verdict": "ask",
"defect": "several products kept, unclear which one is wanted", "fix": ""}
]
```
- `verdict`: `fix` (another pass should help) or `ask` (the user must decide).
- `fix`: exactly the flags from the table, or empty for `ask`.
- Summary line: `Reviewed N cut-outs: K fine, F to fix, A for the user.`
Be decisive and brief. One defect per image: the one that matters most.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |