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★ 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
convertis installed, the script trims flat borders from the output. The final size can be smaller than the requested size. - Transparent backgrounds need
pngorwebp.
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
lowfor drafts and exploration, andmediumfor most final images. Usehighfor small or dense text, infographics, slides, close-up portraits, and identity-sensitive edits. Usexhighormaxonly whenhighdoes not meet a specific requirement. A higher level costs more time and money, and it does not always give a better result. - Size: use
1536x1024for diagrams, slides, and landscape scenes. Use1024x1536for posters, phone UI, and portraits. Use1024x1024for icons and logos.
Prompting guide (GPT Image 2.6)
These rules come from OpenAI's GPT Image 2.6 prompting guide.
- 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.
- 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.
- 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.
- 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.
- 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").
- 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".
- 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 highfor small text. - Constraints: write the exclusions: "no watermark", "no extra text", "no logos or trademarks".
- 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
Установить generate-img в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
от Anthropicautomate-this
Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
от GitHubfrom-the-other-side-vega
Patterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
от GitHubplantuml-ascii
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…
от GitHub