AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Codex Imagegen

skill-vallykrie-swarmgpt-codex-imagegen · by Vallykrie

Use when the user asks to generate, create, draw, edit, or restyle an image, or when a task needs image assets — logos, icons, illustrations, hero images, textures, photos, placeholder art, social/OG cards. Most coding agents cannot produce raster images; a Codex session via the `codex` CLI has a built-in imagegen tool that can. Trigger words include "generate an image", "make a picture/logo/icon…

No reviews yet
0 installs
21 views
0.0% view→install

Install

$ agentstack add skill-vallykrie-swarmgpt-codex-imagegen

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-vallykrie-swarmgpt-codex-imagegen)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Codex Imagegen? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

codex-imagegen

You cannot produce raster images. codex exec sessions can: the Codex CLI exposes a built-in image_gen.imagegen tool that generates and edits images using the user's existing ChatGPT authentication. No API key is required and no OPENAI_API_KEY is used — this runs on the plan the user already signed into with codex login.

Your job: turn the request into a precise image prompt, dispatch it, verify the file that comes back, and deliver it.

Step 0 — Preflight

  1. command -v codex — if missing, stop and tell the user to install the

Codex CLI (npm install -g @openai/codex) and run codex login.

  1. Locate dispatch.sh as in codex-swarm Step 0. You can also call

codex exec directly for a single image; the dispatcher is for batches.

Step 1 — Build the manifest

For each requested image, record as separate fields:

  • purpose — what it is for (icon, hero, texture, OG card…)
  • prompt — the detailed description you will send
  • new or edit — edits need exact input paths
  • destination — an absolute output path
  • format — png, jpg, webp

Treat a user-specified path and format as immutable. Do not rename the file, change its extension, or pick a different directory without asking. If the user gave no path, choose a sensible project location (assets/, public/, docs/images/) and say which one you picked. If the exact path already exists and replacement was not requested, ask before overwriting.

Step 2 — Write the image prompt

Codex generates what you describe, so describe it fully. Cover: subject, composition and framing, style (flat vector, 3D render, photo, watercolor…), palette, lighting, background (state explicitly if it must be transparent), aspect ratio, and any text that must appear verbatim. Name what must not be there too — stray text, watermarks, borders.

For an edit, pass the exact absolute path of every input file and state what must stay unchanged.

Step 3 — Dispatch

One job per image. Images are independent, so a batch goes out in parallel.

Single image, directly:

codex exec "Generate an image: . Save it to . \
Then print a line starting with TOUCHED: listing the file." \
  --model gpt-5.6-luna -c model_reasoning_effort="medium" \
  --sandbox workspace-write --skip-git-repo-check --cd "$PWD"

Batch — one MODEL:-headed prompt file per image, then:

bash "$DISPATCH" --auto --timeout 20m 01-icon-light.prompt.md 02-icon-dark.prompt.md

Every prompt must end with: "Save it to `, then print a line starting with TOUCHED:` listing the file."

Rules:

  • The sandbox must be workspace-write (--auto), and the destination

must be inside the project — a read-only sandbox cannot save the file.

  • One generation call per asset or variant. A retry is a new variant with

its own path, never a second write to the same path.

  • Two parallel jobs must never target the same output path.
  • Use gpt-5.6-luna at medium; the image model does the work, not the

reasoning tier.

  • Image generation takes ~40–90 seconds per asset. Allow at least 5 minutes

per job and tell the user it is running.

Step 4 — Verify before you deliver

  1. Confirm the file exists at the exact manifest path and is non-trivial in

size (ls -l; a few hundred bytes means it failed).

  1. View it with your image-reading tool. Check it against the requested

subject, composition, text, and — for edits — that the invariants held.

  1. Validate the real format from file contents, not the extension

(file ).

  1. If it is wrong, add one targeted variant to the manifest with a corrected

prompt and its own path, dispatch that one job, and inspect again.

Report every final path, the validated format, and what you verified.

Blocking

If codex is missing, unauthenticated, or the job returns no file, stop. State which assets are incomplete and why. Do not describe an image you did not generate, do not claim a file exists without checking, and never ask the user to paste a secret into chat.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.