remove-background-workflow
Skill3 starsChanged 12 days agoApache-2.0View on GitHub
Turns Ideogram's `remove_background` call into a guided workflow — resolve the source image, strip its background to a transparent PNG, save the result with its identifiers, and point to common follow-ups. Use when the user explicitly asks to "remove the background from this," "make this transparent," "cut out the subject," "isolate this on transparent," "strip the background," or "give me this on transparent/white/none." Only triggers on that kind of explicit request — it does not auto-run after `generate_image`, `edit_image`, or any other skill to proactively offer background removal.
In this repository16 other files it gives its agents.
- brand-identity-sheetSkill
- bulk-image-generation-workflowSkill
- character-model-sheetSkill
- collections-managementSkill
- concept-grid-generatorSkill
- custom-model-trainingSkill
- ideogram-promptSkill
- logo-promptingSkill
- marketing-ui-mockup-hero-generatorSkill
- moodboard-generatorSkill
- photographic-icon-set-generatorSkill
- reframe-image-workflowSkill
- seamless-pattern-texture-generatorSkill
- social-marketing-asset-generatorSkill
- upscale-image-workflowSkill
- world-builderSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Read references/background-removal-patterns.md before running step 2 of the workflow below.
- Very specific: line 41
Never pass both image_response_id and image_upload_id in the same call — exactly one of the two, based on which path above resolved the …
- Distinctive: line 63
After saving, mention these without executing them unless the user asks:
- Very specific: line 78
No resolvable source at all → ask the user to specify or attach an image.
- Very specific: line 90
After every successful removal, save the transparent PNG plus its source and output identifiers and the private flag used to the project's …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Remove Background Workflow
This skill orchestrates remove_background as its core call, pulling in upload_image,
get_recent_generations, and get_generation_status as supporting tools depending on how
the source image gets resolved. It's a thin orchestration workflow around a single MCP
call, not a prompt-composition skill — there's no composition-spec-format.md/
panel-anatomy.md-style reference here.
This skill handles exactly one image per invocation. If the user asks for several images at
once, run the workflow below once per image and report each result separately —
remove_background itself only accepts one source per call.
Before you start
Read references/background-removal-patterns.md before running step 2 of the workflow
below. It covers the single-source rule (why image_response_id and image_upload_id can
never both be set), the private/public default, and how to handle the running/pending
envelope some calls return instead of an immediate result.
Workflow
1. Resolve the source image
Figure out what the user means by "this image" before calling anything:
- A response from earlier this session — if the user is pointing at something just
generated or edited, pull the
response_idfromstructured_content.response_idson the priorgenerate_image/edit_image/etc. call. - A freshly attached local file — run the
upload_imageflow first to mint animage_upload_id: callupload_image(filename=...), run the returned curl command in the sandbox, and read the response'sidfield — notimage_url— as theimage_upload_id. - A vague reference ("the logo from earlier," "that last one") with no id yet in
context — call
get_recent_generationsand match by description and recency. If more than one plausible candidate exists, ask the user which one they mean rather than guessing.
Never pass both image_response_id and image_upload_id in the same call — exactly one of
the two, based on which path above resolved the source.
2. Run background removal
Call remove_background(image_response_id=... OR image_upload_id=..., private=...). Omit
private by default; only pass private=False if the user explicitly asks to publish the
result to the public Ideogram feed. Check the response for a running/pending status before
treating it as final — if present, poll via get_generation_status(request_id=...) the same
way a fresh generation is polled. See references/background-removal-patterns.md for why
this check exists and what was actually observed the first time this ran for real.
3. Save the output
Once the call completes, save the transparent PNG and record its identifiers — source
response_id/image_upload_id, output identifier, and the private flag used — to the
project's existing output location, the same folder brand-identity-sheet,
character-model-sheet, or moodboard-generator already save to for that project, per the
toolkit's "No Context Lost" habit. Confirm the file actually wrote before reporting success.
4. Note follow-ups
After saving, mention these without executing them unless the user asks:
- Compositing onto a new background via
edit_image(image_response_ids=[output_id], prompt="<new background description>")—remove_backgroundonly strips the background, it doesn't add one. - Reframing or upscaling the transparent result via
reframe_image/upscale_image, using the same output identifier. - Filing into a collection via
collections-management'sadd_images_to_collection, if that skill is already in use for the project — mention it as an option, don't call it automatically.
Error handling
- Ambiguous source (multiple plausible recent images match a vague reference) → ask the user which one, don't guess.
- No resolvable source at all → ask the user to specify or attach an image; don't call
remove_backgroundwith a guessed id. - Both id types would otherwise apply (a
response_idand animage_upload_idboth look plausible) → ask the user which one, never pass both. remove_backgroundcall fails → surface the actual error to the user verbatim and stop; no fallback to a different tool and no fabricated workaround.- Running/pending status never resolves after polling → report the stuck or failed state honestly, don't claim the output is ready.
- Save step fails → report the failure, don't claim the output was saved if it wasn't.
Save what you made
After every successful removal, save the transparent PNG plus its source and output
identifiers and the private flag used to the project's existing output location, rather
than leaving identifiers only in the conversation, per the toolkit's "No Context Lost"
habit.
Reference files
references/background-removal-patterns.md— the single-source rule, the private/public default, and how to handle the running-envelope response. Read before running step 2 of the workflow above.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

