Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

generate-img

БесплатноЗапускает вложенные скриптыНе проверен

Generate or edit images with OpenAI GPT Image 2.6 (Sunburst/Flare) through a bundled bash script. Use when asked to "generate an image", "create an…

richin13от richin13★ 15 звёзд на GitHub

Об этом скилле

generate-img

Generate and edit images with scripts/generate-img.sh (relative to this skill directory). The script calls the OpenAI Images API, saves each image to disk, and prints the absolute path of each image on stdout (one per line). Logs go to stderr.

OPENAI_API_KEY is already set in the environment. Do not ask for it, and do not check or print it.

Usage

SCRIPT=<skill-dir>/scripts/generate-img.sh

# Generate
$SCRIPT "<prompt>"
$SCRIPT -s 1536x1024 -q high "<prompt>"          # landscape diagram with small text
$SCRIPT -b transparent "<prompt>"                 # logo / sticker / cutout (png or webp)
$SCRIPT -n 3 -q low "<prompt>"                     # 3 cheap drafts
$SCRIPT -o ./assets/hero.png "<prompt>"            # explicit output path (only when n=1)

# Edit (1 to 16 input images, uses /images/edits)
$SCRIPT -e photo.png "Change only the sky to sunset. Keep everything else the same."
$SCRIPT -e person.png -e jacket.png "Image 1: person. Image 2: jacket. Dress the person in the jacket..."
Flag Values Default
-m, --model gpt-image-2.6-sunburst (best quality, best edit precision), gpt-image-2.6-flare (faster, about gpt-image-2 quality) sunburst
-s, --size auto or WxH. Common: 1024x1024, 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160, 2160x3840 auto
-q, --quality low, medium, high, xhigh, max, auto medium
-b, --background auto, opaque, transparent auto
-n, --count 1 to 10 1
-f, --format png, jpeg, webp png
-o, --output file path (ignored when n>1) /tmp/openai_<ts>_<i>.<fmt>
-e, --edit input image path, can repeat none

Custom size rules: both edges are multiples of 16, max edge 3840, aspect ratio 3:1 or less, total pixels from 655,360 to 8,294,400. Sizes above 2560x1440 are experimental.

Notes:

  • A request can take up to 2 minutes. Use a long timeout on the bash call.
  • If ImageMagick convert is installed, the script trims flat borders from the output. The final size can be smaller than the requested size.
  • Transparent backgrounds need png or webp.

Choosing settings

  • Model: use Sunburst by default. Use Flare when speed matters more than quality (many drafts, quick ideation), or when Flare already gives an acceptable result for the same prompt.
  • Quality: use low for drafts and exploration, and medium for most final images. Use high for small or dense text, infographics, slides, close-up portraits, and identity-sensitive edits. Use xhigh or max only when high does not meet a specific requirement. A higher level costs more time and money, and it does not always give a better result.
  • Size: use 1536x1024 for diagrams, slides, and landscape scenes. Use 1024x1536 for posters, phone UI, and portraits. Use 1024x1024 for icons and logos.

Prompting guide (GPT Image 2.6)

These rules come from OpenAI's GPT Image 2.6 prompting guide.

  1. Define the result and its use. Name the deliverable (product photo, ad, infographic, UI mockup, slide, logo) and the audience. This sets the level of polish.
  2. Use a fixed order. Scene/background, then subject, then key details, then constraints. For complex requests, use short labeled sections or line breaks, not one long paragraph.
  3. Describe visible details. Name the medium (photo, watercolor, flat vector, 3D render), materials, textures, colors, and lighting. Mood words alone are weak. For wide, cinematic, low-light, rain, or neon scenes, also give scale, atmosphere, and color.
  4. Photorealism: write "photorealistic" or "real photograph" in the prompt. Describe the image as a candid shot taken in the moment, and ask for real texture (pores, wrinkles, worn fabric, imperfections). Lens or camera terms (35mm, 50mm, shallow depth of field) control the general look only, not exact optics. Do not use words that suggest studio polish if you want a natural result.
  5. Composition: give framing (close-up, wide, top-down), angle (eye-level, low-angle), and placement ("logo top-right", "subject centered, empty space on the left").
  6. People: give body framing, scale, gaze, and contact with objects. For example: "full body visible, feet included", "looking down at the open book, not at the camera", "hands gripping the handlebars".
  7. Exact text: put the literal text in "quotes" or ALL CAPS. Give font style, size, color, and position. Say how many times the text appears ("render the tagline exactly once"). Spell unusual words or brand names letter by letter. Add "no extra text". Use -q high for small text.
  8. Constraints: write the exclusions: "no watermark", "no extra text", "no logos or trademarks".
  9. Edits: separate what changes from what stays. Write "Change only X. Keep everything else the same." Then list what to keep: identity, face, pose, geometry, layout, lighting, camera angle, labels, colors. For small l
Полный SKILL.md на GitHub

Установить generate-img в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/generate-img.sh

FAQ

Что делает скилл generate-img?

Generate or edit images with OpenAI GPT Image 2.6 (Sunburst/Flare) through a bundled bash script. Use when asked to "generate an image", "create an illustration/diagram/logo/mockup", "edit this image", "remove the background", or to produce any visual asset. The model is quite capable as long as the specification is clear.

Как установить скилл generate-img?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл generate-img запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить generate-img с