Install
openclaw skills install @pictechai/myxz-rmbg-skill妙言小智 (PicTech.cc) 专业级跨境电商图片抠图/白底图工具。使用本 skill 处理图片去背景、透明底图、白底图、纯色背景图、本地图片、网络图片、文件夹图片和批量抠图任务。
openclaw skills install @pictechai/myxz-rmbg-skill妙言小智官方网站: https://www.pictech.cc
妙言小智 API 服务: https://stableai.com.cn
VK(APP KEY) 获取地址: https://www.pictech.cc/newpictech/skills/openclaw-image-translation-skill
当用户请求抠图、去背景、移除背景、透明底图、白底图、纯色背景图、商品图背景处理或批量图片去背景时,使用本 skill。
不要自己手写抠图逻辑。不要直接在回复中调用 RMBG API。应调用本 skill 目录下 index.js 的默认导出函数 run(params)。
调用同目录下的 index.js:
import run from './index.js';
const result = await run({
input: '图片路径、图片URL、文件夹路径,或它们组成的数组',
saveDir: '可选的保存目录',
backgroundColor: '可选,用户要求白底时传 "#ffffff"',
vk: '可选,优先使用用户配置或环境变量 RMBG_VK'
});
最小调用:
const result = await run({
input: '/path/to/image.jpg'
});
批量调用:
const result = await run({
input: [
'/path/to/1.jpg',
'/path/to/2.png',
'https://example.com/image.jpg'
],
saveDir: '/path/to/output'
});
白底图调用:
const result = await run({
input: '/path/to/image.jpg',
backgroundColor: '#ffffff'
});
黑底图调用:
const result = await run({
input: '/path/to/image.jpg',
backgroundColor: '#000000'
});
{
input: string | string[],
saveDir?: string,
backgroundColor?: string,
vk?: string,
config?: {
vk?: string
}
}
input 必填。支持本地图片路径、图片文件夹路径、图片 URL、逗号分隔的字符串,或由路径/URL 组成的数组。saveDir 可选。未提供时,结果保存到当前工作目录下的 myxz-result/bgremove-v2。backgroundColor 可选。用户没有明确要求纯色背景时不要传,默认输出透明背景 PNG。vk 或 config.vk 可选。如果环境变量 RMBG_VK 已存在,可以不传。backgroundColor。backgroundColor: '#ffffff'。backgroundColor: '#000000'。'#ff0000'。使用本 skill 处理:
不要使用本 skill 处理:
backgroundColor。index.js 的默认导出函数 run(params)。执行器返回:
{
success: boolean,
partialSuccess: boolean,
message: string,
error?: string,
data?: {
batchId: string,
saveDir: string,
total: number,
successCount: number,
failedCount: number,
backgroundColor: string,
results: Array<{
input: string,
fileName: string,
taskId: string,
resultUrl: string,
localPath: string,
cached: boolean
}>,
failures: Array<{
input: string,
fileName: string,
error: string
}>
}
}
success === true 表示至少有一张图片处理成功。partialSuccess === true 表示部分成功、部分失败。data.results 是成功结果列表。data.failures 是失败结果列表。data.saveDir 是本批次结果保存目录。data.results[].localPath 是本地结果文件路径。data.results[].resultUrl 是远程结果地址。data.results[].cached === true 表示结果来自本地缓存。success === false 时,应读取 error 或 message 说明失败原因。处理成功时,回复应包含:
data.saveDir。data.results[0].localPath。批量部分成功时,回复应包含:
全部失败时,回复应包含:
不要回复: