task icon Task

Edit Image

Modify an existing image based on text instructions

Requirements

Path to source image. Modification description.

3
instruction icon If the user provided a source image path, use it. Otherwise, read uiGenerated Images to see available images in nanobanana/, list them, and ask which one to edit. You need the ABSOLUTE path to proceed.
6
instruction icon Tell the user where the edited image was saved. Offer further edits.
                  To run this task you must have the following required information:


Path to source image. Modification description.


If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).

Add all steps to your todo list now and begin executing.

## Steps

1. [Run Code: Verify Gemini Connection]: Call `run_script` with:

```json
{
  "file": {
    "path": https://sk.ills.app/code/media.gemini.verify/preview,
    "args": [

    ]
  },
  "packages": null
}
```

2. [Read Image Generator Rules]: Read the documentation in: `./skills/sauna//resources/context/media.image.rules.md` (Behavioral rules - fail fast, identify images first)

3. If the user provided a source image path, use it. Otherwise, read `./documents/nanobanana/*` to see available images in nanobanana/, list them, and ask which one to edit. You need the ABSOLUTE path to proceed.

4. [Read Image Prompting Guide]: Read the documentation in: `./skills/sauna//resources/context/media.image.prompts.md` (Edit prompt patterns)

5. [Gather Arguments: Generate or Edit Image] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `prompt`: the modification prompt describing what to change
- `imagePath`: absolute path to source image

6. [Run Code: Generate or Edit Image]: Call `run_script` with:

```json
{
  "file": {
    "path": https://sk.ills.app/code/media.image.generate/preview,
    "args": [
      "prompt",
      "imagePath"
    ]
  },
  "packages": null
}
```

7. Tell the user where the edited image was saved. Offer further edits.