Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计提醒

background-remove背景删除

Agent Skill

background-remove 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

612

周安装

26

GitHub Stars

10

下载量

214
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:background-remove(背景删除)
来源仓库:https://github.com/michaelboeding/skills
仓库路径:skills/background-remove
安装命令:
npx skills add https://github.com/michaelboeding/skills --skill background-remove
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/michaelboeding/skills --skill background-remove

简介

background-remove 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

  • 适用于图像处理、图片编辑或视觉素材清理场景。
  • 支持自动背景分离和透明化处理,提升图像可用性。
  • 安装前建议确认权限范围和维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Background Remove Skill

Remove backgrounds from images using AI (rembg/U2-Net) or built-in methods.

Output: PNG or WebP with transparent background.

Quick Examples

User SaysWhat Happens
"Remove the background from this photo"AI removes background, outputs PNG
"Make this image transparent"Removes background, preserves subject
"Cut out the product from this image"Isolates subject with clean edges
"Remove backgrounds from all images in /photos"Batch processes multiple images
"Quick background removal, white background"Uses fast built-in method

Prerequisites

  • rembg - AI-based background removal (recommended) pip install rembg # Or with GPU acceleration (faster, requires CUDA) pip install rembg[gpu]
  • Pillow - Required for image processing pip install Pillow

The first run will download the U2-Net model (~170MB) which is cached for future use.

Methods

MethodDescriptionBest For
rembgAI-based using U2-Net modelComplex images, photos, products (default)
builtinWhite-to-transparent conversionIcons, graphics with clean white backgrounds

Workflow

Step 1: Gather Requirements (REQUIRED)

Use the AskUserQuestion tool for each question. Ask ONE question at a time.

Q1: Image Source

"Which image(s) should I remove the background from? Please provide the file path or paste the image."

*Wait for response.*

Q2: Method (Optional)

"Which removal method? - AI (rembg) - Best quality, works on any image (default) - Built-in - Faster, best for white backgrounds"

*Wait for response. Default to AI if user doesn't specify.*

Q3: Output Location (Optional)

"Where should I save the result? - Same location with _nobg suffix (default) - Custom path"

*Wait for response.*

Step 2: Execute Background Removal

Single image:

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i "/path/to/image.jpg" \
  -o "/path/to/output.png"

Batch processing:

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i "/path/to/img1.jpg" "/path/to/img2.png" "/path/to/img3.webp" \
  -o "/path/to/output_folder"

Using built-in method (faster for white backgrounds):

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i "/path/to/icon.png" \
  -m builtin

Step 3: Deliver Result

  1. Show the result to the user
  2. Confirm the background was removed successfully
  3. Offer to:

- Process additional images - Try a different method if quality isn't satisfactory - Adjust output format (PNG vs WebP)

Script Parameters

ParameterShortDescriptionDefault
--input-iInput image path(s)Required
--output-oOutput path or directoryAuto-generated with _nobg suffix
--method-mRemoval method (rembg, builtin)rembg

Output Formats

The output format is determined by the file extension:

ExtensionFormatNotes
.pngPNGBest quality, larger file (default)
.webpWebPGood compression, modern format

Integration with Other Skills

This skill can be called by other skills that need background removal:

From Python (import)

import sys
sys.path.insert(0, "${SKILL_PATH}/skills/background-remove/scripts")
from background_remove import remove_background

result = remove_background("/path/to/image.png", "/path/to/output.png", method="rembg")
if result.get("success"):
    print(f"Saved to: {result['file']}")
else:
    print(f"Error: {result['error']}")

From Command Line

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i "/path/to/image.png" \
  -o "/path/to/output.png" \
  -m rembg

Error Handling

rembg not installed:

rembg not installed. Install with: pip install rembg[gpu] (or pip install rembg for CPU-only)

The script will automatically fall back to the built-in method.

Image not found:

Image not found: /path/to/image.png

Processing failed:

  • Try a different method
  • Check if the image file is corrupted
  • Ensure sufficient memory for large images

Tips for Best Results

  1. Use rembg for photos - AI handles complex edges (hair, fur, transparent objects)
  2. Use builtin for graphics - Faster for icons/logos with clean white backgrounds
  3. Check edges - If edges are rough, the AI method usually gives better results
  4. Batch process - Process multiple images at once for efficiency
  5. GPU acceleration - Install rembg[gpu] for faster processing on NVIDIA GPUs

Examples

Remove background from a photo

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i "product_photo.jpg" \
  -o "product_transparent.png"

Batch process a folder

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i photos/*.jpg \
  -o "transparent_photos/"

Fast removal for icons (white background)

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i "icon.png" \
  -m builtin

Output as WebP (smaller file size)

python3 ${SKILL_PATH}/skills/background-remove/scripts/background_remove.py \
  -i "photo.jpg" \
  -o "result.webp"

适合场景

01

商品图处理

02

人像抠图

03

透明背景素材

04

营销设计资产

能力概览

能力 1

调用背景移除模型

能力 2

输出透明背景图片

能力 3

支持商品、人像和营销素材处理

能力 4

可接入图像编辑工作流

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.03%
按下载量换算75

Claude

32.5%
按下载量换算70

Cursor

20.15%
按下载量换算43

Gemini CLI

10.27%
按下载量换算22

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills