humantonylee/best-codex/imagegen
Claude Code and agent skill by humantonylee/best-codex
- community
Checking that the SKILL.md file is still in the repository.
Use this skill whenever the user asks to generate, create, render, draw, or make an image, picture, illustration, icon, logo, or any other visual asset. Also use it when the user wants to edit, modify, restyle, or combine existing images (provide them as reference_file inputs). The skill drives the `imagegen` CLI in this repo, which uses the user's local Codex ChatGPT authentication to call the private image-generation backend. Trigger phrases include "generate an image", "create a picture", "make an image of", "draw me a", "render this", "make this cat wear a hat", and similar. Prefer this skill over describing images in text.
Install
npx vskill@latest install humantonylee/best-codex/imagegenSKILL.md
imagegen
Generate images from text prompts (and optional reference images) by running the imagegen CLI shipped in this repository (dist/cli.js).
How to invoke
Run the CLI from the repo root. It is not published to npm; invoke it via bun run cli (or bun run cli). The TypeScript source must be compiled first with bun run build.
Basic generation
With reference images
Pass --reference_file <path> (or -r) one or more times to use existing images as input. Supported formats: png, jpg/jpeg, gif, webp.
Aspect ratio / size
Pass --aspect_ratio <ratio> (or -a). Accepts 1:1, 3:2, 2:3, 16:9, 9:16, 4:3, 3:4, auto, or a raw size like 1536x1024, 2048x1152, 3840x2160, 2160x3840.
Number of images
Pass --number <int> (or -n) to generate up to 4 images in one call (private-codex provider only).
Provider selection
Pass --provider <name>:
private-codex(default): direct HTTP to the private Codex backend. Fast,
supports --number, --aspect_ratio, and --reference_file.
codex-cli: headlesscodex execfallback. No reference images, no size
selection. Useful when the private HTTP path is rate-limited or down.
auto: tryprivate-codexfirst, fall back tocodex-clion failure.
Fallback is refused when --number > 1, --aspect_ratio/size, or --reference_file are set (codex-cli cannot honor those, so we fail fast rather than silently drop them).
Dry run
Validate auth and print the request shape without calling the backend.
Required arguments
--prompt <text>(or-p) — required text prompt--output-dir <dir>(or-o) — directory to save images (default: cwd)
Prerequisites the agent must check
All providers require the codex CLI authenticated via ChatGPT subscription OAuth. This is non-negotiable — no API keys, no service accounts, no fabricated auth.
- The
codexbinary must be onPATH. If missing, stop and tell the user
to install Codex — do not try to install it for them.
- The codex CLI must be logged in via ChatGPT subscription OAuth. Verify
with codex login status (must show "Logged in using ChatGPT"). If it shows API key auth or is not logged in, stop and tell the user to run codex login and choose the ChatGPT option.
- Confirm
~/.codex/auth.jsonexists withauth_mode = chatgpt. Verify
with bun run cli --auth. If missing or wrong auth_mode, stop and tell the user — do not fabricate auth state.
These checks apply regardless of which --provider is selected. The private-codex provider reuses the same ChatGPT OAuth token from ~/.codex/auth.json; the codex-cli provider drives codex exec directly. Both depend on a valid ChatGPT subscription OAuth session.
After running
imagegen saves PNG(s) to --output-dir and prints a JSON summary that includes savedPath for each image. Report savedPath back to the user.
Hook script
A convenience hook script is provided at .agents/skills/imagegen/scripts/imagegen-hook.sh that wraps the CLI with sensible defaults and streams the JSON result to stdout. It is intended to be called from other tools or shell pipelines.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcodex-imagegen-api/.agents/skills/imagegen/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/humantonylee/best-codex/imagegen)