gpt-image-skill

gpt-image-skill is a skill for Claude Code, Codex from feiskyer/codex-settings. It costs 112 tokens per session (1,532 once invoked), scanned A, original, MIT.

A workflow for generating or editing images with OpenAI's image-generation API, using a bundled Python script.

In plain words
What is it for?
Use it to create new images or modify existing ones when the user asks for AI-generated artwork or image edits.
Why use it?
It provides a defined process for image requests, including required credentials, dependencies, output locations, and model options.

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

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 gpt-image-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/feiskyer/codex-settings/gpt-image-skill.svg)](https://agentmods.dev/skills/feiskyer/codex-settings/gpt-image-skill)
Your own site
<a href="https://agentmods.dev/skills/feiskyer/codex-settings/gpt-image-skill"><img src="https://agentmods.dev/badge/skills/feiskyer/codex-settings/gpt-image-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,532 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.00112 $0.01532
Opus 5 $0.00056 $0.00766
Sonnet 5 $0.00022 $0.00306
Haiku 4.5 $0.00011 $0.00153

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

Security

Grade A, and why

gpt-image-skill 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 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (gpt_image.py, tests/test_gpt_image.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/gpt-image-skill/SKILL.md · 188 lines

How it starts

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

GPT Image Skill

Generate or edit images using OpenAI's GPT Image models through a bundled Python script.

Resolve the skill directory

Before running any command, resolve the absolute directory containing this SKILL.md and refer to it as <skill-dir>. Never assume the current working directory is the Skill directory. Keep user input and output paths relative to the user's working directory unless the user requests another location.

Requirements

  1. OPENAI_API_KEY: Must be configured in ~/.gpt-image.env or export OPENAI_API_KEY=<your-key>
  2. OPENAI_API_BASE (optional): Custom API base URL for compatible endpoints (e.g. Azure OpenAI, proxies). Set in ~/.gpt-image.env or export it.
  3. Python3 with dependencies: openai, httpx, python-dotenv. Install via python3 -m pip install -r "<skill-dir>/requirements.txt" if not installed yet.
  4. Executable: <skill-dir>/gpt_image.py

Instructions

For image generation

  1. Ask the user for:

    • What they want to create (the prompt)
    • Desired size (optional, defaults to 1024x1024)
    • Output filename (optional, auto-generates UUID-based name if not specified)
    • Model preference (optional, defaults to gpt-image-2)
    • Quality (optional, defaults to auto)
    • Number of images (optional, defaults to 1)
  2. Run the script:

    python3 "<skill-dir>/gpt_image.py" --prompt "description of image" --output "filename.png"
    
  3. Show the user the saved image path when complete.

For image editing

  1. Ask the user for:

    • Input image file(s) to edit
    • What changes they want (the prompt)
    • Output filename (optional)
  2. Run with input images:

    python3 "<skill-dir>/gpt_image.py" edit --prompt "editing instructions" --input image1.png image2.png --output "edited.png"
    

    Parent directories in the output path are created automatically. When --format is omitted, the script infers it from .png, .jpg/.jpeg, or .webp; otherwise it defaults to PNG.

Read the full file on GitHub · 188 lines

Files

What ships with it

5 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 · 188 lines · 112 tokens per session scan A 80d9e32f6223

Subscribe to this mod's changes

gpt-image-skill is a skill published in the GitHub repository feiskyer/codex-settings (237 stars, last pushed 23d ago), licensed MIT. It adds 112 tokens to every session and 1,532 once invoked, about $0.0006 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

skill-creator

Create, refine, and benchmark agent skills. Use when building a new skill, updating an existing one, running evals, checking trigger quality, or improving a skill description.

feiskyer/claude-code-settings · 39 tokens

github-review-pr

Review GitHub pull requests with detailed, multi-perspective code analysis using parallel subagents. Use this skill whenever the user wants to review a PR, asks for code review on a pull request, mentions "review PR", "check this PR", "look at pull request", or references a PR number or GitHub PR URL. Do NOT use for…

feiskyer/claude-code-settings · 90 tokens

deep-research

Multi-agent research orchestration: split a research goal into parallel sub-goals, run each via headless claude -p subprocesses, aggregate results into a polished report file. Use for systematic web/document research, competitive or industry analysis, batch link/dataset processing, and long-form evidence synthesis.…

feiskyer/claude-code-settings · 94 tokens

brainstorming

Explore user intent, requirements, and design options through collaborative dialogue before implementation. Use before building new features, components, or systems — whenever the user describes something to build and design decisions are involved. Triggers: "brainstorm", "help me design", "think through the…

feiskyer/claude-code-settings · 93 tokens

grill-me

针对方案或设计的高强度追问式面试(adversarial design review / grill session),暴露假设漏洞与缺失约束,过程中同步维护领域模型(术语表和 ADR)。手动调用 /grill-me。.

feiskyer/claude-code-settings · 58 tokens

gpt-image-skill

Generate or edit images using OpenAI GPT Image API (gpt-image-2, gpt-image-1, etc). Use ONLY when the user explicitly names OpenAI or GPT as the provider: "gpt image", "openai image", "generate image with openai", "用 openai 画图", "用 GPT 生成图片". For generic image requests without a provider, use nanobanana-skill instead.…

feiskyer/claude-code-settings · 115 tokens