skills/codex-imagegen/SKILL.md
Generate or redesign raster images (PNG mockups, illustrations, photos, UI design polish) from inside Claude Code by driving Codex CLI's built-in $imagegen, billed to ChatGPT-included usage instead of per-image OpenAI API charges. Use whenever the user wants to create/generate an image, make a mockup or illustration, produce a photo, polish or redesign a UI from a screenshot, or get a PNG out of a session — even if they don't mention Codex or "imagegen". This is the preferred image-generation path because Anthropic models cannot generate raster images and this route avoids API billing.
npx skillsauth add takazudo/claude-resources codex-imagegenInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Anthropic models are vision-in / text-out — they cannot emit raster pixels. This skill produces real PNGs by delegating to Codex CLI's $imagegen (the gpt-image-2 model behind ChatGPT Images), and keeps it on ChatGPT-included usage by stripping OPENAI_API_KEY from the call so it never silently bills the OpenAI image API.
scripts/codex-imagegen.sh runs the whole flow (ChatGPT-auth preflight → headless codex exec → save to disk → optional exact resize) and prints the saved path:
"$HOME/.claude/skills/codex-imagegen/scripts/codex-imagegen.sh" \
--prompt "<what to make>" [--out <name.png>] [--in <image>]... [--size WxH]
--prompt — what to generate, or how to redesign the --in image.--out — optional. A bare name/relative path lands in the repo-scoped cclogs dir; an absolute path is used verbatim; omitted auto-names from the prompt. See Output location.--in — attach an image as vision/edit source; repeatable (e.g. a screenshot to redesign + a brand/style reference).--size — exact output pixels, e.g. 600x600. $imagegen only emits preset sizes, so the script hard-resizes to your dims — sips on macOS, ImageMagick or Pillow on Linux/WSL (warns and keeps native size if none is present).The script prints the absolute saved path. After it succeeds, Read that PNG to view/verify it and show the user.
scripts/codex-imagegen.sh --size 600x600 \
--prompt "a realistic photo of a grey heron at the water's edge"
Pass the screenshot with --in. This is the design-polish path: the model works from the picture, not the app's source code.
scripts/codex-imagegen.sh --out redesign.png --in baseline.png \
--prompt "redesign this pricing table to look premium — keep every number, column, and row identical; improve only spacing, typography, color, and dividers"
The script saves into the repo-scoped, Dropbox-synced cclogs dir — <cclogs-base>/<repo>/imagegen/ — resolved automatically by $HOME/.claude/scripts/get-logdir.js (the same {logdir} rule the other skills use; worktree-aware, _misc/ when outside a git repo). Don't hand-build the path: pass just a filename to --out, or omit it. An absolute --out overrides this when a specific destination is needed.
get-logdir detects the repo with git rev-parse from the current directory, so invoking the script from a non-repo cwd (a /tmp scratchpad, a Dropbox prototype dir) silently routes output to <cclogs>/_misc/imagegen/ instead of the repo. Pass --project-dir <repo-dir> to anchor resolution to the repo regardless of where the command runs — e.g. a design-polish loop that screenshots into /tmp should pass --project-dir "$REPO_ROOT" so mockups still land in <cclogs>/<repo>/imagegen/.
Each image costs roughly 90k–100k tokens of ChatGPT/Codex usage (image turns run ~3–5× heavier than text). Fine for a handful of design explorations; don't loop it dozens of times without telling the user. The script reports the tokens used per call.
--size, which prefers sips (macOS) then ImageMagick (magick/convert) then Pillow (python3 -m PIL) — generation itself needs none of these. get-logdir.js already resolves the WSL Dropbox cclogs path. The real per-machine requirement is Codex auth: $HOME/.codex/auth.json is not shared across machines, so run codex login (ChatGPT) once on each (Mac and WSL).codex login status → "Logged in using ChatGPT"). The script warns if not. If only API-key auth is available, this skill's billing premise doesn't hold — say so rather than silently spending API credits.OPENAI_API_KEY would flip Codex to API billing; the script unsets it per-call to stay on ChatGPT usage. That's the whole point — don't remove that.tools
Acceptance gate for a branch produced by an OpenAI Codex CLI run — usually Codex implementing a /big-plan epic that was handed off to it. Codex reports the work 'done' (or the user flags it WIP with corrections); this skill confirms the branch actually fulfils the original spec, fixes what falls short, and routes larger discoveries into GitHub issues. Use when: (1) User says '/finalize-codex-work', 'finalize codex work', 'confirm the codex work', 'check the codex branch', or 'codex said it's done', (2) A branch is the result of a Codex CLI session and needs verification against its spec issue/PR, (3) After assigning a /big-plan epic to Codex CLI. Pass -m/--merge to run /pr-complete -c at the end.
tools
Read a Figma design node directly from a share URL via the Figma REST API — no Dev Mode subscription, no MCP, no desktop app. Renders the node to PNG and dumps its full style/layout JSON so the design can be described, compared, or implemented. Use whenever the user gives a Figma design URL (figma.com/design/... or /file/...) and wants to see, read, inspect, reference, or implement that node — including `/fig-url-refer <url>`. This is the URL-based counterpart to `/figrefer` (which needs a Dev-plan desktop MCP); prefer this one when the input is a URL rather than a live desktop selection.
tools
Sync the user's Claude Code workflow skills into the OpenAI Codex CLI settings repo ($HOME/.codex) as Codex-native ports, fix the Codex .gitignore for new local state, then commit and push. Use when: (1) user says '/dev-codex-sync-settings-from-claude', 'sync codex settings', 'sync claude skills to codex', 'port skills to codex', or 'update codex from claude'; (2) after updating ~/.claude workflow skills (big-plan, x, x-as-pr, x-wt-teams) and Codex should catch up; (3) the $HOME/.codex repo has drifted behind $HOME/.claude. The ports are condensed Codex-native REWRITES, never file copies.
development
Analyze a video file (mov, mp4, webm, etc.) or a YouTube video by extracting still frames with ffmpeg and reading them chronologically with vision — Claude cannot ingest video files directly. Use whenever the user provides a video file path or YouTube URL and wants to know what happens in it: "read this video", "watch this video", "check this recording", "what happens in this .mov/.mp4", analyzing a screen recording of a UI bug, or verifying UI behavior captured in a video, even if they don't name this skill.