Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/colin-automates/Codex-ImageGen--Claude-CodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/colin-automates/codex-imagegen--claude-code/setup)<a href="https://agentmods.dev/commands/colin-automates/codex-imagegen--claude-code/setup"><img src="https://agentmods.dev/badge/commands/colin-automates/codex-imagegen--claude-code/setup/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/colin-automates/codex-imagegen--claude-code/setup"><img src="https://agentmods.dev/badge/commands/colin-automates/codex-imagegen--claude-code/setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.01311 |
| Opus 5.5 | $0.00015 | $0.00524 |
| Sonnet 5.5 | $0.00008 | $0.00262 |
| Haiku 4.5 | $0.00004 | $0.00131 |
Grade C, and why
setup scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
> "Auto-install needs elevated permissions. Open a terminal as Administrator (Windows) or run `sudo npm install -g @openai/codex` (macOS/Linux), then re-run `/imagegen setup`." Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Copy the entries from this plugin's `settings.json` into their `~/.claude/settings.local.json`. How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
The user invoked /imagegen:setup (also reachable as /imagegen setup). Run these steps in order, reporting clearly at each one:
Step 1 — Codex on PATH (auto-install if missing)
Run codex --version via Bash.
- If it succeeds, note the version and continue to Step 2.
- If it fails with "command not found" / ENOENT, try to install Codex automatically.
Before attempting auto-install, verify npm is available. Run command -v npm (or npm --version). If npm is missing, tell the user: "I need Node.js + npm to install Codex CLI. Install Node 18+ from https://nodejs.org, then re-run /imagegen setup." Stop.
If npm is present, tell the user one short sentence ("Codex CLI not found — installing it via npm now, this takes 30–90 seconds…") and run, with timeout_ms = 300000 (5 minutes):
npm install -g @openai/codex 2>&1
After it returns:
- Success path: re-run
codex --version. If it now succeeds, note the version and continue to Step 2. - Permission error — output contains
EACCES,permission denied,Access is denied, or similar: tell the user:"Auto-install needs elevated permissions. Open a terminal as Administrator (Windows) or run
sudo npm install -g @openai/codex(macOS/Linux), then re-run/imagegen setup." Stop. - Other failure (network error, registry timeout, etc.): surface the relevant tail of the npm output verbatim, suggest manual install, and stop.
Step 2 — Codex auth
Run codex login status via Bash.
If output contains "Logged in" (any form): note the auth method ("ChatGPT" or "API key") and continue to Step 3.
If output is "Not logged in": auto-launch the sign-in flow in a new terminal window and poll for completion. Tell the user one short sentence first ("Opening a browser sign-in window — complete it and I'll continue automatically"), then run this one Bash command with timeout_ms = 240000 (4 minutes):
# Spawn codex login in a new visible terminal so the user can interact with it
OS=$(uname -s 2>/dev/null || echo unknown)
case "$OS" in
MINGW*|MSYS*|CYGWIN*)
powershell -NoProfile -Command "Start-Process cmd -ArgumentList '/k','codex','login'" ;;
Darwin)
osascript -e 'tell application "Terminal" to do script "codex login"' >/dev/null ;;
Linux)
(x-terminal-emulator -e codex login &) 2>/dev/null \
|| (gnome-terminal -- codex login &) 2>/dev/null \
|| (xterm -e codex login &) 2>/dev/null \
|| (codex login &) ;;
*)
codex login & ;;
esac
# Poll codex login status every 5s for up to 3 minutes.
# Anchor on start-of-line so "Logged in" doesn't false-match inside "Not logged in".
for i in $(seq 1 36); do
status=$(codex login status 2>&1)
if echo "$status" | grep -qiE '^[[:space:]]*Logged in'; then
echo "AUTH_COMPLETE"
echo "$status"
exit 0
fi
sleep 5
done
echo "AUTH_TIMEOUT"
codex login status
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 103 lines · 38 tokens per session scan C b6500c588743
setup is a command published in the GitHub repository colin-automates/Codex-ImageGen--Claude-Code (4 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 1,311 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
imagine-guide
Get interactive guidance on using ImaginePro effectively in Claude Code.
video-flow
Create a complete video animation from a description - automates the full workflow from concept to finished video.
vary-it
Create intelligent variations and refinements of an existing ImaginePro generated image.
imagine-pro
Generate an AI image with ImaginePro using best practices and intelligent guidance.
upscale-it
Upscale an ImaginePro generated image to higher resolution and enhanced quality.
learn
Force claude-smart to extract learnings from this session now.