remove-background
Installation
SKILL.md
Remove a background
Run this on the hosted Comfy Cloud connector (https://cloud.comfy.org/mcp). The user signs in with that connector's OAuth flow. There is no API key to collect in chat, and there is no local ComfyUI install to start.
The built-in remove-background prompt and the tool descriptions own the call arguments. Discover the current template and nodes. Do not pin a remover by a remembered class name.
What to do
- Ask for a source image if they have not attached one.
upload_fileit and use the returned name. search_templatesfor background removal or a transparent background. When one fits,get_template_schemaandrun_template.- If none fits,
search_nodesfor removal, matting, or segmentation, then build a short graph: the uploaded image in, the remover, and a save node that keeps transparency (a PNG or the alpha-capable format that node documents). Give every node a_meta.title. - To replace the background, composite the cutout over the new plate in the same graph, or run a second step after the cutout. Re-upload an output before using it as an input in a later job. The save directory and the load directory are not the same store.
- Wait with
wait_for_job, thenget_output. In chat, show the image or the signed URL. When a download command exists and this session has a shell, run it unchanged. Leave the signed query string as returned. - When they asked for a workflow they can reopen,
save_workflowand returnget_workflow_canvas_url. - When they ask for a different strength or model (another removal model, or a different mask threshold) and the change only touches inputs, rerun with
submit_workflow,from_prompt_idof the run being adjusted, andinput_overridesof only the changed inputs. Do not rebuild the workflow in that case. If the requested model needs a different node or connections, discover it withsearch_nodes, edit the workflow, and submit the edited workflow instead. Either way, do not re-upload the source. If you need the workflow or a node id, callget_job_statuswithinclude_workflow: trueon that prompt id first.
A job with no save node succeeds and returns nothing. Discovery does not spend generation credits. A generation needs an active Comfy Cloud subscription. If a run is refused, check get_billing_status and report what it says.