Generate images using OpenAI's API. Use this skill when creating logos, illustrations, marketing assets, or any visual content that can be generated from text prompts.
From openai-image-gennpx claudepluginhub daviswhitehead/product-playbook-for-agentic-coding-plugin --plugin openai-image-genThis skill uses the workspace's default tool permissions.
references/alternative-providers.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
This skill enables Claude Code to generate images using OpenAI's image generation API, making it possible to create visual assets directly during development workflows.
Use image generation for:
Before using this skill, ensure:
npm install openai)If not already set up:
# Install dependency
npm install openai --save
# Create output directory
mkdir -p assets/generated
# Add to .gitignore
echo "assets/generated/*.png" >> .gitignore
echo "assets/generated/*.json" >> .gitignore
For a specific, well-defined need:
npx tsx scripts/gen-image.ts "Your detailed prompt here" --out descriptive-name.png
Generate multiple variations to explore directions:
# Generate variations with different styles
npx tsx scripts/gen-image.ts "Chef logo, minimalist line art" --out logo-v1-lineart.png
npx tsx scripts/gen-image.ts "Chef logo, bold geometric shapes" --out logo-v2-geometric.png
npx tsx scripts/gen-image.ts "Chef logo, hand-drawn sketch style" --out logo-v3-sketch.png
npx tsx scripts/gen-image.ts "Chef logo, negative space design" --out logo-v4-negative.png
Start broad, then refine:
# Round 1: Broad exploration
npx tsx scripts/gen-image.ts "Modern cooking app logo concepts"
# Round 2: Refine promising direction
npx tsx scripts/gen-image.ts "Minimalist chef hat logo, single line weight, friendly curves"
# Round 3: Final refinement
npx tsx scripts/gen-image.ts "Minimalist chef hat logo, single continuous line, slightly playful tilt, warm personality"
[Subject] + [Style] + [Details] + [Constraints]
Example:
"Chef hat with knife" + "minimalist line art" + "hand-drawn quality, organic lines" + "black on white, no text"
For Logos:
For Marketing:
For Consistency:
# Named colors
"...using warm orange and cream colors"
# Specific palette
"...color palette: deep navy (#1a365d), gold (#d69e2e), white"
# Monochrome
"...black linework on pure white background"
Generated files go to assets/generated/:
assets/generated/
├── 2024-01-15T10-30-45.png # Timestamped image
├── 2024-01-15T10-30-45.json # Metadata
├── logo-exploration-v1.png # Named image
├── logo-exploration-v1.json # Metadata
└── ...
Each image has a companion JSON with:
Use metadata to:
| Use Case | Recommended Size | Flag |
|---|---|---|
| Logo/Icon | 1024x1024 | (default) |
| Hero Banner | 1792x1024 | --size 1792x1024 |
| Portrait/Story | 1024x1792 | --size 1024x1792 |
| Social Square | 1024x1024 | (default) |
| Model | Best For | Notes |
|---|---|---|
| gpt-image-1 | General use, best instruction following | Default, recommended |
| dall-e-3 | Photorealistic, complex scenes | Higher quality, slower |
| dall-e-2 | Quick iterations, simpler needs | Faster, less detailed |
Prompt too literal:
Results too busy:
Wrong aspect ratio feel:
Inconsistent style:
logo-chef-hat-lineart-v2.png not image1.png"Minimalist logo mark: chef hat silhouette, single continuous line, friendly curves, black on white, no text"
"Modern badge logo: crossed kitchen utensils, circular frame, hand-drawn quality, two-tone design"
"Abstract logo: letter C formed by cooking flame, geometric, warm orange gradient, minimal"
"Hero illustration for cooking app: warm kitchen scene, morning light, fresh ingredients, editorial style, wide composition"
"Feature card: AI assistant concept, friendly robot character, flat illustration style, pastel colors, centered"
"Social media graphic: recipe of the day, overhead food photography style, natural lighting, square format"
"App icon: chef hat, simple flat design, rounded corners style, single color on gradient background"
"UI icon set: cooking utensils, consistent line weight, minimal style, monochrome"
This plugin focuses on OpenAI for simplicity. For specific use cases, other providers may be better:
| Use Case | Consider |
|---|---|
| Text-heavy logos | Ideogram, Recraft |
| Photorealism | BFL (FLUX), Stability AI |
| Fast iterations | FAL |
| Image editing | Clipdrop, Stability |
| Artistic/fantasy | Leonardo |
For multi-provider support with automatic fallback, see shipdeckai/claude-skills/image-gen.
Detailed comparison: references/alternative-providers.md
Remember: AI-generated images are starting points. Final brand assets should be refined and often recreated as vectors for production use.