openai-image-gen
Skill0 starsChanged 30 days agoMITView on GitHub
Generate and edit images through the OpenAI Images API using the global OPENAI_API_KEY. Use for OpenAI API 生图、改图, flare/sunburst model controls, consistent character views, or continuing an established OpenAI API image workflow. Does not select Gemini or replace an explicitly requested built-in image tool.
- Reads credentials
22 other projects use a version of this.
Adopted by
Most recently taken up by
- zkManuel0123/CodexClawtheir own version, first seen Nov 16, 2026
- metaspartan/cybaratheir own version, first seen Nov 15, 2026
- steipete/agent-scriptstheir own version, first seen Nov 14, 2026
- insight68/Skillstheir own version, first seen Nov 8, 2026
- luolin-ai/openclawWeComzhtheir own version, first seen Oct 8, 2026
- understudy-ai/understudytheir own version, first seen Oct 8, 2026
Used with
Projects with it also use sonos, healthcheck and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
emanueleieloSkillsonos
Control Sonos speakers: discover, play/pause, volume, grouping, favorites, and queue management via sonos CLI.
Also in 3 projects that use this
TermiX-officialSkillhealthcheck
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).
Also in 11 projects that use this
GoogleSkillgh-issues
Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
Also in 9 projects that use this
TermiX-officialSkillxurl
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
Also in 8 projects that use this
emanueleieloSkillwhatsapp
Send and read WhatsApp messages via the wacli CLI. Search chats, view history, send text and files to contacts or groups.
Also in 3 projects that use this
Other versions22 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 22
- steipete/agent-scripts★ 7.5ksame name
- linuxhsj/openclaw-zero-token★ 5.2ksame name
- Bitterbot-AI/bitterbot-desktop★ 2.5ksame name
- understudy-ai/understudy★ 461same name
- luolin-ai/openclawWeComzh★ 108same name
- TermiX-official/cryptoclaw★ 100same name
- seedprod/openclaw-prompts-and-skills★ 93same name
- emanueleielo/ciana-parrot★ 77same name
- metaspartan/cybara★ 38same name
- insight68/Skills★ 5same name
12 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- gemini-image-genSkill
- human-writing-craftSkill
- lyric-videoSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use the bundled script for the user's OpenAI API image workflow.
- Very specific: line 12
Use Python 3.9+ with openai installed.
- Very specific: line 40
Read OPENAI_API_KEY from the process environment only.
- Distinctive: line 48
Use an available configured key before asking the user to change setup.
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenAI Image Generation
Use the bundled script for the user's OpenAI API image workflow. It reads the global OPENAI_API_KEY, generates PNGs, and saves the exact prompt and request metadata alongside each image.
Run
Use Python 3.9+ with openai installed. If needed, create an isolated virtual environment and install scripts/requirements.txt; do not copy an existing virtual environment into the skill.
python <skill-path>/scripts/generate_image.py "图片描述"
python <skill-path>/scripts/generate_image.py --prompt-file /absolute/path/prompt.txt --size 1024x1024
python <skill-path>/scripts/generate_image.py "保持人物和服饰,转为严格侧面" --image /absolute/path/front.png --model sunburstDefaults: flare → gpt-image-2.6-flare, 1536×864 (16:9), medium quality, one PNG. sunburst resolves to gpt-image-2.6-sunburst. These aliases have no date suffix. An explicit complete model ID is passed through unchanged, including gpt-image-2.5-flare or gpt-image-2.5-sunburst when requested; do not silently upgrade a named model.
| Parameter | Behavior |
--model | flare (default), sunburst, or an exact model ID |
--size | Exact WIDTHxHEIGHT, or auto; default 1536x864 |
--quality | low, medium (default), high, xhigh, max, auto |
--complexity | Optional low, medium, high for GPT Image 2.6; separate from rendering quality |
-i, --image | One or more local reference paths; repeatable, up to 16 total |
--no-reference | Explicit text-only generation; cannot be combined with --image |
--prompt-file | Read the exact UTF-8 prompt from a file instead of the positional prompt |
--output-dir | Destination for this run; default ./openai-images/<timestamp>-<topic>/ |
--timeout | Per-request timeout in seconds; default 180 |
--max-retries | SDK retries; default 1, allowed 0–2; no additional retry loop |
--dry-run | Validate and print a request summary without a key, API call, or output files |
An output directory contains image.png, prompt.md, request.json, and result.json. Standard output is one JSON result with absolute paths. Progress goes to standard error. Existing output files are preserved; choose a new directory for another attempt. result.json reports the actual pixel dimensions and whether they match the request.
Credentials
Read OPENAI_API_KEY from the process environment only. The script has no key argument, .env loader, or credential file. Do not print environment contents, put a key in the prompt/command, or copy credentials into this repository.
On this user's macOS setup, the global key may only be loaded by interactive zsh. If the current process cannot see it, use the existing shell configuration without exposing its contents:
zsh -ic 'exec "$@"' openai-image-gen /absolute/path/to/python /absolute/path/to/skill/scripts/generate_image.py --prompt-file /absolute/path/prompt.txt --size 1024x1024Use an available configured key before asking the user to change setup. Report missing configuration without requesting the secret in chat. A restricted key needs the Images endpoint permission; a Models-list permission is unnecessary for generation. Do not require a models-list probe before every run.
Workflow
- Resolve the subject, exact visible text, requested aspect ratio/resolution, and whether reference images are allowed. Preserve explicit user choices. Use the common sizes below when mapping natural-language requests.
- Write a complete prompt. Keep constraints specific to this image. For clean artwork, distinguish smooth skin/fabric/shadow surfaces from intentional effects: use layered flowing light, water, volumetric dust and localized directional sparks rather than blanket grain or uniform particle scatter. Preserve rich effects when the user only wants cleaner surface textures. Do not impose this look when the user requests grain or textured painting.
- Choose the operation deliberately: no
--imagemeansimages.generate(), while passing--imagemeansimages.edit(). When the user says “不要参考图 / 从头生成”, pass--no-reference; do not upload earlier outputs. For edits, state what may change and what must remain fixed. Read references/multiview.md only for character turnaround/modeling views. - Run once with the selected model. The CLI makes at most the configured retries. If it still fails, report the sanitized error and completed outputs. Do not stack repeated retries, regenerate successful views, or change model/provider silently. A timeout may have reached the server; check for saved output before another attempt.
- Inspect the actual saved image, including requested text, hands/feet, angle and visual consistency. Check actual dimensions in
result.json. Correct a demonstrated issue within the user's scope, with a focused prompt. Retain prior versions. The script never resizes an image to conceal a size mismatch. - Show the result inline with an absolute image path and link the output folder or image. Report the API model and whether it was generated from text or edited with references. Provide the saved prompt. For a set, deliver all separate PNGs with clear view names; a contact sheet and ZIP are useful companions.
Common sizes
The pixel dimensions are authoritative; map the user's ratio and resolution together.
| Request | Size |
| Default 16:9 | 1536x864 |
| 1K, 1:1 | 1024x1024 |
| 2K, 16:9 / 9:16 | 2048x1152 / 1152x2048 |
| 2K, 3:4 / 4:3 | 1536x2048 / 2048x1536 |
| 2K, 1:1 | 2048x2048 |
| 4K, 16:9 / 9:16 | 3840x2160 / 2160x3840 |
The CLI validates the documented raster range used here: edges divisible by 16, longest edge at most 3840, ratio at most 3:1, and 655,360–8,294,400 total pixels. Do not silently substitute an invalid size. Other models may have different limits; verify official documentation before broadening the supported range.
Official OpenAI documentation
Defaults were checked on 2026-11-12. Preserve the user's explicit model, and consult these official sources when availability or parameters need verification:
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

