lucida-remove-backgroundlisted
Install: claude install-skill Yuki001/game-dev-skills
# Lucida Background Removal
Use the `bgr` executable from `egeorcun/lucida`. Preserve the source image and create a separate transparent PNG.
## Workflow
1. Resolve the input image and confirm it exists.
2. Use the user's output path when provided. Otherwise, write `<input-stem>-transparent.png` beside the input. Do not overwrite the source unless the user explicitly requests it.
3. Check whether `bgr` is available:
```text
bgr --help
```
**Note:** If the current environment is sandboxed (for example: Codex sandbox), run all `bgr` commands in the user's normal terminal. Otherwise the `bgr --help` command process might be freezed or timeout.
4. If `bgr` is missing, verify that `uv` is available and install the CLI:
```text
uv tool install --from git+https://github.com/egeorcun/lucida.git my-bg-remover
```
The package requires Python 3.12 or newer. The installation exposes one executable: `bgr`.
5. Select the model:
- Use `lucida` by default, especially for glass, partial transparency, smoke, glow, VFX, camouflage, text or logos with soft shadows, line art, illustrations, and print or sticker designs.
- Use `birefnet-hr` for high-resolution general segmentation, especially solid physical subjects, product photos, or when Lucida keeps unwanted low-alpha background haze. Expect higher compute and memory use because it processes at 2048×2048.
- Read [references/models.md](references/models.md) only when an alternate model, a versioned loc