mohamedabdallah-14/prompt-to-asset/transparent-bg
Claude Code and agent skill by mohamedabdallah-14/prompt-to-asset
- community
Checking that the SKILL.md file is still in the repository.
Produce a truly RGBA-transparent asset from a brief. Handles the #1 pain (Gemini/Imagen rendering checkerboard pixels instead of real alpha). Routes to native-RGBA providers; falls back to BiRefNet / BRIA RMBG / LayerDiffuse / difference matting.
Install
npx vskill@latest install mohamedabdallah-14/prompt-to-asset/transparent-bgSKILL.md
Transparent background
The problem (see research 13 + 04)
Almost every modern T2I VAE is RGB-only. Asking Imagen 3/4 or Gemini 2.5/3 Flash Image for a "transparent logo" triggers one of two failures:
- Flat background — DALL·E 3, Stable Diffusion families render a white/gray background that must be matted.
- Checkerboard as RGB pixels — Gemini/Imagen literally render the gray-and-white 8×8 tile pattern (because Photoshop screenshots in their training data show transparency that way). This is the "weird boxes" users report. It cannot be fixed by prompting.
Fix hierarchy (apply first that fits)
1. Route to a native-RGBA provider
| Provider | Mechanism | |
|---|---|---|
| `gpt-image-1` / `gpt-image-1.5` | API param background: "transparent" + output_format: "png" or "webp" | |
| Ideogram 3 Turbo | Dedicated /ideogram-v3/generate-transparent endpoint; set rendering_speed: "TURBO" for Turbo tier | |
| Recraft V3 | native SVG output (alpha is trivial); rasterize if raster needed | |
| LayerDiffuse on SDXL / Flux | In-diffusion-loop transparency adapter; better edges than post-matte |
2. Post-process matte (for everything else)
| Matting model | License | Strength | |
|---|---|---|---|
| BiRefNet | MIT | Default choice 2026; best soft-edge handling | |
| BRIA RMBG-2.0 | CC-BY-NC-4.0 (hosted API for commercial) | Best overall quality | |
| U²-Net | Apache-2.0 | Legacy fallback | |
| rembg | wrapper around U²-Net / BiRefNet | Easy CLI integration | |
| SAM 2 | Apache-2.0 | For complex/multi-object scenes; 2-stage (segment → matte) |
3. Difference matting (for semi-transparency: glass, hair, smoke)
- Generate the same subject on pure-white background.
- Generate again with same seed on pure-black background.
alpha = (white_version - black_version + 255) / 2in luminance.- Works for true semi-transparent objects where
rembg/BiRefNet produce hard-cutout artifacts.
4. Vectorize-and-drop (for flat marks)
- Generate raster at 1024² on white background.
- BiRefNet matte → K-means quantize to N colors →
vtracerorpotrace. - SVG has alpha trivially. Rasterize at target sizes with
@resvg/resvg-jsfor RGBA PNGs.
Validation (never ship without)
Tier-0 alpha validator (see packages/mcp-server/src/pipeline/validate.ts):
Prompt scaffold for fallback matting flow
Do not ask for transparency in the prompt. Ask for pure white:
Then post-process with BiRefNet / BRIA.
Never do this
"transparent background"as a prompt to Imagen or Gemini (checkerboard result).- Trust
output_format: "png"alone to produce alpha (PNG supports alpha, but the model has to emit it). - Algorithmic
#FFFFFF → alpha=0thresholding (loses anti-aliasing, creates jagged edges). - Post-resize RGBA with non-premultiplied alpha (dark fringes).
Output
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/transparent-bg/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mohamedabdallah-14/prompt-to-asset/transparent-bg)