# Imagegen

> Use when the user wants to generate, edit, or batch-produce images via the OpenAI Image API; prefer the bundled `scripts/image_gen.py`, require `OPENAI_API_KEY`, and make the generate-vs-edit intent explicit before running.

- Skill: `hebertzhu/imagegen` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add hebertzhu/imagegen`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hebertzhu/imagegen/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: hebertzhu (https://skillmd.com/u/hebertzhu)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hebertzhu/imagegen

---


# Image Generation

## Intent
- Use for generating new images, editing existing images, inpainting, background work, and batch image production.

## Default operating pattern
1. Decide whether the request is generate, edit, or batch before choosing flags or output paths.
2. Collect the concrete constraints up front: prompt, exact text, required style, invariants, avoid list, and any input images or masks.
3. Prefer the bundled `scripts/image_gen.py` so runs stay reproducible and easy to rerun.
4. For edit flows, explicitly list what must stay unchanged so the output does not drift away from the source asset.
5. Validate the result against the user's actual use case, then iterate with one targeted change at a time.

## Bundled helper
- `scripts/image_gen.py` handles OpenAI Image API generation, edits, and batches.

## Pack fit
- Included in: `docs-media`
- Best for teams that want reusable media generation workflows rather than one-off prompts.

## Boundary
- Do not ask the user to paste `OPENAI_API_KEY` into chat; ask them to set it locally.
- Do not invent new creative requirements that were not requested or clearly implied.

