
Image Remove Background
This removes image backgrounds and outputs transparent PNGs, useful for product shots, profile pictures, or anything you're compositing later. It wraps the agent-media CLI and supports three providers: a local Transformers.js option that runs on CPU without API keys, plus Fal and Replicate for cloud processing. The local provider is decent for quick jobs but you'll want Fal's birefnet model if you need high resolution output, since it supports custom resolution parameters. Returns a JSON response with the output path and file info. The mutex lock error on local runs is apparently harmless, which is the kind of quirk you just learn to ignore.
- skills.sh installs
- 207
- GitHub stars
- 6
- last updated
- Aug 21, 2026
Install
$ npx -y skills add agntswrm/agent-media --skill image-remove-background --agent claude-codeInstalls into .claude/skills of the current project.
Files
Image Remove Background
Removes the background from an image, leaving only the foreground subject with transparency.
Command
npx agent-media@latest image remove-background --in <path> [options]
Inputs
| Option | Required | Description |
|---|---|---|
--in | Yes | Input file path or URL |
--out | No | Output path, filename or directory (default: ./) |
--provider | No | Provider to use (local, fal, replicate) |
--resolution | No | Output resolution (e.g., "2048x2048"). Supported by fal Dynamic model. |
Output
Returns a JSON object with the processed image path:
{
"ok": true,
"media_type": "image",
"action": "remove-background",
"provider": "fal",
"output_path": "nobg_123_abc.png",
"mime": "image/png",
"bytes": 34567
}
Examples
Remove background from local file:
npx agent-media@latest image remove-background --in portrait.jpg
Remove background using specific provider:
npx agent-media@latest image remove-background --in portrait.jpg --provider replicate
Sponsors
Details
- Repository
- github.com/agntswrm/agent-media
- Category
- AI & Agent Building
- First seen
- Jun 3, 2026