← ClaudeAtlas

image-generationlisted

Generate and edit images via OpenAI's gpt-image-2 (ChatGPT Images 2.0) API. Use when the user asks to "generate an image", "create an image", "make a picture of X", "draw X", "edit this image", "remove the background from this image", "extend this image", "regenerate this image with Y", or invokes /image-generation. Outputs PNG/JPEG/WebP files to disk. Requires OPENAI_API_KEY in the environment.
magnusrodseth/dotfiles · ★ 0 · AI & Automation · score 62
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