background-remove

background-remove is a skill for Claude Code from alejandro-ventures/llm-agnostic-icm-framework. It costs 19 tokens per session (1,269 once invoked), scanned A, original, Apache-2.0.

An image-processing workflow that removes backgrounds from portraits and other images, producing PNG files with transparent backgrounds. It includes different processing choices for people, hair, fine edges, and shoulder coverage.

In plain words
What is it for?
Use it to prepare portrait, fashion, or general images for layouts where the subject should sit on a transparent background.
Why use it?
It separates the subject from the background without leaving a solid-colored backdrop, while letting you choose how to balance edge quality and coverage.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/remove_bg.py # default: u2net_human_seg --post-process.

Good fit Use it to prepare portrait, fashion, or general images for layouts where the subject should sit on a transparent background.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/alejandro-ventures/llm-agnostic-icm-framework
agentmods
npx agentmods add skills/alejandro-ventures/llm-agnostic-icm-framework/background-remove

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for background-remove

README.md
[![agentmods](https://agentmods.dev/badge/skills/alejandro-ventures/llm-agnostic-icm-framework/background-remove.svg)](https://agentmods.dev/skills/alejandro-ventures/llm-agnostic-icm-framework/background-remove)
Your own site
<a href="https://agentmods.dev/skills/alejandro-ventures/llm-agnostic-icm-framework/background-remove"><img src="https://agentmods.dev/badge/skills/alejandro-ventures/llm-agnostic-icm-framework/background-remove.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.01269
Opus 5 $0.00010 $0.00634
Sonnet 5 $0.00004 $0.00254
Haiku 4.5 $0.00002 $0.00127

Measured 8d ago against content hash 722925bd83cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

background-remove scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workflows/background-remove/.github/background-remove/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

background-remove

Inputs

Source Location Why
Images input/ source photos to process (copy reference images here first)

Model selection — the decision tree

The right choice depends on image type, subject matter, and how much detail matters. Tested against close-up portraits with patterned backgrounds; results transfer reasonably well elsewhere.

Model Use when... Time (on this box) Notes
u2net_human_seg (default) portraits, busts, people, fashion shots ~1.5 s Best balance of speed + clean edges for human subjects. Shoulders preserve up to ~80% image height on standard portrait framing.
u2net_human_seg --post-process=false you need the most shoulder coverage and can accept fuzzier edges ~1.2 s Disables rembg's mask-tightening pass, which is what chews into shoulders. Edge pixels go from crisp to semi-transparent (500K+ partial-alpha transitions). Visualize with checkerboard composites before committing.
u2net_human_seg --alpha-matting hair, fine boundaries, feathered edges matter more than speed ~1.8 s Adds alpha matting post-process for smoother gradient edges. Worth it on close-ups where individual strands are visible. +30% time vs default.
u2netp you just need something fast and clean enough ~0.3 s Smallest, fastest model. Quality visibly lower at fine boundaries. Good for thumbnails or quick previews; not recommended for final output on detailed portraits.
sam extreme quality is worth the cost, and subject is complex/non-human (animals, objects) ~4–10 s Segment Anything produces clean masks but still truncates shoulders on close-up portrait framing (body covers only ~65% of image height). Useful for non-portrait subjects; skip for people.

Default recommendation

Use u2net_human_seg --post-process as your first pass. It handles 80%+ of close-up portrait work reliably and runs in ~1.5 s. Only change defaults when the user tells you something specific looks off.

Read the full file on GitHub · 73 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 73 lines · 19 tokens per session scan A 722925bd83cc

Subscribe to this mod's changes

background-remove is a skill published in the GitHub repository alejandro-ventures/llm-agnostic-icm-framework (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,269 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories