image-generationlisted
Install: claude install-skill magnusrodseth/dotfiles
# Image Generation (OpenAI gpt-image-2)
Generate images from text or edit existing images using OpenAI's `gpt-image-2` model (ChatGPT Images 2.0). Runs `scripts/generate.py` with no third-party Python dependencies.
## Prerequisite
`OPENAI_API_KEY` must be exported in the shell. The user keeps it in `~/dotfiles/zsh/ignored/` (auto-sourced). If unset, the script exits with a clear error. To verify:
```bash
[ -n "$OPENAI_API_KEY" ] && echo ok || echo "set OPENAI_API_KEY first"
```
## Quick start (text-to-image)
```bash
~/.claude/skills/image-generation/scripts/generate.py \
"A minimalist watercolor of a fjord at dawn, soft blues" \
--size 1024x1024 --quality high
```
Writes `image_<timestamp>_1.png` to the current directory and prints the absolute path. The user expects you to print the path so they can open it.
## Quick start (image edit)
```bash
~/.claude/skills/image-generation/scripts/generate.py \
"Make the sky a vivid sunset" \
--edit-image ./photo.png \
--quality high
```
Multiple input images (up to 16) compose into a single output:
```bash
~/.claude/skills/image-generation/scripts/generate.py \
"Combine these into a product hero shot" \
--edit-image mug.png --edit-image background.png
```
## Workflow
1. **Flesh out the prompt.** Never pass the user's request verbatim. gpt-image-2 rewards specific, sensory prompts. Expand the brief into a richer prompt that names:
- subject and pose/action
- setting and time of day
- art style or mediu