codex-imagegen

Installation
SKILL.md

codex-imagegen

Overview

This skill drives the Codex CLI agent (codex exec) and asks it to produce a PNG at a path the caller chooses. On this machine the agent does not invoke a built-in image_generation tool — instead it shells out to https://api.openai.com/v1/images/generations with model gpt-image-1, base64-decodes the response, and writes the PNG. The wrapper handles the friction: companion-env interception, sandbox/network confinement, path resolution, output verification.

When to use

Trigger when the user's request has both:

  1. An image-generation intent — "生圖 / 畫一張 / generate / draw / create an image of …", and
  2. A target file path — "存成 X.png", "save to X.png", or an output directory.

If only (1) is present, ask for the path before proceeding.

How to use

Run the bundled script. It takes the output path as the first argument and the description as the rest:

Installs
1
GitHub Stars
76
First Seen
Jun 6, 2026
codex-imagegen — htlin222/dotfiles