跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

image_gen

Generate images via OpenAI Images API (DALL-E 3, GPT-image). Use when: user asks to generate, create, draw, or design an image, illustration, logo, or artwork. NOT for: editing existing images, image format conversion, or screenshots.

ericwang915 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ericwang915/PythonClaw --skill image_gen

技能说明


name: image_gen description: "Generate images via OpenAI Images API (DALL-E 3, GPT-image). Use when: user asks to generate, create, draw, or design an image, illustration, logo, or artwork. NOT for: editing existing images, image format conversion, or screenshots." dependencies: requests metadata: emoji: "🖼️"

Image Generation

Generate images via the OpenAI Images API.

When to Use

✅ USE this skill when:

  • "Generate an image of a sunset over mountains"
  • "Create a logo for my project"
  • "Draw a cartoon cat wearing a hat"
  • "Design a banner for my blog"
  • "Make me an illustration of X"

When NOT to Use

❌ DON'T use this skill when:

  • Editing or modifying existing images → use image editing tools
  • Screenshot capture → use system screenshot tools
  • Image format conversion → use run_command with ImageMagick/Pillow
  • Web image search → use web_search tool

Setup

Requires an OpenAI API key with Images API access.

Configure in pythonclaw.json:

"skills": {
  "image_gen": {
    "apiKey": "sk-your-openai-key"
  }
}

Or set OPENAI_API_KEY environment variable.

Commands

Generate an image

python {skill_path}/generate.py "a serene mountain lake at sunset, watercolor style"

Options

# Specific model
python {skill_path}/generate.py "prompt" --model dall-e-3

# Size options
python {skill_path}/generate.py "prompt" --size 1792x1024

# Quality
python {skill_path}/generate.py "prompt" --quality hd

# Style (dall-e-3 only)
python {skill_path}/generate.py "prompt" --style vivid

# Output directory
python {skill_path}/generate.py "prompt" --output ./images/

Model-Specific Parameters

DALL-E 3:

  • Sizes: 1024x1024, 1792x1024, 1024x1792
  • Quality: standard, hd
  • Style: vivid, natural
  • Generates 1 image at a time

DALL-E 2:

  • Sizes: 256x256, 512x512, 1024x1024
  • Quality: standard only
  • Can generate multiple images

Notes

  • Output is saved as PNG files in the specified directory (default: current dir)
  • Each generation costs API credits (DALL-E 3 HD ~$0.08/image)
  • Prompts are sometimes rewritten by the API for safety
  • Use --style natural for more photographic results

Resources

FileDescription
generate.pyOpenAI Images API wrapper