gpt-image-2
面向 GPT Image 2 的图像生成 / 编辑技能。可在 3 种环境下使用:(A) Garden 本地模式,通过 OpenAI 兼容接口直接出图并落盘;(B) Host-Native 模式,把本 Skill 当作提示词工程指引,把渲染好的 prompt 交给宿主 Agent 自带的图像工具出图;(C) Advisor 模式,宿主无任何图像工具时退化为高质量 prompt 顾问。涵盖 18 大类、80+ 个结构化模板,覆盖海报 / UI / 产品 / 信息图 / 学术图 / 技术架构图 / 漫画 / 头像 / 流程板 / 电影分镜 / IP 周边 / 编辑工作流等场景。
npx skills add ConardLi/garden-skills --skill gpt-image-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# GPT Image 2 这是一个面向 GPT Image 2 的聚焦型技能,在 3 种运行环境下都能用,但行为差异显著。**第一步必须先确定当前运行模式**。 它只做两类图像任务: - 生成图片:`POST /images/generations` - 编辑图片:`POST /images/edits` 本文件保留:运行模式、技能结构、环境变量、保存 / 命名规则、模板索引、模式感知工作流。详细模板全部放在 `references/`,分层组织: - 一级:分类目录 - 二级:单模板 Markdown 文件 ## 运行模式(必读,做任何事之前先确定) 本 Skill 自带一个轻量探测脚本,先跑一次,再根据结果决定怎么干活: ```bash 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.
- 运行模式(必读,做任何事之前先确定)
- Mode A · Garden 本地生图
- Mode B · Host-Native 委托宿主出图
- Mode C · Advisor 纯提示词顾问
- 模式决策表
- 模式不确定时
- 用户输入工具
- 技能结构
- 环境变量
- 默认输出目录
- 默认命名规则
- Prompt 保存规则
- 图片保存规则(仅 Mode A)
- 快速用法
node skills/gpt-image-2/scripts/check-mode.js node skills/gpt-image-2/scripts/check-mode.js --json node skills/gpt-image-2/scripts/generate.js \ node skills/gpt-image-2/scripts/edit.js \
What does the gpt-image-2 skill do?
面向 GPT Image 2 的图像生成 / 编辑技能。可在 3 种环境下使用:(A) Garden 本地模式,通过 OpenAI 兼容接口直接出图并落盘;(B) Host-Native 模式,把本 Skill 当作提示词工程指引,把渲染好的 prompt 交给宿主 Agent 自带的图像工具出图;(C) Advisor 模式,宿主无任何图像工具时退化为高质量 prompt 顾问。涵盖 18 大类、80+ 个结构化模板,覆盖海报 / UI / 产品 / 信息图 / 学术图 / 技术架构图 / 漫画 / 头像 / 流程板 / 电影分镜 / IP 周边 / 编辑工作流等场景。
How do I install it?
Run `npx skills add ConardLi/garden-skills --skill gpt-image-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ConardLi/garden-skills, a repository with 10,047 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
