imagegen

Generate and edit images via the OpenAI Image API with a bundled CLI.

1|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/cdrguru/portable-agent-kit --skill imagegen-cdrguru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imagegen
Source: https://github.com/cdrguru/portable-agent-kit/tree/main/.codex/skills/imagegen
Command: npx skills add https://github.com/cdrguru/portable-agent-kit --skill imagegen-cdrguru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Generating and editing images for projects and campaigns is often manual, siloed, and time-consuming; this Skill automates image creation and in-image edits via the OpenAI Image API, delivering consistent outputs and repeatable results.

Core Features & Use Cases

  • Generate new images from prompts with deterministic outputs using the bundled CLI.
  • Edit existing images (inpainting, masking, background changes) using prompts and optional masks.
  • Batch generate or batch edit multiple images with structured prompts, prompt augmentation, and robust file handling for scalable workflows.
  • Downscale outputs for web use and manage output paths and formats to fit your pipeline.

Use cases include rapid UI assets, marketing visuals, game concept art, and website imagery, all produced with reproducible prompts and artifact handling.

Quick Start

Run the bundled CLI to generate or edit images from prompts.

Frequently Asked Questions about imagegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate OpenAI image generation for batch processing?

Automate OpenAI image generation by using a bundled CLI to process multiple structured prompts, validate inputs, and manage file I/O for scalable batch image workflows. It handles retries on transient errors to ensure consistent outputs.

Can I edit existing images and apply masks using the OpenAI Image API?

Yes, you can perform in-image edits like inpainting and background changes by supplying prompts and optional masks to the OpenAI Image API. The process validates inputs and manages output paths for repeatable results.

What's the best way to get deterministic image outputs from OpenAI prompts?

Achieve deterministic image outputs by running the bundled CLI with structured prompts, input validation, and consistent output paths. This ensures reproducible results for rapid UI assets and marketing visuals.

Does this image generation approach handle transient API errors automatically?

Yes, the workflow manages retries on transient errors during image generation and editing via the OpenAI Image API. This reduces manual workload and ensures robust file handling for downstream pipelines.

How do I downscale generated images for web pipelines?

Downscale generated images for web use by managing output paths and formats within the workflow. The process produces consistent outputs and handles file I/O to fit your downstream pipeline requirements.