Media Tools
therichardngai-code/gpt-image-2-pro-max
Two CLI tools for image generation + vision analysis using goclaw's provider-chain pattern.
Generate or edit raster images by calling the ChatGPT/Codex hosted imagegeneration flow with local Codex or OpenClaw OAuth credentials, then save decoded image files for OpenClaw and other agent…
$ npx skills add darkamenosa/codex-imagen --skill codex-imagen -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install darkamenosa/codex-imagen codex-imagen --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
Claude Code skills documentation · loads skills from .claude/skills/
Install the "codex-imagen" agent skill from https://github.com/darkamenosa/codex-imagen/tree/main into .claude/skills/codex-imagen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-imagen", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add darkamenosa/codex-imagen --skill codex-imagen -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install darkamenosa/codex-imagen codex-imagen --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "codex-imagen" agent skill from https://github.com/darkamenosa/codex-imagen/tree/main into .agents/skills/codex-imagen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-imagen", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add darkamenosa/codex-imagen --skill codex-imagen -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install darkamenosa/codex-imagen codex-imagen --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "codex-imagen" agent skill from https://github.com/darkamenosa/codex-imagen/tree/main into .cursor/skills/codex-imagen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-imagen", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add darkamenosa/codex-imagen --skill codex-imagen -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install darkamenosa/codex-imagen codex-imagen --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "codex-imagen" agent skill from https://github.com/darkamenosa/codex-imagen/tree/main into .gemini/skills/codex-imagen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-imagen", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install darkamenosa/codex-imagen codex-imagenInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add darkamenosa/codex-imagen --skill codex-imagen -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "codex-imagen" agent skill from https://github.com/darkamenosa/codex-imagen/tree/main into .github/skills/codex-imagen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-imagen", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add darkamenosa/codex-imagen --skill codex-imagen -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install darkamenosa/codex-imagen codex-imagen --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "codex-imagen" agent skill from https://github.com/darkamenosa/codex-imagen/tree/main into .opencode/skills/codex-imagen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-imagen", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
codex-imagenGenerate or edit raster images by calling the ChatGPT/Codex hosted imagegeneration flow with local Codex or OpenClaw OAuth credentials, then save decoded image files for OpenClaw and other agent…
Codex Imagen is an agent skill from darkamenosa/codex-imagen. Generate or edit raster images by calling the ChatGPT/Codex hosted imagegeneration flow with local Codex or OpenClaw OAuth credentials, then save decoded image files for OpenClaw and other agent workflows.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including scripts (for example `.github/workflows/ci.yml`, `CHANGELOG.md` and `README.md`).
It sits in Media & Creative, covering Image generation and OAuth and OpenID Connect. It works with OpenAI. The repository describes itself as: Codex/OpenClaw skill for generating images with ChatGPT/Codex OAuth. The licence is MIT.
9 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d25daed. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (JavaScript), which the agent can run.
Shell commands in SKILL.md call:
nodecodexFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
chatgpt.comauth.openai.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
OPENAI_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Codex Imagen loads about 2.6k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 1,142 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from darkamenosa/codex-imagen at commit d25daed, republished under its MIT licence (© darkamenosa). 1,142 words, ~2,636 tokens.
.claude/skills/codex-imagen/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.Generate or edit images by calling the ChatGPT/Codex backend directly with OAuth credentials already stored on the machine. By default this follows Codex's current hosted image flow: POST /responses with the native image_generation tool. The standalone typed image endpoints can be probed with --backend images, but Codex source currently gates that path behind the under-development image-generation extension. It does not start codex app-server, does not need the Codex CLI binary, and does not require OPENAI_API_KEY.
Run the helper through Node for macOS, Linux, and Windows compatibility:
node {baseDir}/scripts/codex-imagen.mjs --timeout 300 'generate image follow this prompt, no refine: "a cinematic fantasy city at sunrise"'Normal generation prints one generated image path per line. Diagnostics and progress go to stderr.
Use --json when the caller needs machine-readable metadata:
node {baseDir}/scripts/codex-imagen.mjs --json --timeout 300 --prompt 'generate a small blue lotus icon'Ask for multiple outputs in the prompt. There is no --count flag:
node {baseDir}/scripts/codex-imagen.mjs --timeout 300 -o out/ --prompt 'generate 3 images of a monk mage'Use --verbose or --debug for request progress, raw Responses event names, and reference image details. Use --quiet when only stdout paths/JSON should be emitted.
The helper retries transient empty failures by default: network errors, HTTP 5xx responses, backend server_error / overloaded / unavailable responses, dropped/incomplete streams before any image is saved, and typed JSON responses without image data. Default is --retries 4, meaning 5 total attempts, matching Codex's request retry shape.
Retries are intentionally not used for usage errors, auth errors, policy/input errors, rate limits, generation timeouts, stream errors, or after an image has already been saved. If streaming saves partial images and then times out, the helper returns those saved paths instead of starting a duplicate generation. If the hosted Responses stream terminates or closes before response.completed, already completed images remain saved but the command exits with a stream error, matching Codex turn semantics. The --timeout value applies per generation attempt, so an outer OpenClaw exec.timeout must budget for retries when retries are enabled.
Use --no-retry or --retries 0 when an outer caller owns retry behavior.
Use --timeout <seconds> for agent-facing calls. This intentionally matches OpenClaw's surrounding exec tool timeout value, which is also in seconds. For a 5 minute OpenClaw call, use --timeout 300.
--timeout-ms <milliseconds> remains available for compatibility and sub-second tests. Do not use --timeout-ms 300 when you mean 5 minutes; that is only 0.3 seconds. Use either --timeout, --timeout-seconds, or --timeout-ms, not more than one in the same command.
Image generation can be slow, especially when the prompt asks for multiple images. For chat-facing OpenZalo/OpenClaw calls:
--timeout 300 for ordinary one-image requests.--timeout 600, or ask for 2 images when the conversation should return quickly.timed_out: true; this is a usable partial success, not a hang.--timeout value applies per generation attempt. If default retries are enabled, set the outer OpenClaw exec.timeout higher than the helper timeout budget, or reduce retries with --retries 1 / --no-retry.The CLI reads existing OAuth JSON and sends Authorization: Bearer <access>, ChatGPT-Account-Id, originator: codex_cli_rs, Codex-style request metadata, and a Codex-style user agent to https://chatgpt.com/backend-api/codex/responses by default.
The Responses model defaults to gpt-6-luna; the Images backend defaults to gpt-image-2.
originator: codex_cli_rs
version: 0.156.1
user-agent: codex_cli_rs/0.156.1 (<OS> <release>; <arch>) unknownOS, release, and architecture are detected locally. CODEX_IMAGEN_CODEX_VERSION overrides the version in both headers. The installed Codex CLI and terminal environment do not change these defaults.
Run a local auth check without generating:
node {baseDir}/scripts/codex-imagen.mjs --smokeAuth lookup order:
--authCODEX_IMAGEN_AUTH_JSON, OPENCLAW_CODEX_AUTH_JSON, CODEX_AUTH_JSONOPENCLAW_AGENT_DIR/auth-profiles.json or PI_CODING_AGENT_DIR/auth-profiles.jsonOPENCLAW_AGENT_DIR/auth.json or PI_CODING_AGENT_DIR/auth.json~/.openclaw/agents/main/agent/auth-profiles.json~/.openclaw/agents/main/agent/auth.json~/.openclaw/credentials/oauth.jsonCODEX_HOME/auth.json~/.codex/auth.jsonFor OpenClaw, the current auth store is usually:
~/.openclaw/agents/main/agent/auth-profiles.jsonCodex CLI is not required at runtime. The skill works with OAuth created by OpenClaw itself, for example openclaw onboard --auth-choice openai-codex or openclaw models auth login --provider openai-codex. It only needs an existing openai-codex OAuth profile; it does not perform the first browser login itself.
Profile selection follows OpenClaw first: explicit --auth-profile, CODEX_IMAGEN_AUTH_PROFILE / OPENCLAW_AUTH_PROFILE, OpenClaw config auth.order.openai-codex or configured auth.profiles, then sibling auth-state.json lastGood.openai-codex. Pass --auth-profile openai-codex:<id> when a specific OpenClaw profile should be used.
Use --out-dir or -o/--output when the caller needs a specific artifact location:
node {baseDir}/scripts/codex-imagen.mjs --out-dir ./openclaw-images --prompt 'generate three UI icon variants'
node {baseDir}/scripts/codex-imagen.mjs -o out/ --prompt 'generate 3 images of a monk mage'--output image.png writes exactly that path for one image. If multiple images arrive, outputs are numbered as image-1.png, image-2.png, and so on. If --output has no extension or ends in /, it is treated as a directory. Without --output, automatic names use codex-imagen-<timestamp>-<optional-index>-<image-call-id>.png.
When --out-dir is not set, the script chooses the first available location:
CODEX_IMAGEN_OUT_DIROPENCLAW_OUTPUT_DIROPENCLAW_AGENT_DIR/artifacts/codex-imagenOPENCLAW_STATE_DIR/artifacts/codex-imagen./codex-imagen-outputStreaming is enabled by default and saves each image as soon as it arrives. If a run times out after partial results, already received images remain saved and are printed. If the stream breaks before response.completed, already completed images remain saved but the command fails with a stream error. Use --timeout 300 for chat-facing OpenClaw calls unless the user explicitly asks for a longer run, or --no-stream to request a non-streaming Responses response.
Attach reference images explicitly. Do not use positional image paths; positional arguments are reserved for prompt text.
node {baseDir}/scripts/codex-imagen.mjs --input-ref ref1.png --input-ref ref2.jpg --prompt 'generate 3 images of him livestreaming in this world'
node {baseDir}/scripts/codex-imagen.mjs -i ref1.png -i ref2.jpg --prompt 'change the main character into a woman'
node {baseDir}/scripts/codex-imagen.mjs --image-url 'https://example.com/ref.png' --prompt 'use this image as the world reference'Local images are converted to data:image/...;base64,... and sent as Responses input_image items by default. --input-ref accepts local paths, http(s) URLs, and data:image/... URLs. -i/--image is local-only, and --image-url is URL/data-URL only. Supported local formats are PNG, JPEG, GIF, and WebP. Use --image-detail auto|low|high|original when the model should receive lower or higher image detail; default is high. Use smaller JPEG references when high-fidelity pixel detail is not needed.
The CLI refreshes expired or near-expiry OAuth tokens through https://auth.openai.com/oauth/token and writes the updated token back to the same auth file. The default OAuth refresh skew is 5 minutes, matching OpenClaw's OAuth usability margin. For OpenClaw auth-profiles.json, refresh uses OpenClaw-compatible cross-agent OAuth refresh locking, then locks the auth store before rereading and writing credentials. It also inherits a fresh matching profile from the main OpenClaw agent store when the current agent/workspace auth store is stale. This avoids refresh_token_reused races when multiple OpenClaw or agent processes share one openai-codex profile.
When auth is auto-discovered and the first auth file is irrecoverably stale, the CLI tries the next compatible auth source, such as CODEX_HOME/auth.json or ~/.codex/auth.json. Explicit --auth paths are not bypassed.
Use these controls when needed:
node {baseDir}/scripts/codex-imagen.mjs --refresh-only --json
node {baseDir}/scripts/codex-imagen.mjs --force-refresh --smoke --json
node {baseDir}/scripts/codex-imagen.mjs --no-refresh --prompt 'generate one image'For concurrent OpenClaw processes, prefer the active OpenClaw agent's auth-profiles.json so every caller uses the same profile identity. Use --no-refresh only when the caller already owns OAuth refresh and wants this helper to use the provided access token as-is.
Use --base-url only for a compatible Codex backend, and --refresh-url only for a compatible OAuth refresh endpoint.
The helper is plain Node.js 22+ with no native dependencies. It uses os.homedir() and environment overrides for Windows, Linux, and macOS. In cmd.exe, single quotes are not shell quotes; use double quotes or write UTF-8 text to a file and use:
node {baseDir}/scripts/codex-imagen.mjs --prompt-file prompt.txtUse --cwd <path> when another agent launches this script from an unpredictable working directory.
© darkamenosa, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 10 other files (scripts) in the repository root of darkamenosa/codex-imagen.
Open the folder on GitHubat commit d25daed
Codex Imagen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Codex Imagen this skilldarkamenosa/codex-imagen | 135 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Media Toolstherichardngai-code/gpt-image-2-pro-max | 101 | — | ~1.5k | Automated safety check: Notes | MIT | |
| Chatgpt CLIItamarZand88/CLI-Anything-WEB | 231 | — | ~781 | Automated safety check: Pass | MIT | |
| Fish Audio APIwaker240/FullVideoProductionSkill | 201 | — | ~1.1k | Automated safety check: Notes | Apache-2.0 | |
| Gpt Image Genninehills/skills | 280 | — | ~1.8k | Automated safety check: Notes | MIT | |
| Nano Banana Antigravitysundial-org/awesome-openclaw-skills | 663 | — | ~559 | Automated safety check: Pass | None |
therichardngai-code/gpt-image-2-pro-max
Two CLI tools for image generation + vision analysis using goclaw's provider-chain pattern.
ItamarZand88/CLI-Anything-WEB
Drives ChatGPT from the terminal via cli-web-chatgpt — ask questions, generate and download images, list and view conversations, browse models, and manage OpenAI SSO auth.
waker240/FullVideoProductionSkill
Generate narration with the public Fish Audio REST API using environment credentials and a user-selected voice.
ninehills/skills
生图 / 生成图片 / 画图 — 用 OpenAI gpt-image-2 生成图像。支持文生图、参考图生图 (img2img)、蒙版修补 (inpainting)。当用户要求用 GPT 画图、OpenAI 生图、gpt-image-2、文+图生图、参考图片生成、img2img、inpainting 时必加载此技能。Auth 自动继承 OPENAIAPIKEY / Codex OAuth…
sundial-org/awesome-openclaw-skills
Generate or edit images via Nano Banana Pro using Antigravity OAuth (no API key needed!)
yc-duan/api-image
Replaces Codex's built-in image tool with provider-based generation and editing, fetching reference images first whenever visual accuracy actually matters.
Works with
Categories
Generate or edit raster images by calling the ChatGPT/Codex hosted imagegeneration flow with local Codex or OpenClaw OAuth credentials, then save decoded image files for OpenClaw and other agent…. Codex Imagen is an agent skill from darkamenosa/codex-imagen. Generate or edit raster images by calling the ChatGPT/Codex hosted imagegeneration flow with local Codex or OpenClaw OAuth credentials, then save decoded image files for OpenClaw and other agent workflows.
Codex Imagen fits situations like: tasks that involve Image generation; tasks that involve OAuth and OpenID Connect.
Run `npx skills add darkamenosa/codex-imagen --skill codex-imagen -a claude-code`. Or copy the skill folder (the darkamenosa/codex-imagen repository) into .claude/skills/codex-imagen in your project. Claude Code loads it when a task matches its description.
Run `npx skills add darkamenosa/codex-imagen --skill codex-imagen -a codex`. Or copy the skill folder (the darkamenosa/codex-imagen repository) into .agents/skills/codex-imagen in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add darkamenosa/codex-imagen --skill codex-imagen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codex-imagen, .gemini/skills/codex-imagen, .github/skills/codex-imagen and .opencode/skills/codex-imagen in your project.
Going by SKILL.md and its folder, Codex Imagen needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node and codex) and credentials named OPENAI_API_KEY. Our summary lists: Node.js; A credential in OPENAI_API_KEY.
SKILL.md names 2 domains. In commands or code: chatgpt.com and auth.openai.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Codex Imagen is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Codex Imagen: Media Tools (therichardngai-code/gpt-image-2-pro-max, 101 stars), Chatgpt CLI (ItamarZand88/CLI-Anything-WEB, 231 stars), Fish Audio API (waker240/FullVideoProductionSkill, 201 stars) and Gpt Image Gen (ninehills/skills, 280 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
darkamenosa (a GitHub user) maintains it in darkamenosa/codex-imagen, which has 135 GitHub stars. The repository was last updated on September 23, 2026.
Source: darkamenosa/codex-imagen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.