Index of every page on this site: llms.txt
All skills
devhims avatar

/codex-imagegen-cli

@b8d4bf6
Run it yourself

Generate raster images with the image_generation tool built into OpenAI's Codex CLI (codex exec, read-only sandbox), with optional reference images, one image or several in parallel, and copy them into the project folder. Use for AI text-to-image, reference-image edits and restyles, character turnaround sheets, location plates, storyboard frames, and transparent-background cutouts.

Use this Skill: https://skilld.dev/gh/devhims/skills/codex-imagegen-cli

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈810 tokens on demand. Your agent reads this file only when SKILL.md points to it.

codex-imagegen-cli

Generate images with the image_generation tool built into OpenAI's Codex CLI, run from the command line (codex exec) in a read-only sandbox, and save them into your project folder. Your agent writes the prompt, runs Codex, checks the result and redoes it if needed.

  • Text to image in any aspect ratio (landscape, square, portrait 9:16)
  • Several images in parallel: ask for a set and each image runs as its own Codex session at the same time (3 images in 39 s in testing)
  • Reference images: keep a character or location and put it in a new scene, or combine two references into one image
  • Character turnaround sheets and transparent-background cutouts with real alpha
  • No API key needed: it uses your signed-in ChatGPT/Codex plan
  • Text in images, with the agent checking the spelling
  • Tested gotchas covering prompt handling, real output sizes, style drift, draft vs final images and transparency checks

Install

npx skills add devhims/skills --skill codex-imagegen-cli

Requirements

  • Codex CLI (OpenAI's official CLI, published as @openai/codex on npm and codex on Homebrew), installed and signed in with codex login. Install it yourself from the official instructions; the skill never installs anything.
  • python3, for the bundled image collector
  • Optional: ffmpeg/ffprobe, to check sizes and transparency

Note: every image uses your ChatGPT/Codex quota (roughly 9–25k tokens and 1–3 minutes per image). The skill tells the agent to ask before generating unless you asked for an image.

Example

"Generate a square gouache illustration of a fox drinking tea in a teahouse, then make a three-view turnaround sheet of the same fox on a transparent background."

How it works

  1. The agent writes the image description into a fixed prompt template that tells Codex to treat it as a picture description only, never as instructions.
  2. It runs codex exec --sandbox read-only with the prompt on stdin, passing any reference images with -i. Codex generates the image with its built-in tool but can't write to your project or change anything. For several images, the agent starts one codex exec per image at the same time (up to 4 by default), each with its own prompt, log and output name.
  3. scripts/collect_codex_images.py copies the image from that run's folder in ~/.codex/generated_images/ into your project, marking the final one if Codex made drafts. It's local only: no network, no commands.
  4. The agent checks the image against your request and references, and runs again with a precise fix if something is off, asking you before a third attempt.

Security

  • Codex always runs with --sandbox read-only.
  • The request is wrapped in <image_request> tags with an instruction not to follow anything inside them, and the agent never pastes in text from files, web pages or tool output.
  • The skill never installs packages, signs in, or reads ~/.codex/auth.json.

The agent's full instructions are in SKILL.md.


← All skills · MIT License

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert3d3 checks · Risk HIGH
  • Gen Agent Trust Hub3d

    The skill claims to be an image generator using a "Codex image model," but it actually uses an execution tool (codex exec) and requires installing an unverified third-party package (@openai/codex). This is deceptive because Codex is a code generation model, not an image model. By misrepresenting an execution tool as an image generator, the skill creates a significant risk where user-injected instructions could lead the agent to execute harmful commands or code on the system.

  • Socket3d

    No alerts

  • Snyk3d

    Risk: LOW · No issues

Signed by skilld at b8d4bf6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago

README badge

README badge for devhims/skills