home / skills / tara-shopos / shopos-prototype / image_editing

image_editing skill

/apps/api/src/skills/image_editing

This skill helps you edit images by applying user-specified changes such as background, color, or style modifications to uploaded images.

npx playbooks add skill tara-shopos/shopos-prototype --skill image_editing

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.7 KB
---
name: image_editing
description: Edit, modify, or enhance existing images using natural language instructions. Use this skill when the user wants to change colors, remove backgrounds, add objects, or modify the style of an image they have uploaded or generated.
license: Apache-2.0
metadata:
  version: "1.0"
  author: ShopOS
allowed-tools:
  - editImage
---

# Image Editing Skill

## When to use this skill
Use this skill when the user provides an image (or refers to a previous image) and asks to modify it. Common intents include:
- "Make the background blue"
- "Remove the background"
- "Add a shadow"
- "Change the shoe to red"
- "Make it look cinematic"

## Instructions
1.  **Identify the image**: Ensure you have the URL or ID of the image to be edited. If not provided, ask the user to upload or select one.
2.  **Analyze the request**: Determine the specific editing operation (mask-based edit, global style transfer, background removal).
3.  **Construct the tool call**:
    - Call the `editImage` tool.
    - `prompt`: A clear description of the desired output (e.g., "a red shoe on a white background").
    - `image`: The source image data or URL.
    - `mask_description`: If editing a specific part, describe what to mask (e.g., "the shoe").

## Examples

### Input
> User: "Change the background to a sunny beach" (attached image of a bottle)

### Execution
- **Tool**: `editImage`
- **Arguments**:
  - `prompt`: "bottle on a sunny beach"
  - `image`: [Image Data]
  - `editType`: "background-replacement"

---

### Input
> User: "Make it a sketch"

### Execution
- **Tool**: `editImage`
- **Arguments**:
  - `prompt`: "sketch of the bottle"
  - `editType`: "style-transfer"

Overview

This skill edits, modifies, and enhances existing images using natural language instructions. It handles targeted changes like color swaps, background replacement, object addition/removal, and global style transfers. Use it when you have an image URL or upload and want precise, conversational edits.

How this skill works

Provide or reference the image to edit, then describe the desired change in plain language. The skill analyzes the request to choose an edit type (mask-based local edit, background replacement, or style transfer) and constructs a clear edit call with a prompt, the source image, and an optional mask description. The tool returns an updated image that reflects the requested modifications.

When to use it

  • User supplies an image and asks to change colors or materials (e.g., "make the shoes red")
  • Replace or remove a background (e.g., "put this subject on a beach")
  • Apply a global style or filter (e.g., "make it look like a sketch")
  • Remove or add objects and shadows (e.g., "erase the lamp" or "add a drop shadow")
  • Refine or iterate on a generated image with targeted adjustments

Best practices

  • Always include the image URL or upload; if missing, ask the user for the file or selection.
  • Describe the desired result clearly and include context (style, mood, colors, focal object).
  • Specify the edit target with concise mask descriptions when editing parts (e.g., "mask: the red jacket").
  • Prefer short, actionable prompts for edits and add reference examples or palettes when exact color/texture is important.
  • Confirm constraints like aspect ratio, resolution, or transparency needs before performing background edits.

Example use cases

  • Change the background of a product photo to white for e-commerce listings.
  • Make a portrait look cinematic with color grading and film grain.
  • Remove an unwanted object from a travel photo and fill the area naturally.
  • Convert a photo into a pencil sketch or watercolor painting style.
  • Swap a shoe color across multiple images for quick A/B visual testing.

FAQ

What image formats are supported?

Common web formats like JPEG, PNG, and transparent PNGs are supported; provide the image URL or upload the file.

How do I target only part of an image?

Specify a mask_description naming the part to edit (for example, "mask: the background" or "mask: left shoe"), and include any edges or tolerance guidance if needed.

Can I request multiple edits at once?

Yes — combine edits in one prompt (e.g., "change the shirt to blue and replace the background with a beach"), but clearer results often come from sequential, focused edits.