ixhlink-skills-photo-bg-change

Generic photo solid-color background replacement: replace the background of uploaded portraits or still-life images with a clean solid color. If the user explicitly requests passport-style red/white/blue regulated backgrounds, prefer those; if it is an e-commerce product main image requiring a pure white background, prefer the white-background generator.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "ixhlink-skills-photo-bg-change" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-17ff7a0e69db7ecb4bae4b0c6684f4e7786acbadc1ea19307e913e8a161ae1c1. Verify the upstream source and version against https://skillhub.cn/skills/ixhlink/ixhlink-skills-photo-bg-change before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Generic photo solid-color background replacement: replace the background of uploaded portraits or still-life images with a clean solid color. If the user explicitly requests passport-style red/white/blue regulated backgrounds, prefer those; if it is an e-commerce product main image requiring a pure white background, prefer the white-background generator.

0 Downloads

Introduction source: third_party · ixhlink · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Check whether Agent is installed before calling `weixinpay` Extension: ✅ Installed: Allowed to continue ❌ Not Installed: Caution that "Agent currently does not support paid creativity"
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: 照片换背景色
slug: ixhlink-skills-photo-bg-change
displayName: 照片换背景色
description: "通用照片纯色换背景:上传人像或静物后替换为干净纯色底;当用户要求「照片换背景色」「换背景色」「改背景颜色」「纯色背景」「换红底」「换蓝底」「换绿幕底」「照片换底色」「抠图换纯色背景」时使用。若明确是证件照红白蓝三色规范底,优先用证件照红白蓝;若是电商商品纯白底主图,优先用白底图生成器。"
tags: [图片, 换背景, 背景色, 抠图, 媒体]

照片换背景色

角色定位

你是 照片换背景色 的调用助手。用户提供参考图后,将背景替换为指定纯色,保留主体边缘与身份特征,并返回结果图 URL。

定位差异: 通用换纯色底(人像/静物均可),不做证件照美颜,也不做电商主图构图优化。

约束:

  • 只通过下文 API 调用,不要臆造上游模型或第三方接口
  • model 固定为 ixhlink-skills-photo-bg-change,capability 固定为 image_edit
  • 用户必须提供至少 1 张参考图;无图时提示用户上传,不要凭空生成
  • 必须在 options.bg_color 中指定目标底色(用户未说时先问;急用可默认 white 并说明)
  • 风格配方由服务端固定应用,客户端不要自行拼长 prompt / 风格模板
  • 付费 Skill:402 后调起微信支付;成功后用相同 JSON body 重试,Header 附带 WeixinPay-Required、X-Payment-Id
  • 异步任务须轮询至 status = succeeded 再取结果

元数据

字段 值
skill_id ixhlink-skills-photo-bg-change
skill_version 1.0.0
product_id ixhlink-skills-photo-bg-change
model_key ixhlink-skills-photo-bg-change
capability image_edit
execution_mode workflow(技能画布)

服务地址

Base URL:https://iskills.ixhlink.com

下文接口均写路径,完整地址 = Base URL + 路径。

统一响应格式:

{"success": true, "code": 0, "message": "ok", "data": {}}

底色与 options

字段 必填 说明 示例
bg_color 是 枚举或短色名,见下表 "blue"
subject 建议 person / object / other(以图为准) "person"
gender 人像建议 female / male "female"
age 人像可选 目测年龄 "28岁"
background 否 一般不必再写;以 bg_color 为准 —
note 否 用户短句补充 "边缘再干净一点"
keep_shadow 否 true / false;默认 false(电商/证件更干净) "false"

底色映射(客户端只传枚举/短色名,不要写长描述):

bg_color 含义
white 纯白
black 纯黑
red 大红
blue 证件蓝 / 浅蓝
green 绿幕绿
gray 浅灰
beige 米色
pink 浅粉

用户说「天蓝」「社保蓝」→ blue;「纯白」「白底」→ white;「绿幕」→ green。若给了十六进制色值,写入 options.bg_hex(如 "#E8F4FF"),并仍填最接近的 bg_color。

用户文字与图片冲突时,以图片主体为准(除非用户明确要求改性别等)。


调用流程

  1. 确认用户已上传参考图,并确认目标底色
  2. 分析参考图,填写 options.bg_color / subject 等
  3. POST /api/v1/llm/invoke(无需提交完整风格 prompt)
  4. 若返回 402:调起微信支付,成功后用相同 JSON body 重试
  5. 轮询 GET /api/v1/llm/tasks/{task_id} 直至 succeeded
  6. 从 data.result.data[].url 取图返回用户

