Skip to content
Agentmart
Submit a tool

byted-kickart-saliency-segmenter

智能抠图SKILL:从图片文件自动抠图。触发条件:当用户提及智能抠图、图片抠图、抠图、主体分割、去背景、背景剔除、商品抠图等关键词,或识别到用户表达等价意图时,调用此SKILL执行抠图任务。

Skill by bytedanceOfficial

IndexedApache-2.0★ 473
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/bytedance-byted-kickart-saliency-segmenter

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

智能抠图SKILL:从图片文件自动抠图。触发条件:当用户提及智能抠图、图片抠图、抠图、主体分割、去背景、背景剔除、商品抠图等关键词,或识别到用户表达等价意图时,调用此SKILL执行抠图任务。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/byted-kickart-saliency-segmenter

What's inside

Skill name
byted-kickart-saliency-segmenter
Description
智能抠图SKILL:从图片文件自动抠图。触发条件:当用户提及智能抠图、图片抠图、抠图、主体分割、去背景、背景剔除、商品抠图等关键词,或识别到用户表达等价意图时,调用此SKILL执行抠图任务。
License
Apache-2.0
Instructions
274 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network

Agent Skills spec issues

  • body: contains an absolute path from the author's machine

Files (18)

  • LICENSE
  • SKILL.md
  • __init__.py · scripts/core/
  • client.py · scripts/core/api/iccp/
  • service.py · scripts/core/api/iccp/
  • chunks.py · scripts/core/api/meida/
  • media.py · scripts/core/api/meida/
  • __init__.py · scripts/core/auth/
  • strategy.py · scripts/core/auth/
  • extractor.py · scripts/core/utils/
  • hash.py · scripts/core/utils/
  • matriel.py · scripts/core/utils/
  • validator.py · scripts/core/utils/
  • plan.py · scripts/
  • requirements.txt · scripts/
  • segment.py · scripts/
  • upgrade.py · scripts/
  • upload.py · scripts/

SKILL.md (first lines)

# 智能抠图SKILL

## 📋 工具说明

### 核心功能
从指定的图片文件抠图。

### 可用命令
| 命令 | 功能 | 说明 |
|------|------|------|
| `python3.12 ./scripts/plan.py` | 套餐查询 | 查询用户当前的 Ark Claw 套餐 |
| `python3.12 ./scripts/upload.py --file <图片路径>` | 图片上传 | 上传本地图片文件获取媒资ID |
| `python3.12 ./scripts/segment.py --media-ids <媒资ID列表>` | 批量图片抠图 | 支持多张图片并发抠图,多个媒资ID用逗号分隔 |

---

## 🚨 强制前置校验流程(必须按顺序执行,任意不通过直接终止流程)
所有用户请求必须先完成以下3步校验,不得跳过:

### 1. 火山鉴权校验
- 执行环境变量检查命令:
  ```bash
  echo "ACCESS_KEY_ID: $ACCESS_KEY_ID" && echo "SECRET_ACCESS_KEY: $SECRET_ACCESS_KEY"
  ```
- 判断鉴权结果:
  - **鉴权通过**:`ACCESS_KEY_ID` 和 `SECRET_ACCESS_KEY` 均为非空值 → 鉴权通过
  - **鉴权不通过**:执行以下引导方案

#### ❌ 鉴权未配置时的引导方案
1. 引导用户直接在聊天中发送ACCESS_KEY_ID/SECRET_ACCESS_KEY内容:
   > 请你提供火山账号AK&SK,用于检查火山创作Agent是否已开通套餐和有可用的创点
2. 收到用户发送的ACCESS_KEY_ID/SECRET_ACCESS_KEY后,执行配置命令:
   ```bash
   export ACCESS_KEY_ID=用户提供的ACCESS_KEY_ID值
   export SECRET_ACCESS_KEY=用户提供的SECRET_ACCESS_KEY值
   ```
3. 配置完成后告知用户:
   > 已完成AK&SK临时配置,当前配置仅在本次会话生效,不会持久化存储,请放心使用
4. 后续所有相关脚本执行时,均会自动通过`export`指定这两个环境变量,确保鉴权正常,无需用户重复配置

### 2. 套餐有效性校验
- **步骤1:Python版本校验**
  ```bash
  python3.12 --version || (echo "❌ Python 3.12+ 未安装,请先安装Python 3.12" && exit 1)
  ```
