Token导航 LogoToken导航

Agent Skill · 图像处理

gpt-image(gpt 图像)

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

gpt-image 是图像处理类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在图像处理类的 1,562 个 Skill 里排第 1,325。

总安装 470周安装 20GitHub Stars 984下载 165核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gpt-image(gpt 图像)
来源仓库:https://github.com/wuyoscar/gpt_image_2_skill
仓库路径:skills/gpt-image
安装命令:
npx skills add https://github.com/wuyoscar/gpt_image_2_skill --skill gpt-image
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wuyoscar/gpt_image_2_skill --skill gpt-image

这个 Skill 是做什么的

图像处理类 Skill 处理生成、裁剪、压缩和批量转换图片的任务。

gpt-image 用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关工具。使用时需要确认输入图片、版权来源、输出格式和模型限制。涉及人物、品牌或公开展示素材时,应额外核对授权、真实性和内容合规边界。

gpt-image 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/gpt-image

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wuyoscar/gpt_image_2_skill --skill gpt-image;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gpt-image 怎么安装?

在终端执行 npx skills add https://github.com/wuyoscar/gpt_image_2_skill --skill gpt-image。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gpt-image 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gpt-image 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

gpt-image 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gpt-image 用的人多吗?

公开数据是累计安装 470 次,近一周安装 20 次,下载 165 次,GitHub 984 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gpt-image 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理图像处理类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

图像处理类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
ai-image-generation

AI 图像生成 · Codex、Claude

4,365,552382调用外部服务未明确有提醒
openai-image-gen

OpenAI 图像生成 · OpenClaw

1,906,88432需要联网MIT-0有提醒
image

图像 · OpenClaw

525,99926需要联网MIT-0通过
baoyu-cover-image

宝玉封面图 · Codex、Claude

474,24016,779只读MIT有提醒
baoyu-image-gen

宝玉图像生成器 · Codex、Claude

468,00716,778接触敏感数据MIT通过
gpt-image

gpt 图像 · 本页

470984需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

gpt-image

General image generation/editing CLI for OpenAI's gpt-image-2. Designed for skill-capable agents: all API parameters are first-class flags, defaults are sane, output is a file on disk. Use it whenever a runtime or user asks for image generation, reference-image editing, inpainting, dense typography, or gallery-informed prompt drafting.

One-line usage

# As an agentic skill plugin (installed through your runtime/plugin manager):
uv run "$CLAUDE_PLUGIN_ROOT/skills/gpt-image/scripts/generate.py" -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

# As a direct CLI (installed via uvx or uv tool install):
uvx --from git+https://github.com/wuyoscar/gpt_image_2_skill gpt-image -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

# Or once installed globally:
gpt-image -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

Reads OPENAI_API_KEY from env. Writes to OUT (or auto-named YYYY-MM-DD-HH-MM-SS-<slug>.png in ./fig/ or cwd). Prints output path(s) on stdout. Exit 0 on success, 1 on API error, 2 on bad args / missing key.

CLI flags (complete reference)

FlagType / ValuesDefaultApplies toDescription
-p, --promptstr— requiredbothText prompt for generation, or edit instruction.
-f, --filepathautobothOutput path. Auto-gen if omitted. Extension follows --format.
-i, --imagepath (repeatable)—editsReference image(s). Presence routes through /v1/images/edits (the official endpoint per the OpenAI cookbook).
-m, --maskpath—editsAlpha-channel PNG mask. Opaque pixels are preserved, transparent pixels are regenerated. Edits endpoint only — requires -i.
--input-fidelitylow \high—editsControls how closely the output tracks the reference. Supported on gpt-image-1 and gpt-image-1.5. gpt-image-2 rejects this parameter, so the CLI strips it locally before calling the API.
--modelstrgpt-image-2bothModel ID. Fallbacks: gpt-image-1.5, gpt-image-1, gpt-image-1-mini.
--sizeliteral / shortcut1024x1024bothLiterals: 1024x1024, 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160, 2160x3840, or any 16-px multiple up to 3840 max edge (3:1 ratio cap, 655k–8.3M total pixels). Shortcuts: 1k 2k 4k portrait landscape square wide tall.
--qualityauto \low \medium \highhighbothCost roughly 10× per step. low ≈ $0.005/img, medium ≈ $0.04, high ≈ $0.17. CLI default stays high, but agents should choose deliberately: low for cheap drafts / large sweeps, medium for normal exploration, high for final assets, typography, Chinese text, diagrams, or anything shipping-facing.
-n, --nint1bothNumber of images to return. >1 suffixes filenames _0, _1, …
--backgroundauto \opaqueAPI defaultgenerations onlyopaque disables transparent background.
--moderationauto \lowlowgenerations onlyDefaults to low here for broader prompt exploration. Switch to auto if you want the stricter API-side default.
--formatpng \jpeg \webppngbothResponse encoding.
--compressionint 0–100—bothJPEG/WebP compression. Ignored for PNG.
--userstr—bothOptional end-user identifier for OpenAI abuse tracking.

Budget / quality policy for agents

Use --quality as the budget dial. There is no separate --budget flag in this CLI.

  • low — cheap draft mode. Use for broad prompt exploration, collecting many variants, gallery mining, rough composition checks, or when the user explicitly wants low cost / fast iteration.
  • medium — balanced mode. Use for normal one-off exploration, style probing, or cases where readability matters but the output is not yet final.
  • high — shipping / report mode. Use for Chinese text, posters, infographics, paper figures, dense labels, multi-panel layouts, banners, or any asset likely to be kept.

