CommunityImagegithub.com

product-photo-cleanup

Cleans up product photos for a shop listing or ad: removes the background, puts the product on white or a flat colour, crops and resizes, and optionally places it in a new scene. Use when the user has product or object photos (PNG or JPEG) to tidy or prepare for a marketplace.

What is product-photo-cleanup?

product-photo-cleanup is a Claude Code agent skill that cleans up product photos for a shop listing or ad: removes the background, puts the product on white or a flat colour, crops and resizes, and optionally places it in a new scene. Use when the user has product or object photos (PNG or JPEG) to tidy or prepare for a marketplace.

Works with✓Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/JovenSoh/morigraph-skills/tree/HEAD/skills/product-photo-cleanup

Installed? Explore more Image skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Product photo cleanup

Connect morigraph first

This skill runs on the morigraph MCP server at https://morigraph.com/mcp. If its tools (for example morigraph:background_remove) are not available, connect it, then continue. Tools are written here as morigraph:<tool>; your host may show them under a slightly different prefix.

  • Claude Code: claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp
  • Codex: codex mcp add morigraph --url https://morigraph.com/mcp
  • Cursor: add {"mcpServers":{"morigraph":{"url":"https://morigraph.com/mcp"}}} to ~/.cursor/mcp.json
  • Any other host: add a remote (streamable HTTP) MCP server with that URL. Steps per app: https://morigraph.com/connect/?ref=skills

Only connect it when the user asks for this task or agrees. Never ask the user for a password or token: sign-in happens in their browser.

This needs a free morigraph account, because photos are saved to the user's Files. The first call opens a browser sign-in; if none appears, send the user to https://morigraph.com/connect/?ref=skills

Steps

  1. Get the photo into Files. If it is a local file, upload it with morigraph:files_upload (start, chunks in order, complete). Never invent image bytes: if you cannot read the file, ask the user to upload it in the morigraph dashboard.
  2. Remove the background with morigraph:background_remove: pass a request_key (a stable unique string; letters, digits and _ . : - only) and the source file as its file_id and revision. Leave background out for a transparent PNG, or set a flat colour as #RRGGBB (#FFFFFF for the white most marketplaces want). Photos can be up to 10 MiB and 4096 pixels a side. This step is free and never changes the original.
  3. Poll the returned job with morigraph:jobs_get until it finishes, then show the result.
  4. Crop and resize with morigraph:photo_edit (free). Its operations run in order, in pixels: a crop (x, y, width, height) that keeps the product centred, then a resize to the size the user's shop needs. If they did not say, ask which marketplace, and do not guess its pixel rules; ask or leave the size as is.
  5. Only if the user wants more than cleanup (a lifestyle scene, a restyle, an upscale), use morigraph:image_edit. It costs credits (0.4 to 8 per edit, the tool states the price): tell the user the cost and get a yes before calling it.
  6. Tell the user where the finished files are. Create a public link with morigraph:files_link only when they need to post the image somewhere, and say the link is public.

Rules

  • Keep the product itself unchanged: no altered colours, logos, labels or proportions unless the user asks. A listing photo must show what is sold.
  • Batch work: process one photo fully first, show it, then repeat the approved settings on the rest.
  • Reuse the same request_key on a retry; never resubmit a slow job under a new key.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Related Skills