openai-image-gen · steipete — Claude Code skill: batch images and gallery
openai-image-gen — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode: calls the OpenAI Images API, renders a batch of images from structured prompts, and builds an HTML gallery.
MIT 1 installs ★ 7,554 updated 2026-10-20
npx skills add steipete/agent-scripts --skill openai-image-gen -a claude-codeWhat openai-image-gen does
The skill executes gen.py with Python 3, hits the OpenAI Images API, and writes output to ~/Projects/tmp/openai-image-gen-*/ when that path exists, falling back to ./tmp/.
Each run produces *.png files, a prompts.json mapping prompts to filenames, and an index.html thumbnail gallery. The flags --count, --model, --size, --quality, and --out-dir control batch size, model choice, resolution, and output location.
OPENAI_API_KEY must be set in the environment before the script runs.
What it helps with
- generate a batch of images from a single prompt
- compare how different prompt wordings affect output
- get an HTML gallery without writing markup by hand
- keep a prompt-to-file log in
prompts.jsonfor later processing - render at a custom resolution with the
--sizeflag
Example prompts for the agent
- Generate 16 images with model
gpt-image-1.5and open the gallery - Create 4 images for the prompt 'ultra-detailed studio photo of a lobster astronaut' and save to
./out/images - Run
gen.pywith--size 1536x1024 --quality highand show meindex.html
How to install openai-image-gen
1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill openai-image-gen -a claude-code2Manually: put the files in place
~/.claude/skills/openai-image-gen/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/openai-image-gen/
1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill openai-image-gen -a codex2Manually: put the files in place
.agents/skills/openai-image-gen/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill openai-image-gen -a cursor2Manually: put the files in place
.cursor/skills/openai-image-gen/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install steipete/agent-scripts skills/openai-image-gen2Manually: put the files in place
.github/skills/openai-image-gen/SKILL.md1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill openai-image-gen -a gemini-cli2Platform CLI
gemini skills install https://github.com/steipete/agent-scripts --path skills/openai-image-genManually: put the files in place
.devin/skills/openai-image-gen/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill openai-image-gen -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about openai-image-gen
How do I install openai-image-gen in Claude Code?
Run npx skills add steipete/agent-scripts --skill openai-image-gen -a claude-code. The skill file will then be available at ~/.claude/skills/openai-image-gen/SKILL.md.
What does openai-image-gen do?
It generates images through the OpenAI Images API — either from a prompt you supply or from structured prompts it builds itself — and outputs *.png files plus an index.html gallery.
What does openai-image-gen require to run?
Python 3 and the OPENAI_API_KEY environment variable. The gen.py script will not start without the key present.
Source text
SKILL.md · MIT
--- name: openai-image-gen description: "OpenAI Images API: batches, prompt sampler, gallery." --- # OpenAI Image Gen Generate a handful of “random but structured” prompts and render them via OpenAI Images API. ## Setup - Needs env: `OPENAI_API_KEY` ## Run From any directory (outputs to `~/Projects/tmp/...` when present; else `./tmp/...`): ```bash python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py open ~/Projects/tmp/openai-image-gen-*/index.html ``` Useful flags: ```bash python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py --count 16 --model gpt-image-1.5 python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py --prompt "ultra-detailed studio photo of a lobster astronaut" --count 4 python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py --size 1536x1024 --quality high --out-dir ./out/images ``` ## Output - `*.png` images - `prompts.json` (prompt ↔ file mapping) - `index.html` (thumbnail gallery)
© steipete · MIT · steipete/agent-scripts
Similar skills
All skills for AI and ML →openai-image-gen by other authors comes first.