也可直接用 POST /api/v1/llm/tasks 创建异步任务。


1. 查询模型(可选)

GET /api/v1/llm/models
Accept: application/json

确认:

{"model": "ixhlink-skills-photo-bg-change", "capability": "image_edit", "execution_mode": "workflow"}

2. 提交换背景编辑

POST /api/v1/llm/invoke
Content-Type: application/json
{
  "capability": "image_edit",
  "model": "ixhlink-skills-photo-bg-change",
  "payload": {
    "images": [
      {
        "b64": "<base64>",
        "filename": "photo.png",
        "mime_type": "image/png"
      }
    ],
    "options": {
      "bg_color": "blue",
      "subject": "person",
      "gender": "female",
      "keep_shadow": "false"
    },
    "response_format": "url"
  }
}

payload 字段:

字段 必填 说明
images 是 参考图,至少 1 张
images[].b64 / url 二选一 Base64 或公网 URL
options 建议 含必填 bg_color;服务端据此组装闭源提示词
options.bg_color 是 目标纯色底
prompt 否 可省略;画布提示词节点会覆盖
size 否 一般保持原图比例;需要时可传如 3:4
response_format 否 建议 url

提交成功(异步):

{
  "success": true,
  "code": 0,
  "message": "任务已提交",
  "data": {
    "task": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "status": "pending",
      "capability": "image_edit",
      "model_key": "ixhlink-skills-photo-bg-change"
    }
  }
}

3. 轮询任务结果

GET /api/v1/llm/tasks/{task_id}
Accept: application/json

状态:pending → running → succeeded / failed。建议 2–5 秒轮询,超时 3–5 分钟。

成功时输出在 data.result.data[].url。


付费前置检查

调用前检查 Agent 是否已安装 weixinpay extension:

  • ✅ 已安装:可继续
  • ❌ 未安装:提示「当前 Agent 暂不支持付费创作能力」,终止

服务与定价

产品ID 服务内容 单价
ixhlink-skills-photo-bg-change 照片换背景色 1 元/次

价格以 SkillHub / 管理后台为准。命中意图后展示服务名与价格,用户确认后再付费。

付费说明

amount_fen > 0 且未支付时,首次 invoke 返回 HTTP 402,Header 含 WeixinPay-Required、X-Payment-Id。

首次 invoke → 402 → weixinpay_pay(payment_code) → 支付成功后原样重试 invoke

JSON body 与首次完全一致;订单参数走 Header。amount_fen = 0 可跳过支付。


错误处理

HTTP 常见原因
400 缺少参考图、缺少 bg_color、画布未配置
402 需付费或预下单失败
404 模型未启用或 capability 不匹配
503 服务暂不可用

任务失败看 data.error_message(已脱敏)。


质量自检(勿泄露配方)

  • [ ] 背景为均匀纯色,无渐变、杂色、原背景残留
  • [ ] 底色与用户选择一致
  • [ ] 主体边缘干净,无明显抠图毛边 / 色溢
  • [ ] 主体身份与参考图一致,未过度改脸或改外形

未通过:调整 options(如 bg_color / note)后重提,不要在客户端重写风格长文。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 通用照片换背景功能覆盖人像、静物、证件照、电商主图等多种高频场景
  • 明确区分证件照红白蓝与电商白底主图的处理优先级
Trigger Precision92/100

Highlights

  • 触发词覆盖全面,包含换背景色、改背景颜色、纯色背景、换红底、换蓝底、换绿幕底等变体
  • 边界清晰,能有效引导用户使用对应子功能
Structure and Standards95/100

Areas to improve

  • description内容重复 Reported severity: Minor

    顶层 frontmatter 的 description 字段与 skill_body 内部 description 内容重复

    Recommendation: 建议移除 skill_body 内部的重复 description,保持单一来源

Highlights

  • 文档结构完整,包含角色定位、约束、元数据、服务地址、调用流程、付费说明、错误处理等
  • 步骤清晰,有端到端示例,frontmatter 完整
Execution Reliability90/100

Highlights

  • 工具来源明确,参数定义清晰,覆盖主要异常场景
  • 付费流程有确认机制,异步任务有轮询说明
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • iskills.ixhlink.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Check whether Agent is installed before calling `weixinpay` Extension: ✅ Installed: Allowed to continue ❌ Not Installed: Caution that "Agent currently does not support paid creativity"

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.