codex-image

codex-image is a skill for Claude Code, Codex from byungjunjang/slide-master. It costs 91 tokens per session (2,064 once invoked), scanned B, original, MIT.

A command-line helper for generating images with OpenAI’s image-generation model through Codex login. It explains how to check the Codex CLI installation and authentication before generating an image.

In plain words
What is it for?
Use it to create images from prompts, choose sizes or quality settings, and place the generated files in a project.
Why use it?
It lets a logged-in Codex user generate images without setting up a separate API key. It also identifies missing installation or login steps before use.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/byungjunjang/slide-master/codex-image
Any agent
npx skills add byungjunjang/slide-master --skill codex-image
Clone the repo
git clone --depth 1 https://github.com/byungjunjang/slide-master

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for codex-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/byungjunjang/slide-master/codex-image.svg)](https://agentmods.dev/skills/byungjunjang/slide-master/codex-image)
Your own site
<a href="https://agentmods.dev/skills/byungjunjang/slide-master/codex-image"><img src="https://agentmods.dev/badge/skills/byungjunjang/slide-master/codex-image.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,064 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00091 $0.02064
Opus 5 $0.00046 $0.01032
Sonnet 5 $0.00018 $0.00413
Haiku 4.5 $0.00009 $0.00206

Measured 5d ago against content hash 08e48085caeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

codex-image scanned grade B with 1 finding 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 5d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| Trust error | Check `--skip-git-repo-check` flag or add project to `~/.codex/config.toml` |
.claude/skills/codex-image/SKILL.md · 186 lines

How it starts

The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.

codex-image — AI Image Generation via Codex OAuth

Generate images using OpenAI's gpt-image-2 model through Codex CLI. No API key required — uses Codex OAuth (ChatGPT login) authentication.

User-facing quoted messages below are bilingual (EN / KO) — print the variant matching the user's chat language.

How it works

User prompt → Claude Code (/codex-image)
  → codex exec (OAuth token auto-managed)
    → built-in image_gen tool (gpt-image-2)
      → ~/.codex/generated_images/<session>/
        → copy to project root

Important: OAuth tokens cannot call OpenAI REST API directly (returns 401). Must go through codex exec which handles auth internally.


Step 1 — Verify Codex CLI & Auth

which codex 2>/dev/null && codex --version 2>/dev/null || echo "NOT_FOUND"

If NOT_FOUND, stop:

"Codex CLI not installed. Run npm install -g @openai/codex then codex login." "Codex CLI 없음. npm install -g @openai/codexcodex login 실행해."

codex login status 2>&1

If not "Logged in":

"Codex login required. Run codex login in terminal. OAuth login enables image generation without API key." "Codex 로그인 필요. 터미널에서 codex login 실행. OAuth 로그인하면 API 키 없이 이미지 생성 가능."

Step 2 — Parse Arguments

Extract from $ARGUMENTS:

Flag Values Default Description
--size 1024x1024, 1024x1536, 1536x1024, auto 1024x1024 Image dimensions
--quality low, medium, high, auto auto Generation quality
--out directory path project root Save location
--filename name without extension codex-image-<timestamp> Output filename stem
-n 1–10 1 Number of images

Remaining text → image prompt.

If prompt is empty, ask via AskUserQuestion:

"What image should I generate? Enter a prompt." "어떤 이미지를 생성할까? 프롬프트를 입력해줘."

Step 2.5 — Background normalization (avoid the transparency checkerboard)

Known gpt-image-2 failure mode. When a prompt asks for a transparent background, gpt-image-2 does NOT return true alpha — it paints a literal gray-and-white checkerboard (the pattern editors use to display transparency) into the RGB pixels. The result looks broken on any real backdrop. This skill therefore never passes a transparency request straight through.

Read the full file on GitHub · 186 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 5d ago First seen · 186 lines · 91 tokens per session scan B 08e48085caeb

Subscribe to this mod's changes

codex-image is a skill published in the GitHub repository byungjunjang/slide-master (216 stars, last pushed 1mo ago), licensed MIT. It adds 91 tokens to every session and 2,064 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens