ai-image-gen

Installation

$npx skills add OpenClaudia/openclaudia-skills --skill ai-image-gen

Summary

This skill allows an agent to generate images from text prompts using OpenAI GPT Image or Stability AI. Invoke it when a user requests image creation, illustration, artwork generation, or visual asset production from a written description.

SKILL.MD

AI Image Generation

Generate images from text prompts using OpenAI GPT Image (gpt-image-1) or Stability AI (SD 3.5 Large).

Tool Location

  • Script: ~/.agents/tools/generate-image.py
  • Env file: ~/.agents/tools/.env (contains OPENAI_API_KEY and STABILITY_API_KEY)

Quick Usage

Generate with OpenAI GPT Image (default)

python ~/.agents/tools/generate-image.py \
  --prompt "a sunset over mountains, oil painting style" \
  --output ./sunset.png

High quality

python ~/.agents/tools/generate-image.py \
  --prompt "modern logo design for a tech company" \
  --output ./logo.png \
  --size 1024x1024 \
  --quality high

Wide format (good for blog covers, banners)

python ~/.agents/tools/generate-image.py \
  --prompt "abstract digital art with blue tones" \
  --output ./banner.png \
  --size 1536x1024

Tall format (good for mobile, stories)

python ~/.agents/tools/generate-image.py \
  --prompt "portrait of a futuristic city" \
  --output ./city.png \
  --size 1024x1536

Transparent background (icons, logos)

python ~/.agents/tools/generate-image.py \
  --prompt "a minimalist cat icon, flat design" \
  --output ./icon.png \
  --background transparent

Generate with Stability AI (SD 3.5 Large)

python ~/.agents/tools/generate-image.py \
  --prompt "watercolor painting of a garden" \
  --output ./garden.png \
  --provider stability

CLI Options

OptionDescription
--prompt, -p(Required) Text prompt describing the desired image
--output, -o(Required) Output file path
--provideropenai (default) or stability
--sizeImage size for OpenAI: 1024x1024 (default), 1536x1024 (wide), 1024x1536 (tall)
--qualityOpenAI quality: low, medium (default), or high
--backgroundOpenAI background: auto (default), transparent, or opaque
--modelOverride model (default: gpt-image-1 for OpenAI, sd3.5-large for Stability)

Provider Comparison

FeatureOpenAI GPT ImageStability AI SD 3.5
Default modelgpt-image-1sd3.5-large
Prompt adherenceExcellentGood
Size options1024x1024, 1536x1024, 1024x15361024x1024
Quality optionslow, medium, highN/A
Transparent bgYesNo
StylePhotorealistic + artisticArtistic + photorealistic

Dependencies

  • requests (for API calls)

Install if needed:

pip install requests

Output

The script prints:

  • The provider and model used
  • The prompt (and revised prompt if applicable)
  • The saved file path