nityeshaga/claude-home-base/openai-imagegen

Claude Code and agent skill by nityeshaga/claude-home-base

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate and edit images using OpenAI's gpt-image-2 model — the highest-quality image generation model available (Arena #1 by +242 points). Use this skill when creating high-quality images, marketing assets, infographics, text-heavy graphics, multi-panel compositions, product mockups, UI mockups, or any image generation task where quality and text accuracy matter. Especially use this when the user needs accurate text in images, multilingual text rendering, character consistency across multiple images, or print-ready output. Triggers on requests like "generate an image", "create a graphic", "make a marketing asset", "design a logo", "create an infographic", or any image creation request.

Install

npx vskill@latest install nityeshaga/claude-home-base/openai-imagegen

SKILL.md

OpenAI Image Generation (gpt-image-2)

Generate and edit images using OpenAI's gpt-image-2 API — the highest-quality image model available as of April 2026.

Before You Start

  1. Check if OPENAI_API_KEY is set in the environment.
  1. If `OPENAI_API_KEY` is NOT available → use ChatGPT Prompt Mode. Instead of running scripts, output a ready-to-paste prompt the user can copy into ChatGPT. Follow these rules:
  • Output the full image generation prompt in a code block labeled "ChatGPT Prompt"
  • Apply all the prompting best practices from the Prompting Guide below — structure it as background → subject → details → constraints
  • Include recommended settings as a note: quality, size, aspect ratio
  • If the task involves editing, tell the user which image(s) to attach and what instruction to give
  • If the task involves multiple images (e.g., a series), give each prompt separately numbered
  1. If `OPENAI_API_KEY` IS available → use the scripts. Use the venv Python for all script invocations:
bash
SCRIPTS_DIR="${CLAUDE_PLUGIN_ROOT}/skills/openai-imagegen/scripts"
PYTHON="${SCRIPTS_DIR}/.venv/bin/python3"

If the venv doesn't exist yet, create it:

bash
python3.12 -m venv "${SCRIPTS_DIR}/.venv"
"${SCRIPTS_DIR}/.venv/bin/pip" install openai Pillow

Scripts

Use these scripts for all image generation tasks. Always invoke with $PYTHON:

generate_image.py — Create images from text

Use when: User wants to create a new image from a text description

bash
$PYTHON "${SCRIPTS_DIR}/generate_image.py" "prompt" output.png [--quality QUALITY] [--size SIZE] [--format FORMAT] [--preset PRESET] [--n COUNT]
edit_image.py — Modify existing images

Use when: User wants to edit an image, use reference images, or do inpainting with a mask

bash
# Edit with instruction
$PYTHON "${SCRIPTS_DIR}/edit_image.py" "instruction" output.png --image input.png [--quality QUALITY] [--size SIZE]
# Edit with mask (inpainting)
$PYTHON "${SCRIPTS_DIR}/edit_image.py" "instruction" output.png --image input.png --mask mask.png
# Compose from multiple reference images
$PYTHON "${SCRIPTS_DIR}/edit_image.py" "instruction" output.png --image ref1.png --image ref2.png

Script Options

OptionValuesDefault
--qualitylow (drafts, fast), medium (default, good balance), high (print-ready — only use when explicitly requested), automedium
--sizeAny WxH where both are multiples of 16, max edge 3840px, aspect ≤3:1. Or autoauto
--formatpng, jpeg, webppng
--compression0-100 (for jpeg/webp only)None
--n1-8 (number of images)1
--presetdraft, social, print, wide, portraitNone
Presets
PresetQualitySizeFormatBest for
draftlow1024x1024jpegQuick iterations, brainstorming
socialmedium1080x1080pngInstagram, social posts
printmedium2048x2048pngPrint materials, high-res assets
widemedium1920x1080pngPresentations, headers, banners
portraitmedium1080x1920pngStories, mobile, posters

Output

Images are saved to the specified output path. For Slack sharing, save to ~/work/ or /tmp/ and use the attach: prefix in your response:

Here's your image attach:/tmp/generated-image.png

When generating multiple images (--n > 1), files are saved as output_1.png, output_2.png, etc.

Prompting Guide

Forget old limitations

gpt-image-2 is a generational leap. It has native reasoning — it thinks about your prompt before drawing. Throw away every instinct from DALL-E, Midjourney, or Stable Diffusion about what AI image generation "can't do." This model:

  • Renders text perfectly — full paragraphs, menus, labels, code snippets, multilingual
  • Places elements exactly where you tell it to
  • Maintains character consistency across multi-panel outputs
  • Understands complex spatial layouts, infographics, data visualizations
  • Handles dense compositions with dozens of elements
  • Searches the web for reference before generating (in thinking mode)

Be as specific and ambitious as you want. Describe exactly what you see in your head. The more precise and detailed your vision, the better the output. Don't simplify for the model — it can handle it.

Prompt structure

Order your prompt for clarity:

  1. Format and dimensions — What is this? (poster, banner, infographic, comic, UI mockup)
  2. Layout — Exact placement of elements (top-left, centered, grid arrangement)
  3. Content — Every piece of text, every visual element, every icon
  4. Style — Colors (use hex codes), typography (font styles, weights, sizes), mood, aesthetic references
  5. Constraints — What to exclude, background treatment
Text in images

Just write the exact text you want. The model renders it accurately. For best results:

  • Put literal text in "quotes" in the prompt
  • Specify font characteristics: "bold sans-serif", "thin monospace", "elegant serif italic"
  • Specify placement: "centered at the top", "bottom-right corner", "along the left margin"
  • For complex layouts with multiple text blocks, describe each one with its position, size, and style
Be bold
  • Want a full restaurant menu with 30 items, prices, and descriptions? Ask for it.
  • Want an infographic with real data labels, axis markers, and a legend? Describe it.
  • Want a comic strip where the character looks identical in every panel? Just say so.
  • Want a magazine cover with a headline, subtitle, barcode, and pull quotes? Go for it.
Iteration

Default is medium quality — good enough for most uses at ~$0.05/image. Only bump to high when the user explicitly asks for print-ready or highest quality output. Use low for rapid iteration and brainstorming.

When to Use This vs Gemini

ScenarioUse
Highest quality, client-facing assetsOpenAI (this skill)
Accurate text in imagesOpenAI
Multi-panel with character consistencyOpenAI
Quick/cheap generation, explorationGemini
Speed-critical (1-3s generation)Gemini
4K outputGemini (pro model)
Budget-sensitive bulk generationGemini

Cost Reference

At 1024x1024:

  • Low: ~$0.006/image
  • Medium: ~$0.053/image
  • High: ~$0.211/image

Default quality is medium (~$0.05/image). Only use high when the user explicitly requests it.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/nityeshaga/claude-home-base/openai-imagegen/badge)](https://verified-skill.com/skills/nityeshaga/claude-home-base/openai-imagegen)

Something wrong with this skill or its page? Tell us.