跳到正文
Skillpedia
图片与图标6.0k · #14470

gpt-image

它能做什么

这项技能让你的 AI 通过命令行工具,使用 GPT Image 模型创建新图片或编辑已有图片。适合需要海报、标注编辑或带文字图片的人。

适用场景

  • ✓当你想用 GPT Image 模型制作新图片或海报时。
  • ✓当你想编辑参考图,或填补图片的某一部分时。
  • ✓当你的图片需要精确的文字、特定尺寸或选定的质量等级时。

技能链接

https://github.com/wuyoscar/GPT-Image2-Skill/blob/main/skills/gpt-image/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/wuyoscar/GPT-Image2-Skill/blob/main/skills/gpt-image/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请用 GPT Image 模型制作一张海报,上面用粗体写着 Summer Sale。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体选择合适的模型和方法,检查工具是否可用,然后根据你的需求运行图片命令。对于成本较高或不清楚的请求,它可能会先进行确认。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

gpt-image

Agent runbook for GPT Image 2 / 2.5 generation/editing. Use the prompt library + packaged CLI. Do not reimplement image API code.

Operating loop

  1. Classify request and resolve model: generate, edit, inpaint, or multi-reference; identify asset type, exact text, aspect ratio, references, safety constraints, and budget/quality. Apply the model-choice rules below before any API call.
  2. Choose the reference path: Image 2 keeps the gallery-first workflow below. For 2.5, a precise brief needs no reference loading; otherwise choose one short task slice.
  3. Refine only as needed: preserve the brief. Add a specific gallery case, craft section or template only to fill a concrete gap; do not load them as a bundle for 2.5.
  4. Confer when useful: before costly/ambiguous/high-polish calls, present 1–3 matched directions plus planned size/quality; ask at most one concise question at a time. Skip long discussion for precise “generate now” requests with a resolved model.
  5. Preflight, no side effects: use existing CLI/skill if present. Check command availability (command -v gpt-image), installed tool lists when the tool manager exists, or the runtime’s own skill registry when available. Do not assume a local home path in cloud/hosted runtimes.
  6. No blind setup: do not reinstall, overwrite skill folders, create/modify .env, or write API keys unless the user explicitly requested setup. Global/shared installs are opt-in only.
  7. Execute via CLI only: call gpt-image or scripts/generate.py with an explicit --model. Do not create a new generate.py, SDK wrapper, or ad-hoc script for normal image requests.
  8. Report: output file path(s), key flags, and one concise refinement suggestion if useful.

Fast path: confirmed 2.5 model + precise prompt + “generate now” → preflight and CLI, without a mandatory reference/craft pass. Do not reconfirm an exact valid model.

Model choice and prompt adaptation

Choice API model ID Suggested use
Flare gpt-image-2.5-flare Fast general generation and drafts
Sunburst gpt-image-2.5-sunburst Precise reference edits and detailed control
Image 2 gpt-image-2 Existing Image 2 workflows and compatibility
  • If the model is absent, ambiguous (such as “GPT 2.5”), or misspelled, ask one clear question offering Flare, Sunburst, and Image 2 with these trade-offs, then wait. For a typo, suggest the likely intended choice without silently correcting it. Do not treat gpt-image-2.5 as an API model ID.
  • Use an exact supported model ID, an unambiguous choice from this menu, or the user's already confirmed choice for the current task without asking again. If the user explicitly says “you choose,” explain the pick briefly and proceed; consider their task and budget rather than always selecting the most expensive settings.
  • Always pass the chosen ID through --model. The CLI retains gpt-image-2 as its backward-compatible default, but that default is not a substitute for the agent resolving the user's choice.
  • Keep model confirmation, cost discussion, and API flags separate from the final image prompt. Use the model-specific reference path below only when it helps the task. Preserve the user's exact text, intended content, reference identity, and edit invariants; obtain confirmation before material prompt changes.
  • Generate one image unless the user requested more. Do not silently switch models, change material prompt content, or run multiple model/prompt variants or comparisons. Ask before additional paid variants. For an authorized same-prompt comparison, keep the prompt, size, and quality identical unless the user asks to vary them.
  • Consult references/models.md when parameter support or validation status needs checking. On an invalid-model, access/403, quota, or policy failure, report the failure and stop; do not switch models or rewrite the prompt to retry automatically.

CLI resolution

Preferred call order:

# Existing CLI on PATH
gpt-image --model MODEL_ID -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

# Installed skill folder; use runtime-provided skill path when available
uv run "$SKILL_DIR/scripts/generate.py" --model MODEL_ID -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

# Direct transient CLI when the user requested setup/one-off CLI execution
uvx --from git+https://github.com/wuyoscar/gpt_image_2_skill gpt-image --model MODEL_ID -p "PROMPT" [options]
常见问题

它需要 API 密钥吗?

需要。图片调用需要为图片服务设置 API 密钥,智能体不会替你把密钥写入文件。

它能填补图片的某一部分吗?

能。它支持局部重绘(inpainting),即编辑图片中选定的区域。

在调用之前它会先确认吗?

对于成本较高、不清楚或要求高精度的请求,它可能会先提出几个方向供你选择。

详情

作者的原始描述

Generate or edit images with GPT Image 2 or 2.5 through the packaged CLI and Reference Gallery. Use for image requests including imprecise 'GPT 2.5' model names, posters, typography, reference edits, and inpainting; resolve the model choice before generation.

repo: wuyoscar/GPT-Image2-Skill

热度

GitHub 星标
6.0k
排名
#14470
许可证
MIT
更新时间
2026/9/30

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能