Generate Image
Create an image from a text description
Requirements
Text description of the image. Optional: aspect ratio (1:1, 16:9, 9:16, 4:3), style (photorealistic, illustration, painting), mood/lighting preferences.
5
Help the user refine their description into a detailed prompt. Layer specificity: subject, style, lighting, composition.
7
Tell the user the image was saved and where. Offer to generate variations or make edits.
8
If the user specified style preferences (aspect ratio, style, mood, lighting) that differ
from defaults, ask: "Want me to remember these preferences for next time?"
If yes, save to Domain Preferences (domain: image_generation):
preferred_style: [photorealistic/illustration/etc]
preferred_aspect: [16:9/1:1/etc]
mood_preferences: [dramatic/soft/etc]
To run this task you must have the following required information:
> Text description of the image. Optional: aspect ratio (1:1, 16:9, 9:16, 4:3), style (photorealistic, illustration, painting), mood/lighting preferences.
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 CONSECUTIVE read steps in a row, read them all at once (in parallel). Otherwise, do not read a file until you reach that step.
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 Domain Preferences]: Discover relevant information in the user's filesystem at `documents/preferences/[domain].md`. (Check for saved style preferences (domain: image_generation))
3. [Read Image Generator Rules]: Read the documentation in: `skills/sauna/[skill_id]/references/media.image.rules.md` (Behavioral rules - fail fast, don't retry)
4. [Read Image Prompting Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/media.image.prompts.md` (How to craft effective prompts)
5. Help the user refine their description into a detailed prompt. Layer specificity: subject, style, lighting, composition.
6. [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 refined prompt
- `imagePath`: empty string—no source image for pure generation
- `outputDir`: documents/media/images/[category]/**/*
7. [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",
"outputDir"
]
},
"packages": null
}
```
8. Tell the user the image was saved and where. Offer to generate variations or make edits.
9. If the user specified style preferences (aspect ratio, style, mood, lighting) that differ
from defaults, ask: "Want me to remember these preferences for next time?"
If yes, save to `documents/preferences/[domain].md` (domain: image_generation):
preferred_style: [photorealistic/illustration/etc]
preferred_aspect: [16:9/1:1/etc]
mood_preferences: [dramatic/soft/etc]