Introduction¶
When creating e-commerce graphics, social media assets, or document illustrations, tasks like background removal (cutout), resizing, and watermarking often require repeatedly switching between desktop software or online services. Online tools necessitate uploading original images, and batch processing often involves queuing. While pure Pillow scripts can handle cropping and watermarking, background removal and replacement usually require finding a separate solution.
Here, we introduce image-studio (Coordinate: @user_3b76b7e2/image-studio-pro) on SkillHub. It can be triggered via natural language or slash commands within an Agent. It utilizes a local Python CLI, image_studio.py, to perform batch processing. Once dependencies are installed, no API Key is required, nor does it rely on remote inference.
What is this?¶
image-studio is a Community-published (community) Agent Skill categorized under design-media. The current version is 1.0.0, published by user_3b76b7e2. The SkillHub page summary describes it as: “Batch background removal, background replacement, watermark addition, and size cropping.” The tag is requires_api_key=false.
The Skill itself consists of a universal SKILL.md file and image_studio.py located in the same directory. Processing is executed locally, relying on rembg (for background removal/replacement) and Pillow (for watermarking, scaling, cropping, etc.). Once dependencies are installed, routine operations do not require an internet connection, nor are images transferred to third parties.
Core Features¶
The following capabilities are consistent with the Skill documentation and CLI implementation. They can be executed on single images or in batches for entire directories.
-
Remove Background (
remove-bg/ Alias抠图)
Uses rembg (default modelu2net). If rembg is not installed, it falls back to OpenCV GrabCut, which has lower precision. -
Replace Background (
replace-bg)
First removes the subject, then composites it onto a background image (-b) or a solid color (--bg-color, hexadecimal).-band--bg-colorare mutually exclusive. -
Watermark (
watermark)
Text (-t) or image (--image) watermarks. Allows setting position, transparency, font size/color, or scale. Supports tiling (tile). Text and image watermarks are mutually exclusive. -
Resize / Crop (
resize)
Modes:resize(stretch),cover,contain(can set--bg-colorfor margins),crop. You can specify output--formataspngorjpg. -
Info (
info)
Views metadata such as dimensions, color mode, and file size.
Supported Formats (Input scan extensions): PNG, JPG, JPEG, WEBP, BMP, TIFF (and .tif). The default output prefers PNG when the alpha channel needs to be preserved.
Installation & Enablement¶
Install SkillHub CLI (If not already installed)¶
command -v skillhub && skillhub --version
If not installed, follow the official SkillHub instructions to perform a full installation or just the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
Install this Skill¶
When installing, you must use --dir to point to the current Agent’s skills directory. Otherwise, it defaults to ./skills/, which might not be recognized. The installation hint provided on the official page is:
Please install `@user_3b76b7e2/image-studio-pro` according to https://skillhub.cn/install/skillhub.md.
Command line equivalent example (replace <skills directory> with your environment path):
skillhub install @user_3b76b7e2/image-studio-pro --dir <skills directory>
Common skills directories (Excerpted from SkillHub installation docs, depending on your actual client):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
After installation, the CLI script will be located at a path similar to:
<skills directory>/@user_3b76b7e2/image-studio-pro/image_studio.py
(The example path in the Skill doc is ~/.agents/skills/image-studio/image_studio.py; please refer to the actual path after your --dir installation.)
Install Python Dependencies¶
For first-time use, it is recommended to execute the Skill’s built-in installation subcommand, or manually install rembg (required for background removal/replacement):
python <skills directory>/@user_3b76b7e2/image-studio-pro/image_studio.py install
Or:
pip install rembg
watermark, resize, and info only require Pillow (the script checks for Pillow upon startup). remove-bg / replace-bg will attempt a GrabCut fallback if rembg is missing, which may still require opencv-python.
Enable in Agent¶
Users can invoke the Skill via /image-studio or trigger words (such as “remove background”, “replace background”, “watermark”, “crop”, etc.). The Agent assembles and executes python .../image_studio.py <subcommand> ... based on the task, then reports the number of processed images and the output directory.
Typical Usage¶
In the following commands, replace <CLI> with the absolute path to your image_studio.py.
Dependency Check & Metadata:
python <CLI> install
python <CLI> info -i photo.jpg
Single Image Background Removal:
python <CLI> remove-bg -i input.jpg -o ./output
Directory Batch Background Removal:
python <CLI> remove-bg -i ./images/ -o ./output_nobg
Replace Background (Image or Solid Color):
python <CLI> replace-bg -i portrait.jpg -b beach_background.jpg -o ./output
python <CLI> replace-bg -i product.jpg --bg-color "#3498db" -o ./output
Text Watermark:
python <CLI> watermark -i photo.jpg -t "© 2024 Your Name" \
-p bottom-right --opacity 0.6 --font-size 48 --font-color "#ffffff" -o ./output
Scale to 1920×1080 (cover, suitable for banners):
python <CLI> resize -i photo.jpg -w 1920 -h 1080 --mode cover -o ./output
Pipeline Example (Remove Bg → Replace Bg → Uniform Size → Watermark):
DIR=./batch
python <CLI> remove-bg -i $DIR/photos -o $DIR/step1_nobg
python <CLI> replace-bg -i $DIR/step1_nobg -b bg.jpg -o $DIR/step2_newbg
python <CLI> resize -i $DIR/step2_newbg -w 1920 -h 1080 --mode cover -o $DIR/step3_resize
python <CLI> watermark -i $DIR/step3_resize -t "© 2024" -p bottom-right -o $DIR/final
Use Cases & Notes¶
Who is it for
- Developers or operators who need to quickly batch process assets within a conversation without wanting to upload original images to the cloud.
- Users already in environments supporting Skills (like Cursor, Claude Code, Codex) who are willing to use local CLIs for repeatable pipelines.
Limitations & Notes
- rembg may download models on the first run. This does not contradict “daily offline use after installing dependencies.” The deployment environment needs to allow for disk space and a one-time internet connection.
- If there are no supported extensions in the input directory, it will exit with
No supported image files found.Unsupported formats will be skipped. - Background removal quality depends on the rembg model; GrabCut serves only as a fallback when rembg is unavailable.
- SkillHub Stats (based on scraped data): Rating 100000, Downloads 2207; The installation count shows 0 on the page, which is for store reference only and does not mean it is unusable locally.
Conclusion¶
image-studio consolidates background removal, background replacement, watermarking, and size cropping into a single local CLI suite. The Agent generates commands based on SKILL.md to run batch processing, making it suitable for image preprocessing steps with privacy and batch efficiency requirements.
- SkillHub Page: https://www.skillhub.cn/skills/user_3b76b7e2/image-studio-pro
- API Entry: https://api.skillhub.cn/user_3b76b7e2/image-studio-pro
- Installation Guide: https://skillhub.cn/install/skillhub.md