Remove image backgrounds using Chompute's API, producing transparent PNG output. Use when the user asks to "remove background", "make background transparent", "extract subject from image", "cut out the background", "make a PNG with no background", or any task involving background removal from an image file or image URL. Do NOT use for general image editing, cropping, resizing, or format conversion.
How this skill is triggered — by the user, by Claude, or both
Slash command
/image-background-remover:chompute-bg-removerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Removes the background from an image and produces a transparent PNG.
Removes the background from an image and produces a transparent PNG.
This skill requires a Chompute Access Key. Check for the key in this order:
${user_config.chompute_api_key}CHOMPUTE_API_KEYCLAUDE_PLUGIN_OPTION_chompute_api_keyCLAUDE_PLUGIN_OPTION_CHOMPUTE_API_KEYchompute_key.txt in this skill's directory (same folder as this SKILL.md)If none of these exists or the value is empty, tell the user:
You need a Chompute Access Key. Sign up and get one at: https://chompute.ai/skills
Then configure the plugin's Chompute Access Key option, set
CHOMPUTE_API_KEY, or save your key to:<this skill's directory>/chompute_key.txt
Stop and do not continue without a valid Access Key.
If a valid key is present, use it without printing it and tell the user:
Valid Access Key present. Proceeding...
Read the input image attached or mentioned in the message. Do NOT automatically pick images from the folder. The image must be mentioned or attached by the user. The input may be either:
If there is no image attached, mentioned, or linked, tell the user the following and then stop:
Please attach, mention, or provide an image URL whose background you want removed.
Prepare the API input:
data:<MIME_TYPE>;base64,<BASE64_IMAGE> value in image_url.image_url without base64-encoding it yourself.Call the Chompute API using the contract below. Use whatever HTTP method is available in the environment (curl, python, node, etc.).
When constructing the request, use the first non-empty Access Key from the prerequisite list above.
If you write shell commands, prefer this safe export pattern:
PLUGIN_CHOMPUTE_ACCESS_KEY="${user_config.chompute_api_key}"
if [ -n "$PLUGIN_CHOMPUTE_ACCESS_KEY" ] && [ "$PLUGIN_CHOMPUTE_ACCESS_KEY" != '${user_config.chompute_api_key}' ]; then
export CHOMPUTE_API_KEY="$PLUGIN_CHOMPUTE_ACCESS_KEY"
else
export CHOMPUTE_API_KEY=${CHOMPUTE_API_KEY:-${CLAUDE_PLUGIN_OPTION_chompute_api_key:-${CLAUDE_PLUGIN_OPTION_CHOMPUTE_API_KEY:-$(tr -d '[:space:]' < "${CLAUDE_SKILL_DIR}/chompute_key.txt" 2>/dev/null)}}}
fi
Parse the response. On success, extract the output image base64 string and decode it to bytes.
<input_stem>_output.png
in the same directory as the input image file.<url_stem>_output.png.
If the URL does not contain a usable file name, use chompute_output.png.On error, show the error details to the user. If the API returns 401, tell the user their Access Key may be invalid or expired and direct them to https://chompute.ai to check their account.
POST https://chompute-services.dragonfruit.ai/openai/v1/responses
Content-Type: application/json
Authorization: Bearer <API_KEY>
Body:
{
"model": "apple_vision_bg_removal",
"input": [
{
"role": "user",
"content": [
{
"type": "input_image",
"image_url": "<IMAGE_SOURCE>"
}
]
}
]
}
Where <IMAGE_SOURCE> is either:
data:<MIME_TYPE>;base64,<BASE64_IMAGE> for a local file, orThe response JSON contains an output array. Find the object where
type is "image_generation_call" — its result field holds the
base64-encoded PNG output.
Example (truncated):
{
"output": [
{
"type": "image_generation_call",
"result": "iVBORw0KGgo..."
}
]
}
Decode the result value from base64 to get the PNG bytes.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub dragonfruit-ai/skills --plugin image-background-remover