
Gpt Image 2
A three-mode image generation skill that adapts to your environment instead of breaking when the API key is missing. Mode A runs locally with OpenAI-compatible endpoints and saves everything to disk. Mode BDetectS when you're in ChatGPT or another host with native image tools and becomes a prompt engineering layer that hands off perfectly structured prompts to whatever's available. Mode C drops to pure advisor mode when there's no image capability at all, saving high-quality prompts you can copy elsewhere. Ships with 80+ structured templates across 18 categories covering everything from live commerce UIs to exploded product views to travel maps. The check-mode script runs first and tells you which path you're on.
- skills.sh installs
- 6.2K
- GitHub stars
- 14.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add conardli/garden-skills --skill gpt-image-2 --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
- 用户显式说"用你自己的工具出图"
Sponsors
Details
- Repository
- github.com/conardli/garden-skills
- Category
- AI & Agent Building
- First seen
- May 16, 2026