openai-image-generator

openai-image-generator is a skill for Claude Code, Codex from mkdev-me/agent-skills. It costs 18 tokens per session (581 once invoked), scanned A, original, MIT.

An image-generation tool that uses OpenAI’s gpt-image-2 model to create new images or edit existing ones with reference images.

In plain words
What is it for?
Use it for text-to-image generation, image editing or composition, custom output sizes, and low, medium, high, or automatic quality settings.
Why use it?
It gives coding agents a defined way to request images with chosen dimensions, quality, and output locations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is cd scripts && python3 -m venv venv && ./venv/bin/pip install -r requirements.txt.

Good fit Use it for text-to-image generation, image editing or composition, custom output sizes, and low, medium, high, or automatic quality settings.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mkdev-me/agent-skills
agentmods
npx agentmods add skills/mkdev-me/agent-skills/openai-image-generator

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openai-image-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/mkdev-me/agent-skills/openai-image-generator.svg)](https://agentmods.dev/skills/mkdev-me/agent-skills/openai-image-generator)
Your own site
<a href="https://agentmods.dev/skills/mkdev-me/agent-skills/openai-image-generator"><img src="https://agentmods.dev/badge/skills/mkdev-me/agent-skills/openai-image-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 581 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.00581
Opus 5 $0.00009 $0.00291
Sonnet 5 $0.00004 $0.00116
Haiku 4.5 $0.00002 $0.00058

Measured 8d ago against content hash b92b2f98b46d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

openai-image-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

openai-image-generator/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

openai-image-generator

Instructions

Use this skill to generate images using OpenAI's gpt-image-2 model. The skill supports:

  • Text-to-image generation from prompts (images.generate)
  • Image editing / composition with one or more reference images (images.edit)
  • Size presets (square, landscape, portrait, 2K) or a raw WxH string
  • Quality levels (low / medium / high / auto)
  • Custom output paths

The API key should be set via the OPENAI_API_KEY environment variable.

Parameters

  • --prompt (required): The text prompt describing the image to generate
  • --output (required): Output file path for the generated image
  • --reference: Optional reference image path. Can be specified multiple times. When provided, the edits endpoint is used.
  • --size: Output size. Accepts a preset (square, landscape, portrait, 2K) or a raw WxH string (e.g. 1920x1080). Default: square (1024x1024).
  • --quality: low, medium, high, or auto (default: auto)

Size constraints for gpt-image-2: max edge 3840px, both edges multiples of 16, aspect ratio ≤ 3:1, total pixels between 655,360 and 8,294,400.

Examples

Basic text-to-image generation

./scripts/generate.py --prompt "A serene mountain landscape at sunset" --output images/landscape.png

With reference image(s) for editing / composition

./scripts/generate.py --prompt "Same character but wearing a party hat" --reference images/character.png --output images/party.png
./scripts/generate.py --prompt "Gift basket containing items from reference images" --reference a.png --reference b.png --output basket.png

Landscape, high quality

./scripts/generate.py --prompt "Cinematic cyberpunk skyline" --size landscape --quality high --output skyline.png

Custom raw size

./scripts/generate.py --prompt "Abstract banner" --size 1920x1088 --output banner.png

Setup

Before first use, set up the virtual environment:

cd scripts && python3 -m venv venv && ./venv/bin/pip install -r requirements.txt

Read the full file on GitHub · 66 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 66 lines · 18 tokens per session scan A b92b2f98b46d

Subscribe to this mod's changes

openai-image-generator is a skill published in the GitHub repository mkdev-me/agent-skills (37 stars, last pushed 4mo ago), licensed MIT. It adds 18 tokens to every session and 581 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens