codex-image

codex-image is a skill for Claude Code, Codex from Lykhoyda/ask-llm. It costs 93 tokens per session (1,995 once invoked), scanned A, original, MIT.

An image-generation skill that uses Codex and OpenAI's gpt-image-2 model to create a picture from a prompt and save it to disk.

In plain words
What is it for?
Use it to create illustrations, graphics, or other requested images, then receive the saved file path.
Why use it?
It removes the need to switch to a separate image tool when a coding task needs a visual asset.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the ask-llm plugin — 18 skills, 9 agents, 5 hooks, 1 MCP server shipped together

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/lykhoyda/ask-llm/codex-image
Any agent
npx skills add Lykhoyda/ask-llm --skill codex-image
Clone the repo
git clone --depth 1 https://github.com/Lykhoyda/ask-llm

Made for: Claude Code, Codex.

Or install ask-llm, the plugin that ships this one along with the rest of its 18 skills, 9 agents, 5 hooks, 1 MCP server.

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/lykhoyda/ask-llm/codex-image.svg)](https://agentmods.dev/skills/lykhoyda/ask-llm/codex-image)
Your own site
<a href="https://agentmods.dev/skills/lykhoyda/ask-llm/codex-image"><img src="https://agentmods.dev/badge/skills/lykhoyda/ask-llm/codex-image.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,995 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00093 $0.01995
Opus 5 $0.00046 $0.00997
Sonnet 5 $0.00019 $0.00399
Haiku 4.5 $0.00009 $0.00199

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

Security

Grade A, and why

codex-image scanned grade A with 0 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/claude-plugin/skills/codex-image/SKILL.md · 121 lines

How it starts

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

Portable contract

Refine the requested image prompt without changing intent, select an explicit output path, invoke Codex with sandbox: "workspace-write" so its image tool may create the file, verify the resulting file on disk, and report the path and provider response. Surface feature, policy, timeout, and filesystem failures verbatim.

Host adapters

Pi adapter

Call native ask-codex with sandbox: "workspace-write". After it returns, use Pi's read-only filesystem tools to verify the output file. Do not claim automatic inline rendering in print mode.

Claude Code adapter

The existing detailed workflow below is the Claude Code adapter. Its Agent, MCP, hook, CLAUDE_PLUGIN_ROOT, and AskUserQuestion mechanics apply only on Claude Code; they do not override the Pi adapter above.

Codex Image Generation

Generate an image by delegating to the ask-codex MCP tool with a prompt-engineered template that triggers Codex's built-in image_generation tool. The result is saved to disk and the path is returned to the user.

Model capabilities (gpt-image-2)

Codex's image_generation tool selects the image model server-side; as of 2026-04-21 that is gpt-image-2. Three capabilities are worth accounting for when building prompts:

  • Legible in-image text — per OpenAI's launch materials, gpt-image-2 renders text at ~99% accuracy across many scripts, so captions, labels, and UI copy are now reliable. gpt-image-1's weak text is no longer a reason to avoid asking for it.
  • High resolution — up to 4K and custom dimensions; ask for it explicitly in the prompt body when you need it. Default square renders observed in testing varied (1024×1024 and 1254×1254), so don't hard-code an expected size — read it back from the file if it matters.
  • Provenance + watermark — every render embeds a C2PA provenance manifest and an invisible AI-origin watermark. Flag this to the user when the image is destined for a context sensitive to AI-generated-content metadata.

Read the full file on GitHub · 121 lines

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. 4d ago First seen · 121 lines · 93 tokens per session scan A 4cac1e6ddae6

Subscribe to this mod's changes

codex-image is a skill published in the GitHub repository Lykhoyda/ask-llm (16 stars, last pushed yesterday), licensed MIT. It adds 93 tokens to every session and 1,995 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. 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

remove-ai-marks

Strip multi-vendor AI provenance from owned files: hidden Unicode (Layer A), statistical sampling watermarks via rewrite (Layer B — always offer), and C2PA/EXIF/XMP/container metadata on PNG/JPEG/WebP/SVG/PDF/DOCX/ODT/HTML/MD. Covers Claude, Gemini/SynthID-class, OpenAI provenance surfaces, and open-LLM sampling…

ShadowAqueduct/watermark-remover · 135 tokens

repo-visuals

Create hero visuals — animated GIF, static PNG, or animated SVG — for GitHub repositories. Runs a structured discovery conversation (scan repo → recommend format → propose creative scenarios → agree on a brief), then designs bespoke HTML/SVG, previews it in the browser, and exports. Use when the user asks for a README…

livlign/claude-skills · 112 tokens

ghost-decode

Use when a video hides text in moving dots or noise — "ghost font" clips, motion-defined text, random-dot kinematograms, TV-static videos with a secret message, text readable only while playing but invisible in any paused frame, or the user asks what a ghost-font video says.

haroontrailblazer/ghost-font-decoder · 64 tokens

qwen-vision

Use when the user asks to "analyze video", "watch this video", "what happens in this video", "describe this clip", "review this footage", "classify these videos", "compare videos", "analyze this image", "what's in this screenshot", or when the user provides a video/image file path and expects visual understanding.…

kirillbrsnkv/give-claude-eyes · 125 tokens

video-context

Extract scene-change frames + audio transcript from any video so Claude can "watch" it. Use when user pastes a video URL or local video file path and asks to analyze, watch, summarize, or debug from a video. Triggers on .mp4/.mov/.webm/.mkv paths, video URLs (Loom, YouTube, raw mp4, private attachments), or phrases…

vusallyv/video-context-plugin · 105 tokens

run-video-to-code-skill

Analyzes video feedback by extracting key frames and audio transcription. Use when the user mentions video feedback, screen recordings, user recordings, or wants to analyze a video file from /video-to-code-skill-storage folder.

PiotrLason/video-to-code-skill · 50 tokens