| name | chatgpt-web-image |
| description | Generate fresh bitmap images through the user's logged-in ChatGPT web UI instead of image-generation APIs. Use when Codex needs to create or refresh PNG/JPEG assets, paper figures, carousel images, illustrations, or when adapting a repository that calls OpenAI/DALL-E/gpt-image APIs so the default image-generation path becomes ChatGPT web automation or a local Codex CLI invocation. Supports Codex app Chrome Browser Use and Codex CLI AppleScript/JXA workflows; default unspecified image requests to professional advanced quality with Pro strength 进阶 / composer 进阶专业. |
ChatGPT Web Image
Use the ChatGPT web UI as the default source for fresh raster image generation. Do not call image APIs for new bitmap assets unless the user explicitly overrides this workflow.
Core Rules
- Use a normal logged-in
https://chatgpt.com/ conversation, not temporary chat.
- Configure ChatGPT web to
Pro with strength 进阶; the accepted production signal is Pro • 进阶 or composer 进阶专业.
- Enable image creation through
创建图片 / 图片 when the UI exposes it. If the current UI only exposes Pro and 进阶专业 but returns a generated image in the assistant turn, record that exact observed state in the manifest.
- Never use
Instant, Thinking, or Pro standard strength for production image assets.
- Repeat preflight before every prompt. Do not rely on a previous prompt's settings.
- Save from the rendered page through DOM/canvas extraction or same-browser credentialed fetch. Treat direct
curl of signed image URLs as debugging only.
- If the user does not specify image style or quality, prompt for a professional advanced result: polished, publication-ready, coherent composition, clean visual hierarchy, high-resolution, and no unnecessary text.
- For exact labels, Chinese text, charts, or factual numbers, prefer deterministic local rendering or generate a text-safe background and overlay exact text locally.
Default prompt modifier when style/quality is unspecified:
Professional advanced quality, polished and publication-ready. Use a coherent composition, clean visual hierarchy, credible domain details, balanced lighting/color, and high-resolution rendering. Avoid unnecessary text, logos, watermarks, fake numbers, and UI chrome.
Runtime Choice
- In Codex app, use the Chrome Browser Use path. Read
references/app-chrome-browser-use.md before operating Chrome.
- In Codex CLI or terminal automation, use AppleScript/JXA with Chrome Apple Events enabled. Use
scripts/chatgpt_web_image_batch.jxa for prompt batches or scripts/save_latest_chatgpt_image.jxa to save the newest visible generated image.
- When a repository currently calls an image API, keep useful parser/OCR/layout/rendering stages and replace only the fresh bitmap generation boundary. Read
references/api-replacement.md.
- When the current process should delegate image generation to local Codex CLI, use
scripts/invoke_codex_image_skill.sh with a request file.
Artifact Layout
Prefer a run folder with prompt, image, and provenance files:
<run-dir>/
prompts/<image-id>.txt
images/<image-id>.png
images/<image-id>.json
chatgpt_web_generation_log.jsonl
chatgpt_web_generation_summary.json
For case work, put the run folder under cases/<case-id>/artifacts/<run-id>/. If a source project consumes the image directly, also archive the same accepted image and metadata in the provenance run folder.
CLI JXA Batch
Prepare one prompt file per image, then run from a session where Chrome has a logged-in normal ChatGPT tab:
osascript -l JavaScript scripts/chatgpt_web_image_batch.jxa <run-dir> all
osascript -l JavaScript scripts/chatgpt_web_image_batch.jxa <run-dir> fig_01,fig_02
Optional custom directories:
osascript -l JavaScript scripts/chatgpt_web_image_batch.jxa <run-dir> all <prompt-dir> <image-dir>
The batch script selects/validates Pro advanced image mode, submits each prompt, waits for a new generated image in the latest assistant turn, writes PNG files, and records JSON metadata.
To save the newest already-generated image from the active Chrome tab:
osascript -l JavaScript scripts/save_latest_chatgpt_image.jxa <image-id> <out.png>
Local Codex CLI Delegation
Use this when an existing codebase needs to call the local Codex CLI rather than embedding browser automation in-process:
scripts/invoke_codex_image_skill.sh <request-file> [workdir]
The request file should include: intended image ids, output/run directory, prompt or prompt-file paths, required aspect ratio/dimensions, where the final image must be copied, and any QA constraints. The wrapper calls codex exec -m gpt-5.5 -c 'model_reasoning_effort="xhigh"' and tells the new Codex run to use this skill folder.
Manifest Minimum
Every accepted image should record:
- image id and intended use;
- prompt path or full prompt;
- runtime path: Codex app Chrome Browser Use, Codex CLI AppleScript/JXA, or local Codex CLI delegation;
- preflight state: normal chat, Pro, 进阶 / 进阶专业, and image tool observation;
- output path, dimensions, file type, SHA256 hash, and ChatGPT conversation URL when available;
- QA status and any discarded attempts.
Invalid outputs from wrong model/strength/tool state must be discarded and regenerated after a clean preflight.