Rule of thumb for autonomous agents:

  • If the user asks for many variants, cheap, draft, explore, or collect, start with low.
  • If the user asks for polished but still exploratory, use medium.
  • If the user asks for final, fancy, hero, paper figure, poster, diagram, or exact text, use high.
  • If unsure, keep the CLI default high for text-heavy / delivery-facing outputs; otherwise prefer medium during exploration.

Endpoint selection (official OpenAI cookbook pattern)

ModeTriggerEndpoint
Generate from promptno -iPOST /v1/images/generations (JSON body)
Edit / reference-based-i one or more timesPOST /v1/images/edits (multipart form)
Inpaint with mask-i + -mPOST /v1/images/edits with a mask file

Both endpoints accept gpt-image-2 as of April 2026 — verified against OpenAI's official cookbook prompting guide. The skill uses the official openai Python SDK under the hood (from openai import OpenAI; client.images.generate(...) / client.images.edit(...)) — the CLI is a thin wrapper that exposes every SDK parameter as a flag.

Content policy: gpt-image-2 enforces its own content rules on the edits endpoint. Real-person-likeness edits usually refuse (400 error with a moderation message). The skill surfaces the response body verbatim on stderr and exits 1.

Canonical examples

# 1. Vanilla generate, 1K square, auto quality
gpt-image -p "a photorealistic convenience store at 10pm"

# 2. 2K portrait poster with exact Chinese text, high quality
gpt-image \
  -p 'Design a 3:4 tea poster. Exact copy: "山川茶事" / "冷泡系列" / "中杯 16 元"' \
  --size portrait --quality high -f poster.png

# 3. 4-image grid, transparent background disabled, webp
gpt-image -p "isometric furniture, minimalist" \
  -n 4 --background opaque --format webp --compression 85

# 4. Edit / colorize existing image
gpt-image -p "colorize this manga page and translate to Chinese" \
  -i page.jpg -f colored.png

# 5. Multi-reference brand collab
gpt-image -p "77 (the cat) × KFC employee poster" \
  -i cat.png -i kfc_logo.png -f collab.png --size portrait

# 6. Masked inpaint — replace sky only
gpt-image -p "replace sky with aurora, keep foreground intact" \
  -i photo.jpg -m sky_mask.png -f aurora.png --quality high

# 7. 4K widescreen render
gpt-image -p "cinematic Shanghai skyline at dusk" \
  --size 4k --quality high -f skyline.png

Response handling

  • API returns data: [{b64_json: "…"}] by default; the script decodes base64 and writes bytes.
  • If the API returns url instead, the script GETs the URL and writes the downloaded bytes.
  • With -n > 1, files are suffixed: out.png → out_0.png, out_1.png, …

Error surface

ConditionExitstderr
OPENAI_API_KEY unset2error: OPENAI_API_KEY not set....
--mask without -i2error: --mask requires --image (edits endpoint only)
-i or -m path missing2error: --image not found: PATH
OpenAI returns non-2xx1error: <status> from OpenAI: <body> (first 2000 chars of response)
Response has no image data1error: no image data in response: <json>

When an agent hits exit 1, it should surface the response body verbatim — it usually names the problem (rate limit, moderation block, invalid size).

Size picking guide

IntentSize
Default / social square1024x1024 (1k)
Mobile screenshot, portrait poster, beauty/skincare1024x1536 (portrait)
Landscape photo, gameplay screenshot1536x1024 (landscape)
Hi-res print, paper figure2048x2048 (2k)
Widescreen cinematic, dashboard hero3840x2160 (4k)
Tall story banner, vertical video thumbnail2160x3840 (tall)

Scale references (load for prompt leverage, not just CLI calls)

The CLI is only the execution layer. The main value of this skill is the prompt Scale: agents should use the reference files to read concrete gallery patterns before drafting or generating images.

  • references/gallery.md — routing index for the split 162-prompt Reference Gallery Atlas. The Reference Gallery is canonical; README is only a selected visual showcase. It maps each category to references/gallery-<category>.md; load the index first, then only the relevant category file(s) to avoid context bloat. Use this when the user asks for a style/category we already cover, wants diverse ideas, asks to extend the gallery, or needs a prompt that should inherit the repo's collected taste.
  • references/craft.md — expanded 19-section prompt-writing checklist distilled from the gallery: Scale-first usage, exact text, JSON/config-style prompts, fixed-region infographics, data visualization mini-schemas, research/diagram grammar, UI specs, multi-panel consistency, reference-based unlocks, three-glances test, edit invariants, dense text, and category mini-schemas. Load this when improving or debugging a prompt.
  • references/openai-cookbook.md — verbatim Markdown capture of OpenAI's official GPT Image prompting guide. Load this when the user asks about official parameter semantics, endpoint behavior, migration, or model capabilities.

Reference loading policy:

  • For generation/editing requests, first read references/gallery.md only as the category index, then load the relevant references/gallery-<category>.md file(s); do not load every category and do not rely on generic one-line prompting if the atlas contains a matching pattern.
  • Use craft.md to refine structure after selecting a gallery pattern.
  • Use openai-cookbook.md for authoritative API/model questions or when the gallery does not cover the requested workflow.
  • Preserve Curated versus Author + Source metadata when adapting examples. Add new collected prompts to the Reference Gallery first; promote only representative examples to README.

Attribution

License: CC BY 4.0 for prompt patterns and gallery documentation unless a referenced upstream source states otherwise. Prompt patterns are curated from the original repo gallery, OpenAI Cookbook, and community prompt collections credited in the README. Individual source metadata is preserved per entry in the split references/gallery-*.md category files where applicable.

平台分布

Codex

33.72%
按下载量换算56

Claude

29.09%
按下载量换算48

Cursor

18.82%
按下载量换算31

Gemini CLI

8.84%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills