gpt-image-2

gpt-image-2 is a skill for Claude Code, Codex from ConardLi/garden-skills. It costs 177 tokens per session (7,804 once invoked), scanned A, original, MIT.

A skill for generating or editing images with GPT Image 2 across local, host-provided, or advisory setups.

In plain words
What is it for?
Use it for posters, interfaces, products, infographics, academic or technical diagrams, comics, avatars, storyboards, and other image tasks.
Why use it?
It provides a defined process for choosing an image template, writing a prompt, generating or editing an image, and saving the result when the environment supports it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node skills/gpt-image-2/scripts/check-mode.js.

Good fit Use it for posters, interfaces, products, infographics, academic or technical diagrams, comics, avatars, storyboards, and other image tasks.

Compare 6 skills from other repositories ↓
About the project

Garden Skills is an open-source collection of reusable instructions for AI coding agents such as Claude Code, Cursor, and Codex, covering tasks including web design, image generation, and turning source material into articles or presentations. Developers use the skills to guide agents through these workflows.

ConardLi/garden-skills · 12,324 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ConardLi/garden-skills
agentmods
npx agentmods add skills/conardli/garden-skills/gpt-image-2

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin image-generation-skills/plugin install image-generation-skills after adding the marketplace above.

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-2

README.md
[![agentmods](https://agentmods.dev/badge/skills/conardli/garden-skills/gpt-image-2/github.svg)](https://agentmods.dev/skills/conardli/garden-skills/gpt-image-2)
Your own site
<a href="https://agentmods.dev/skills/conardli/garden-skills/gpt-image-2"><img src="https://agentmods.dev/badge/skills/conardli/garden-skills/gpt-image-2/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.

agentmods 80×15 button for gpt-image-2

Your own site · 80×15
<a href="https://agentmods.dev/skills/conardli/garden-skills/gpt-image-2"><img src="https://agentmods.dev/badge/skills/conardli/garden-skills/gpt-image-2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,804 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 8 May 2026
  • Snyk pass 8 May 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 114
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.1 $0.00177 $0.07804
Opus 5 $0.00088 $0.03902
Sonnet 5 $0.00035 $0.01561
Haiku 4.5 $0.00018 $0.00780

Measured 11d ago against content hash 919cfb275970, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

gpt-image-2 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 11d 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.

skills/gpt-image-2/SKILL.md · 500 lines

How it starts

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

GPT Image 2

这是一个面向 GPT Image 2 的聚焦型技能,在 3 种运行环境下都能用,但行为差异显著。第一步必须先确定当前运行模式

它只做两类图像任务:

  • 生成图片:POST /images/generations
  • 编辑图片:POST /images/edits

本文件保留:运行模式、技能结构、环境变量、保存 / 命名规则、模板索引、模式感知工作流。详细模板全部放在 references/,分层组织:

  • 一级:分类目录
  • 二级:单模板 Markdown 文件

运行模式(必读,做任何事之前先确定)

本 Skill 自带一个轻量探测脚本,先跑一次,再根据结果决定怎么干活:

node skills/gpt-image-2/scripts/check-mode.js
# 想拿结构化结果给上层程序用:
node skills/gpt-image-2/scripts/check-mode.js --json

输出会给出 mode = A / A? / B-or-C 以及 recommendation。三个模式定义如下:

Mode A · Garden 本地生图

触发条件:环境变量 ENABLE_GARDEN_IMAGEGEN 为真(1 / true / yes / on 存在 OPENAI_API_KEY

行为:完整端到端跑通"选模板 → 写 prompt → 调用脚本 → 出图落盘"。

  • scripts/generate.js 文本生图、scripts/edit.js 编辑现有图。
  • prompt 默认落盘到 garden-gpt-image-2/prompt/、图片落盘到 garden-gpt-image-2/image/
  • 这是最强的模式:你是图像工具的"持有者"。

Mode B · Host-Native 委托宿主出图

触发条件:未启用 Garden(ENABLE_GARDEN_IMAGEGEN 未设置 / 为假),但当前宿主 Agent 自带图像生成工具或图像 MCP

典型识别信号(你应该自检):

  • 你的工具集里出现 image_generation / imagegen / dalle / nano_banana / mcp__*image* / make_image / 类似名字
  • 用户在 ChatGPT / Codex / Gemini / Cursor 等支持原生出图的客户端中调用本 Skill
  • 用户显式说"用你自己的工具出图"

行为:本 Skill 退化成提示词工程指引——

  1. 仍按"选模板 → 填字段 → 渲染最终 prompt"的流程走。
  2. 不要调用 node scripts/generate.js(没有 API key、必失败)。
  3. 直接调用宿主自带的图像工具,把渲染好的 prompt 作为输入。
  4. 如用户希望可顺手把 prompt 文件保存到 garden-gpt-image-2/prompt/,但图片去向由宿主决定,不强制。

Mode C · Advisor 纯提示词顾问

触发条件:未启用 Garden,宿主 Agent 也没有任何图像生成工具。

行为:本 Skill 退化为"高质量 prompt 撰写顾问"——

  1. 按"选模板 → 填字段 → 渲染最终 prompt"流程走,缺信息就问用户。
  2. 把最终 prompt 直接打印给用户 + 保存一份到 garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md
  3. 附一句简短的"如何使用"建议(如:丢进 ChatGPT / Midjourney / DALL·E / Sora / Nano Banana / 自己后端 / 第三方 GPT Image 2 网关)。
  4. 不要假装出图成功。明确告知用户:"已生成可直接复用的高质量 prompt,请用你的图像工具执行。"

模式决策表

条件 模式 调用脚本? 落盘 prompt? 落盘图片?
ENABLE_GARDEN_IMAGEGEN=1 + 有 KEY A generate.js / edit.js ✅ 自动 ✅ 自动
ENABLE_GARDEN_IMAGEGEN=1 但没 KEY A? ❌(先要 KEY)
未启用 + 宿主有图像工具 B ❌(用宿主工具) 可选 由宿主决定
未启用 + 宿主无图像工具 C ✅ 必须 ❌(无法)

Read the full file on GitHub · 500 lines

Files

What ships with it

60 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. 11d ago First seen · 500 lines · 177 tokens per session scan A 919cfb275970

Subscribe to this mod's changes

gpt-image-2 is a skill published in the GitHub repository ConardLi/garden-skills (12,324 stars, last pushed 2mo ago), licensed MIT. It adds 177 tokens to every session and 7,804 once invoked, about $0.0009 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

accesslint-audit

Find and fix WCAG 2.2 accessibility issues. Two modes — report (sweep a codebase or page, produce a prioritized written report, no edits) and fix (audit→edit→verify loop on a target). Prefers di.

ranbot-ai/awesome-skills · 55 tokens

azure-cognitive-search

Expert knowledge for Azure AI Search development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when designing indexes, skillsets, indexers, vector/semantic search, or secure data…

MicrosoftDocs/Agent-Skills · 116 tokens

azure-horizondb

Expert knowledge for Azure Horizondb development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using azureai SQL/embeddings, pgvector tuning, Apache AGE graphs, hybrid…

MicrosoftDocs/Agent-Skills · 95 tokens

azure-documentdb

Expert knowledge for Azure DocumentDB development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using DocumentDB search (BM25/vector), Data API, MongoDB compatibility, change…

MicrosoftDocs/Agent-Skills · 120 tokens

brand-product-knowledge-builder

A product-information knowledge base that organizes specifications, evidence for claims, FAQs, pricing, competitor differences, and compliance limits into a document-based format for AI use.

limecloud/lime · 92 tokens

flashcard-generator

Generate educational flashcards from topics, documents, notes, or study materials. Produces structured JSON data and can create polished Tailwind CSS HTML flashcard review pages with interactive card flipping, progress, tags, and difficulty labels.

mingchen666/Reviva · 49 tokens