- **步骤2:依赖包安装校验**
  ```bash
  python3.12 -m pip install -r ./scripts/requirements.txt
  ```
- **步骤3:执行套餐查询命令**
  ```bash
  python3.12 -m ./scripts/plan.py
  ```
- **步骤4:结果处理逻辑**
  - ✅ **套餐有效**:返回结果中的 `message` 字段为有效截止时间(北京时间),校验通过
  - ❌ **套餐已过期**:`message` 小于等于当前时间,引导用户开通套餐,终止流程
  - ❌ **接口调用错误**:参考「错误处理规范」匹配错误码,向用户明确告知错误原因和解决方案,并且终止流程

### 3. 技能版本校验
- **步骤1:执行版本检查命令**
  ```bash
  python3.12 -m ./scripts/upgrade.py
  ```
- **步骤2:解析返回结果**
  返回格式示例:
  ```json
  {"code":"0","message":"success","data":"{\"install_command\":\"\",\"latest_version\":\"1.0.0\",\"latest_version_number\":100000000,\"update_message\":\"\"}"}
  ```
  - `latest_version`:最新版本号(如 "1.0.0")
  - `install_command`:新版本安装指令
- **步骤3:版本对比逻辑**
  - ✅ **当前版本 >= 最新版本**:版本校验通过,继续后续流程
  - ⚠️ **当前版本 < 最新版本**:执行以下更新询问流程
    1. 询问用户是否更新到最新版本:
       > 检测到技能有新版本 {latest_version},是否更新?(是/否)
    2. 用户确认更新(是):执行 `install_command` 安装新版本
    3. 用户不更新(否):跳过更新,继续后续流程

---

## 🛠️ 图片抠图执行流程

### 完整流程概览
```
用户请求 → 强制前置校验 → 用户提供图片 → 图片抠图 → 结果返回
```

### 前置准备
1. 确保输出目录存在:`mkdir -p /tmp/openclaw/byted-kickart-saliency-segmenter/output`
2. 生成唯一输出文件名:`segment_<timestamp>_<random>.json`

### 执行步骤
1. **步骤0:强制前置校验**(必须按顺序执行,任意不通过直接终止流程)
   - 执行「🚨 强制前置校验流程」中的所有校验步骤
   - ✅ 火山鉴权校验通过
   - ✅ 套餐有效性校验通过
   - ✅ 技能版本校验通过
   - 只有全部校验通过后,才能进入下一步

2. **步骤1:图片上传引导**
   - 询问用户:「请先提供要智能抠图的图片:可以发我图片tos链接,或上传 JPEG/PNG/WEBP 文件(≤8MB),也可以上传包含图片的ZIP压缩包,支持多张图片批量处理」
   - 支持三种上传方式:
     - **本地文件**:直接提供本地图片文件的绝对路径(如 `/Users/user/image1.jpg,/Users/user/image2.jpg`)
     - **公网URL**:提供可直接访问的图片链接(如 `https://example.com/image1.jpg,https://example.com/image2.jpg`)
     - **ZIP压缩包**:提供包含图片的ZIP文件路径或URL(如 `/Users/user/images.zip`)
   - 支持批量上传,多个文件路径或URL用逗号分隔

3. **步骤2:图片预处理**
   - **判断文件类型**:检查用户提供的是图片文件、图片列表还是ZIP压缩包
   - **ZIP解压处理**(如果是ZIP文件):
     ```bash
     mkdir -p /tmp/openclaw/byted-kickart-saliency-segmenter/input
     unzip -o "<ZIP文件路径>" -d /tmp/openclaw/byted-kickart-saliency-segmenter/input/extracted/
     ```
   - **图片下载处理**(如果是公网URL):
     ```bash
     mkdir -p /tmp/openclaw/byted-kickart-saliency-segmenter/input
     curl -L -o /tmp/openclaw/byted-kickart-saliency-segmenter/input/downloaded_image_<index>.jpg "<图片URL>"
     ```

From bytedance/agentkit-samples, Apache-2.0.

More from bytedance/agentkit-samples

Signals

Stars
473
Forks
101
Open issues
14
Last commit (this folder)
Aug 3, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from bytedance

Cite this page

byted-kickart-saliency-segmenter skill. Agent Mart. https://agentmart.dev/skills/bytedance-byted-kickart-saliency-segmenter (last updated 2026-10-24)